File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -161,9 +161,9 @@ resource "aws_ram_resource_association" "this" {
161161}
162162
163163resource "aws_ram_principal_association" "this" {
164- count = var. create_tgw && var. share_tgw ? length (var. ram_principals ) : 0
164+ for_each = var. create_tgw && var. share_tgw ? toset (var. ram_principals ) : []
165165
166- principal = var . ram_principals [ count . index ]
166+ principal = each . value
167167 resource_share_arn = aws_ram_resource_share. this [0 ]. arn
168168}
169169
Original file line number Diff line number Diff line change @@ -96,5 +96,5 @@ output "ram_resource_share_id" {
9696
9797output "ram_principal_association_id" {
9898 description = " The Amazon Resource Name (ARN) of the Resource Share and the principal, separated by a comma"
99- value = try ( aws_ram_principal_association. this [ 0 ] . id , " " )
99+ value = [ for k , v in aws_ram_principal_association . this : v . id ]
100100}
You can’t perform that action at this time.
0 commit comments