File tree Expand file tree Collapse file tree 2 files changed +33
-31
lines changed
Expand file tree Collapse file tree 2 files changed +33
-31
lines changed Original file line number Diff line number Diff line change @@ -111,34 +111,3 @@ resource "aws_network_acl_association" "nacl" {
111111 subnet_id = each. value . id
112112}
113113
114- # # Provision a AWS RAM share, to distribute the subnets to the accounts
115- resource "aws_ram_resource_share" "this" {
116- name = local. ram_share_name
117- allow_external_principals = false
118- permission_arns = []
119- tags = local. tags
120- }
121-
122- # # Associate the subnets with the RAM share
123- resource "aws_ram_resource_association" "this" {
124- for_each = aws_subnet. subnets
125-
126- resource_arn = each. value . arn
127- resource_share_arn = aws_ram_resource_share. this . arn
128- }
129-
130- # # Associate the principals with the RAM share
131- resource "aws_ram_principal_association" "accounts" {
132- for_each = toset (var. share . accounts )
133-
134- principal = each. value
135- resource_share_arn = aws_ram_resource_share. this . arn
136- }
137-
138- # # Associate the principals with the RAM share
139- resource "aws_ram_principal_association" "organizational_units" {
140- for_each = toset (var. share . organizational_units )
141-
142- principal = each. value
143- resource_share_arn = aws_ram_resource_share. this . arn
144- }
Original file line number Diff line number Diff line change 1+ # # Related the RAM sharing
2+
3+ # # Provision a AWS RAM share, to distribute the subnets to the accounts
4+ resource "aws_ram_resource_share" "this" {
5+ name = local. ram_share_name
6+ allow_external_principals = false
7+ permission_arns = [" arn:aws:ram::aws:permission/AWSRAMDefaultPermissionSubnet" ]
8+ tags = local. tags
9+ }
10+
11+ # # Associate the subnets with the RAM share
12+ resource "aws_ram_resource_association" "this" {
13+ for_each = aws_subnet. subnets
14+
15+ resource_arn = each. value . arn
16+ resource_share_arn = aws_ram_resource_share. this . arn
17+ }
18+
19+ # # Associate the principals with the RAM share
20+ resource "aws_ram_principal_association" "accounts" {
21+ for_each = toset (var. share . accounts )
22+
23+ principal = each. value
24+ resource_share_arn = aws_ram_resource_share. this . arn
25+ }
26+
27+ # # Associate the principals with the RAM share
28+ resource "aws_ram_principal_association" "organizational_units" {
29+ for_each = toset (var. share . organizational_units )
30+
31+ principal = each. value
32+ resource_share_arn = aws_ram_resource_share. this . arn
33+ }
You can’t perform that action at this time.
0 commit comments