Skip to content

Commit

Permalink
Fixed output of placement_group (fixed #104) (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko authored Jul 8, 2019
1 parent 4a5f551 commit c692be9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,15 @@ module "ec2_with_t3_unlimited" {
associate_public_ip_address = true
}

# This instance won't be created
module "ec2_zero" {
source = "../../"

instance_count = 0

name = "example-zero"
ami = data.aws_ami.amazon_linux.id
instance_type = "c5.large"
subnet_id = tolist(data.aws_subnet_ids.all.ids)[0]
vpc_security_group_ids = [module.security_group.this_security_group_id]
}
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
this_primary_network_interface_id = compact(coalescelist(aws_instance.this.*.primary_network_interface_id, aws_instance.this_t2.*.primary_network_interface_id, [""]))
this_private_dns = compact(coalescelist(aws_instance.this.*.private_dns, aws_instance.this_t2.*.private_dns, [""]))
this_private_ip = compact(coalescelist(aws_instance.this.*.private_ip, aws_instance.this_t2.*.private_ip, [""]))
this_placement_group = compact(concat(coalescelist(aws_instance.this.*.placement_group, aws_instance.this_t2.*.placement_group), [""]))
this_placement_group = compact(coalescelist(aws_instance.this.*.placement_group, aws_instance.this_t2.*.placement_group, [""]))
this_security_groups = coalescelist(aws_instance.this.*.security_groups, aws_instance.this_t2.*.security_groups, [""])
this_vpc_security_group_ids = coalescelist(flatten(aws_instance.this.*.vpc_security_group_ids), flatten(aws_instance.this_t2.*.vpc_security_group_ids), [""])
this_subnet_id = compact(coalescelist(aws_instance.this.*.subnet_id, aws_instance.this_t2.*.subnet_id, [""]))
Expand Down

0 comments on commit c692be9

Please sign in to comment.