Skip to content
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

resource/aws_cognito_user_pool: Fix schema attribute handling #3789

Merged
merged 2 commits into from
Mar 26, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Mar 15, 2018

Fixes #3405

This one was pretty gnarly! 😄 Looks like this was skipped in the initial implementation for pretty good reason as the API has a bunch of "standard" attributes it always returns by default. This implementation skips any of those that are not configured in the Terraform configuration. This also properly sets ForceNew on all the schema attributes for now as Cognito does not support updating the schema beyond adding new custom attributes (not previously supported or in this PR).

Tests:

19 tests passed (all tests)
=== RUN   TestAccAWSCognitoUserPool_importBasic
--- PASS: TestAccAWSCognitoUserPool_importBasic (11.05s)
=== RUN   TestAccAWSCognitoUserPoolClient_allFields
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (12.76s)
=== RUN   TestAccAWSCognitoUserPoolDomain_basic
--- PASS: TestAccAWSCognitoUserPoolDomain_basic (14.18s)
=== RUN   TestAccAWSCognitoUserPool_basic
--- PASS: TestAccAWSCognitoUserPool_basic (14.83s)
=== RUN   TestAccAWSCognitoUserPool_withSmsVerificationMessage
--- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (16.17s)
=== RUN   TestAccAWSCognitoUserPool_withPasswordPolicy
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (16.37s)
=== RUN   TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (17.43s)
=== RUN   TestAccAWSCognitoUserPool_withDeviceConfiguration
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (18.17s)
=== RUN   TestAccAWSCognitoUserPool_withEmailConfiguration
--- PASS: TestAccAWSCognitoUserPool_withEmailConfiguration (18.18s)
=== RUN   TestAccAWSCognitoUserPool_withVerificationMessageTemplate
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (18.38s)
=== RUN   TestAccAWSCognitoUserPool_withSchemaAttributes
--- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (20.56s)
=== RUN   TestAccAWSCognitoUserPoolClient_basic
--- PASS: TestAccAWSCognitoUserPoolClient_basic (20.82s)
=== RUN   TestAccAWSCognitoUserPool_withAliasAttributes
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (22.57s)
=== RUN   TestAccAWSCognitoUserPoolDomain_import
--- PASS: TestAccAWSCognitoUserPoolDomain_import (23.30s)
=== RUN   TestAccAWSCognitoUserPool_withEmailVerificationMessage
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (27.59s)
=== RUN   TestAccAWSCognitoUserPool_withSmsConfiguration
--- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (28.73s)
=== RUN   TestAccAWSCognitoUserPool_withLambdaConfig
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (33.35s)
=== RUN   TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
--- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (37.11s)
=== RUN   TestAccAWSCognitoUserPool_withTags
--- PASS: TestAccAWSCognitoUserPool_withTags (40.34s)

@bflad bflad added bug Addresses a defect in current functionality. service/cognito labels Mar 15, 2018
@bflad bflad requested a review from Ninir March 15, 2018 06:14
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Mar 15, 2018
@bflad bflad force-pushed the b-aws_cognito_user_pool-set-schema branch from 15639a6 to cc36c1d Compare March 15, 2018 06:21
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Mar 15, 2018
@bflad bflad requested a review from a team March 26, 2018 14:28
@bflad bflad added this to the v1.13.0 milestone Mar 26, 2018
@bflad bflad merged commit 6fed0a5 into master Mar 26, 2018
@bflad bflad deleted the b-aws_cognito_user_pool-set-schema branch March 26, 2018 16:59
bflad added a commit that referenced this pull request Mar 26, 2018
@bflad
Copy link
Contributor Author

bflad commented Mar 29, 2018

This has been released in version 1.13.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 7, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_cognito_user_pool not refreshing schema from aws
2 participants