Skip to content

Commit bec0070

Browse files
authored
fix: adjust functions to allow for a clean deletion (#17)
1 parent 187709e commit bec0070

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ module "bastion_autoscale_group" {
105105
default_cooldown = 300
106106
scale_down_cooldown_seconds = 300
107107
wait_for_capacity_timeout = "10m"
108-
user_data_base64 = join("", data.cloudinit_config.config[0][*].rendered)
108+
user_data_base64 = try(data.cloudinit_config.config[0].rendered, null)
109109
tags = module.this.tags
110110
security_group_ids = [module.sg.id]
111111
iam_instance_profile_name = join("", aws_iam_instance_profile.default[*].name)

src/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ output "autoscaling_group_id" {
44
}
55

66
output "iam_instance_profile" {
7-
value = join("", aws_iam_instance_profile.default[*].name)
7+
value = one(aws_iam_instance_profile.default[*].name)
88
description = "Name of AWS IAM Instance Profile"
99
}
1010

0 commit comments

Comments
 (0)