Skip to content

Commit 775ec99

Browse files
committed
fix: Rename assume_role_policy_document to assume_role_policy
1 parent 310fa9a commit 775ec99

File tree

5 files changed

+50
-5
lines changed

5 files changed

+50
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ For automated tests of the complete example using [bats](https://github.com/bats
176176
| <a name="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br/>This is for some rare cases where resources want additional configuration of tags<br/>and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
177177
| <a name="input_assume_role_actions"></a> [assume\_role\_actions](#input\_assume\_role\_actions) | The IAM action to be granted by the AssumeRole policy | `list(string)` | <pre>[<br/> "sts:AssumeRole",<br/> "sts:TagSession"<br/>]</pre> | no |
178178
| <a name="input_assume_role_conditions"></a> [assume\_role\_conditions](#input\_assume\_role\_conditions) | List of conditions for the assume role policy | <pre>list(object({<br/> test = string<br/> variable = string<br/> values = list(string)<br/> }))</pre> | `[]` | no |
179-
| <a name="input_assume_role_policy_document"></a> [assume\_role\_policy\_document](#input\_assume\_role\_policy\_document) | A JSON assume role policy document. If set, this will be used as the assume role policy and the principals, assume\_role\_conditions, and assume\_role\_actions variables will be ignored. | `string` | `""` | no |
179+
| <a name="input_assume_role_policy"></a> [assume\_role\_policy](#input\_assume\_role\_policy) | A JSON assume role policy document. If set, this will be used as the assume role policy and the principals, assume\_role\_conditions, and assume\_role\_actions variables will be ignored. | `string` | `""` | no |
180180
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br/>in the order they appear in the list. New attributes are appended to the<br/>end of the list. The elements of the list are joined by the `delimiter`<br/>and treated as a single ID element. | `list(string)` | `[]` | no |
181181
| <a name="input_context"></a> [context](#input\_context) | Single object for setting entire context at once.<br/>See description of individual variables for details.<br/>Leave string and numeric variables as `null` to use default value.<br/>Individual variable settings (non-null) override settings in context object,<br/>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br/> "additional_tag_map": {},<br/> "attributes": [],<br/> "delimiter": null,<br/> "descriptor_formats": {},<br/> "enabled": true,<br/> "environment": null,<br/> "id_length_limit": null,<br/> "label_key_case": null,<br/> "label_order": [],<br/> "label_value_case": null,<br/> "labels_as_tags": [<br/> "unset"<br/> ],<br/> "name": null,<br/> "namespace": null,<br/> "regex_replace_chars": null,<br/> "stage": null,<br/> "tags": {},<br/> "tenant": null<br/>}</pre> | no |
182182
| <a name="input_delimiter"></a> [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.<br/>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |

examples/complete/.terraform.lock.hcl

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/complete/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ module "role" {
8787
role_description = "Test IAM role"
8888
inline_policy_enabled = var.inline_policy_enabled
8989

90-
assume_role_policy_document = var.assume_role_policy_document
90+
assume_role_policy = var.assume_role_policy
9191

9292
context = module.this.context
9393
}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
data "aws_iam_policy_document" "assume_role" {
22
# if the module is enabled and we don't use a `assume_role_policy` then enable the aws_iam_policy_document datasource
3-
count = module.this.enabled && var.assume_role_policy_document == null ? length(keys(var.principals)) : 0
3+
count = module.this.enabled && var.assume_role_policy == null ? length(keys(var.principals)) : 0
44

55
statement {
66
effect = "Allow"

test/src/examples_complete_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestExamplesCompleteDisabled(t *testing.T) {
6565
testNoChanges(t, "../../examples/complete")
6666
}
6767

68-
// Test the module with a custom assume_role_policy_document
68+
// Test the module with a custom assume_role_policy
6969
func TestExamplesAssumeRolePolicyDocument(t *testing.T) {
7070
t.Parallel()
7171

@@ -90,7 +90,7 @@ func TestExamplesAssumeRolePolicyDocument(t *testing.T) {
9090
Upgrade: true,
9191
VarFiles: []string{"fixtures.us-east-2.tfvars"},
9292
Vars: map[string]interface{}{
93-
"attributes": attributes,
93+
"attributes": attributes,
9494
"assume_role_policy": trustPolicy,
9595
},
9696
}

0 commit comments

Comments
 (0)