`roles` deprecated in docs & code error message (#13622)

This commit is contained in:
Dominik-K 2017-04-20 22:02:48 +02:00 committed by Paul Stack
parent 24c33106ff
commit 565f0a4e0f
2 changed files with 7 additions and 5 deletions

View File

@ -121,7 +121,7 @@ func resourceAwsIamInstanceProfileCreate(d *schema.ResourceData, meta interface{
_, hasRole := d.GetOk("role")
if hasRole == false && hasRoles == false {
return fmt.Errorf("Either `roles` or `role` must be specified when creating an IAM Instance Profile")
return fmt.Errorf("Either `role` or `roles` (deprecated) must be specified when creating an IAM Instance Profile")
}
request := &iam.CreateInstanceProfileInput{

View File

@ -10,7 +10,7 @@ description: |-
Provides an IAM instance profile.
~> **NOTE:** Either `roles` or `role` must be specified in the IAM Instance Profile.
~> **NOTE:** Either `role` or `roles` (**deprecated**) must be specified.
## Example Usage
@ -49,7 +49,9 @@ 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` - (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. `WARNING: This will be deprecated in a future version of Terraform`.
* `roles` - (**Deprecated**)
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.
WARNING: This is deprecated since [version 0.9.3 (April 12, 2017)](https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md#093-april-12-2017), as >= 2 roles are not possible. See [issue #11575](https://github.com/hashicorp/terraform/issues/11575).
* `role` - (Optional) The role name to include in the profile.
## Attribute Reference
@ -59,8 +61,8 @@ The following arguments are supported:
* `create_date` - The creation timestamp of the instance profile.
* `name` - The instance profile's name.
* `path` - The path of the instance profile in IAM.
* `roles` - The list of roles assigned to the instance profile.
* `role` - The role assigned to the instance profile
* `role` - The role assigned to the instance profile.
* `roles` - The list of roles assigned to the instance profile. (**Deprecated**)
* `unique_id` - The [unique ID][1] assigned by AWS.
[1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html#GUIDs