-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provider/aws: Deprecate roles in favour of role in iam_instance_profile #13130
Conversation
You can only specify a single role to an IAM Instance Profile. So having a slice of roles in the provider makes no sense. Therefore, we are going to deprecate this infavour of `role` ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSIAMInstanceProfile_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/28 21:24:20 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSIAMInstanceProfile_ -timeout 120m === RUN TestAccAWSIAMInstanceProfile_importBasic --- PASS: TestAccAWSIAMInstanceProfile_importBasic (25.08s) === RUN TestAccAWSIAMInstanceProfile_basic --- PASS: TestAccAWSIAMInstanceProfile_basic (22.40s) === RUN TestAccAWSIAMInstanceProfile_withRoleNotRoles --- PASS: TestAccAWSIAMInstanceProfile_withRoleNotRoles (22.63s) === RUN TestAccAWSIAMInstanceProfile_missingRoleThrowsError --- PASS: TestAccAWSIAMInstanceProfile_missingRoleThrowsError (4.02s) === RUN TestAccAWSIAMInstanceProfile_namePrefix --- PASS: TestAccAWSIAMInstanceProfile_namePrefix (22.18s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 96.349s ```
@@ -47,7 +49,8 @@ The following arguments are supported: | |||
* `name` - (Optional, Forces new resource) The profile's name. If omitted, Terraform will assign a random, unique name. | |||
* `name_prefix` - (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts with `name`. | |||
* `path` - (Optional, default "/") Path in which to create the profile. | |||
* `roles` - (Required) A list of role names to include in the profile. The current default is 1. If you see an error message similar to `Cannot exceed quota for InstanceSessionsPerInstanceProfile: 1`, then you must contact AWS support and ask for a limit increase. | |||
* `roles` - (Optional) A list of role names to include in the profile. The current default is 1. If you see an error message similar to `Cannot exceed quota for InstanceSessionsPerInstanceProfile: 1`, then you must contact AWS support and ask for a limit increase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a deprecation notice here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor nit
…le (hashicorp#13130) * provider/aws: Deprecate roles in favour of role in iam_instance_profile You can only specify a single role to an IAM Instance Profile. So having a slice of roles in the provider makes no sense. Therefore, we are going to deprecate this infavour of `role` ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSIAMInstanceProfile_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/28 21:24:20 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSIAMInstanceProfile_ -timeout 120m === RUN TestAccAWSIAMInstanceProfile_importBasic --- PASS: TestAccAWSIAMInstanceProfile_importBasic (25.08s) === RUN TestAccAWSIAMInstanceProfile_basic --- PASS: TestAccAWSIAMInstanceProfile_basic (22.40s) === RUN TestAccAWSIAMInstanceProfile_withRoleNotRoles --- PASS: TestAccAWSIAMInstanceProfile_withRoleNotRoles (22.63s) === RUN TestAccAWSIAMInstanceProfile_missingRoleThrowsError --- PASS: TestAccAWSIAMInstanceProfile_missingRoleThrowsError (4.02s) === RUN TestAccAWSIAMInstanceProfile_namePrefix --- PASS: TestAccAWSIAMInstanceProfile_namePrefix (22.18s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 96.349s ``` * Update iam_instance_profile.html.markdown
As of version 0.9.3, Terraform deprecates `roles` in favor of `role`. This manifests itself with warnings like: * aws_iam_instance_profile.my-profile: "roles": [DEPRECATED] Use `role` instead. Only a single role can be passed to an IAM Instance Profile Update our custom validation to expect the newer attribute name. This breaks support for users using Terraform versions older than 0.9.3. See hashicorp/terraform#13130 for additional context.
Instance profiles can only be associated with a single role. Here, the `roles` attribute of `aws_iam_instance_profile` was updated to `role`. See: hashicorp/terraform#13130
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Fixes: #11575
You can only specify a single role to an IAM Instance Profile. So having
a slice of roles in the provider makes no sense. Therefore, we are going
to deprecate this infavour of
role