-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Description
I'm creating a bastion in a VPC with Terragrunt and OpenTofu. I've attached the relevant Terragrunt files that define the bastion configuration:
bastion.hcl.txt
terragrunt.hcl.txt
- bastion.hcl is the generic template that pulls this repository and sets some generic defaults
- terragrunt.hcl actually creates the bastion, sets the inputs, etc.
Creating the bastion works fine, but the instance's Name tag is ASG-bastion-lt as opposed to prod-bastion as I expected based on the configuration. Moreover, if I run terragrunt plan again after the bastion was created, I get this:
16:51:15.740 STDOUT tofu: OpenTofu will perform the following actions:
16:51:15.740 STDOUT tofu: # aws_autoscaling_group.bastion_auto_scaling_group will be updated in-place
16:51:15.740 STDOUT tofu: ~ resource "aws_autoscaling_group" "bastion_auto_scaling_group" {
16:51:15.740 STDOUT tofu: id = "ASG-bastion-lt20240903234808944200000005"
16:51:15.740 STDOUT tofu: name = "ASG-bastion-lt20240903234808944200000005"
16:51:15.740 STDOUT tofu: # (27 unchanged attributes hidden)
16:51:15.740 STDOUT tofu: + tag {
16:51:15.740 STDOUT tofu: + key = "Name"
16:51:15.740 STDOUT tofu: + propagate_at_launch = true
16:51:15.740 STDOUT tofu: + value = "prod-bastion"
16:51:15.740 STDOUT tofu: }
16:51:15.740 STDOUT tofu: # (6 unchanged blocks hidden)
16:51:15.740 STDOUT tofu: }
16:51:15.740 STDOUT tofu: Plan: 0 to add, 1 to change, 0 to destroy.
I apply it, but then terragrunt plan gives again the same result. It does not seem to get applied.
If I kill the current instance, the ASG makes a new one, but the name is still wrong: ASG-bastion-lt
TLDR: The instances are not named correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels