Created
March 13, 2019 15:59
-
-
Save alexs77/9dc2866c0aedf4a3ab7b269c16e65da9 to your computer and use it in GitHub Desktop.
Grunting at terragrunt…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terragrunt = { | |
terraform { | |
source = "git::git@github.com:terraform-aws-modules/terraform-aws-autoscaling.git" | |
} | |
include = { | |
path = "${find_in_parent_folders()}" | |
} | |
dependencies { | |
paths = ["../vpc", "../security-group_public", "../keypair"] | |
} | |
} | |
desired_capacity = "1" | |
health_check_type = "EC2" | |
image_id = "ami-007d5db58754fa284" | |
instance_type = "t2.micro" | |
max_size = "1" | |
min_size = "1" | |
name = "qa-bastion-host" | |
security_groups = ["sg-0b…"] # @modulestf:terraform_output.security-group_public.this_security_group_id.to_list | |
vpc_zone_identifier = ["subnet-09…","subnet-04…"] # @modulestf:terraform_output.vpc.public_subnets | |
key_name = "" # @modulestf:terraform_output.keypair.key_pair_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[terragrunt] 2019/03/13 15:55:09 Setting working directory to /Users/alex/SysOps/AWS/QA/cloudcraft/ap-south-1/ap-south-1/keypair/.terragrunt-cache/7FJACLBEMlnpJeba-LhQbRwG95E/TrprSvuoV_MVKNhRWamm3LGfqCA | |
[terragrunt] 2019/03/13 15:55:10 Detected 1 Hooks | |
[terragrunt] 2019/03/13 15:55:10 Running command: terraform output -json key_pair_name | |
The output variable requested could not be found in the state | |
file. If you recently added this to your configuration, be | |
sure to run `terraform apply`, since the state won't be updated | |
with new output variables until that command is run. | |
[terragrunt] 2019/03/13 15:55:13 Detected 1 Hooks | |
[terragrunt] 2019/03/13 15:55:13 Hit multiple errors: | |
exit status 1 | |
Can't update value of @modulestf:terraform_output.keypair.key_pair_name in /Users/alex/SysOps/AWS/QA/cloudcraft/ap-south-1/ap-south-1/autoscaling_bastion-host_public/terraform.tfvars because key key_pair_name does not exist in output | |
=> Error at running "terraform output -json aws_key_pair_name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terragrunt = { | |
terraform { | |
# https://github.com/alexs77/terraform-aws-key_pair | |
source = "git::git@github.com:alexs77/terraform-aws-key_pair.git" | |
} | |
include = { | |
path = "${find_in_parent_folders()}" | |
} | |
dependencies { | |
paths = ["../vpc"] | |
} | |
} | |
# Name of the key | |
aws_key_pair_name = "example_ssh_key" | |
# Public key | |
aws_key_pair_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 email@example.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment