Skip to content

Commit

Permalink
Implementing 'aem_instance' resource started
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Aug 27, 2023
1 parent a810ccf commit dbf5716
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ website/vendor

# Terraform CLI config
dev_overrides.tfrc

*.pem
25 changes: 25 additions & 0 deletions examples/minimal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ locals {
host = "aem_single"

ssh_user = "ec2-user"
ssh_private_key = file("ec2-user.pem") // TODO connect it with AWS key pair

tags = {
Workspace = "aemc"
Expand All @@ -43,3 +44,27 @@ resource "aws_instance" "aem_author" {
output "instance_ip" {
value = aws_instance.aem_author.public_ip
}

resource "aem_instance" "author" {
depends_on = [aws_instance.aem_author]

/*
config {
lib_dir = "lib" # files copied once over SCP before creating instance
file = "aem.yml" # https://github.com/wttech/aemc/blob/0ca8bdeb17be0457ce4bea43621d8abe08948431/pkg/project/app_classic/aem/default/etc/aem.yml
instance_id = "local_author"
}
*/

/*
connection {
type = "ssh"
params = {
host = aws_instance.aem_author.*.public_ip
port = 22
user = "ec2-user"
private_key = local.ssh_private_key
}
}
*/
}

0 comments on commit dbf5716

Please sign in to comment.