Commit 8e42935 1 parent f3147b4 commit 8e42935 Copy full SHA for 8e42935
File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -146,17 +146,17 @@ resource "aws_iam_role" "rw" {
146
146
# # Provision the inline terraform policy for the rw role
147
147
resource "aws_iam_role_policy" "tfstate_apply_rw" {
148
148
name = " tfstate_apply"
149
- role = aws_iam_role. rw . id
150
149
policy = data. aws_iam_policy_document . tfstate_apply . json
150
+ role = aws_iam_role. rw . id
151
151
}
152
152
153
153
# # Provision the inline policies for the read write role
154
154
resource "aws_iam_role_policy" "inline_policies_rw" {
155
155
for_each = merge (var. read_write_inline_policies , var. default_inline_policies )
156
156
157
157
name = each. key
158
- role = aws_iam_role. rw . id
159
158
policy = each. value
159
+ role = aws_iam_role. rw . id
160
160
}
161
161
162
162
# # Attach the read write policies to the read write role
@@ -210,9 +210,11 @@ resource "aws_iam_role" "sr" {
210
210
name = local. state_reader_role_name
211
211
path = var. role_path
212
212
tags = merge (var. tags , { Name = local.state_reader_role_name })
213
+ }
213
214
214
- inline_policy {
215
- name = " tfstate_remote"
216
- policy = data. aws_iam_policy_document . tfstate_remote . json
217
- }
215
+ # # Attach the state reader policies to the state reader role
216
+ resource "aws_iam_role_policy" "sr" {
217
+ name = " tfstate_remote"
218
+ policy = data. aws_iam_policy_document . tfstate_remote . json
219
+ role = aws_iam_role. sr . id
218
220
}
You can’t perform that action at this time.
0 commit comments