Skip to content

Commit

Permalink
resource/aws_cognito_identity_pool: Prevent ordering differences for …
Browse files Browse the repository at this point in the history
…openid_connect_provider_arns argument (#15178)

Reference: #15176

Output from acceptance testing:

```
--- PASS: TestAccAWSCognitoIdentityPool_basic (24.04s)
--- PASS: TestAccAWSCognitoIdentityPool_supportedLoginProviders (31.68s)
--- PASS: TestAccAWSCognitoIdentityPool_cognitoIdentityProviders (32.20s)
--- PASS: TestAccAWSCognitoIdentityPool_tags (33.05s)
--- PASS: TestAccAWSCognitoIdentityPool_openidConnectProviderArns (33.34s)
--- PASS: TestAccAWSCognitoIdentityPool_samlProviderArns (37.66s)
```
  • Loading branch information
bflad committed Sep 17, 2020
1 parent 4c9c4e9 commit c2290a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions aws/resource_aws_cognito_identity_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func resourceAwsCognitoIdentityPool() *schema.Resource {
},

"openid_connect_provider_arns": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
Expand Down Expand Up @@ -130,7 +130,7 @@ func resourceAwsCognitoIdentityPoolCreate(d *schema.ResourceData, meta interface
}

if v, ok := d.GetOk("openid_connect_provider_arns"); ok {
params.OpenIdConnectProviderARNs = expandStringList(v.([]interface{}))
params.OpenIdConnectProviderARNs = expandStringSet(v.(*schema.Set))
}

if v, ok := d.GetOk("tags"); ok {
Expand Down Expand Up @@ -221,7 +221,7 @@ func resourceAwsCognitoIdentityPoolUpdate(d *schema.ResourceData, meta interface
}

if v, ok := d.GetOk("openid_connect_provider_arns"); ok {
params.OpenIdConnectProviderARNs = expandStringList(v.([]interface{}))
params.OpenIdConnectProviderARNs = expandStringSet(v.(*schema.Set))
}

if v, ok := d.GetOk("saml_provider_arns"); ok {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cognito_identity_pool.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The Cognito Identity Pool argument layout is a structure composed of several sub
* `developer_provider_name` (Optional) - The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your
backend and the Cognito service to communicate about the developer provider.
* `cognito_identity_providers` (Optional) - An array of [Amazon Cognito Identity user pools](#cognito-identity-providers) and their client IDs.
* `openid_connect_provider_arns` (Optional) - A list of OpendID Connect provider ARNs.
* `openid_connect_provider_arns` (Optional) - Set of OpendID Connect provider ARNs.
* `saml_provider_arns` (Optional) - An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
* `supported_login_providers` (Optional) - Key-Value pairs mapping provider names to provider app IDs.
* `tags` - (Optional) A map of tags to assign to the Identity Pool.
Expand Down

0 comments on commit c2290a8

Please sign in to comment.