Skip to content

Commit

Permalink
tweak input
Browse files Browse the repository at this point in the history
  • Loading branch information
johnricords committed Nov 7, 2023
1 parent c5d1ce2 commit 396c09d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "aws_vpc_ipam_pool" "this" {
auto_import = each.value.auto_import
aws_service = try(lower(each.value.aws_service), null)
description = each.value.description
ipam_scope_id = try((var.vpc_ipam.pools.public_ip_source != "" ? [aws_vpc_ipam.example.public_default_scope_id] : []), (aws_vpc_ipam_scope.this.id), (each.value.ipam_scope_id))
ipam_scope_id = try((var.vpc_ipam.pools.public_ip_source != "" ? [aws_vpc_ipam.this[0].public_default_scope_id] : []), (aws_vpc_ipam_scope.this.id), (each.value.ipam_scope_id))

# could also create attribute is_public instead of var.vpc_ipam.pools.public_ip_source != ""
# try doesn't account for multiple scopes with a sub pool created with different scopeids (but aws_vpc_ipam_scope.this.id) is valid
Expand Down

0 comments on commit 396c09d

Please sign in to comment.