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

Final retries and deleting extraneous retry blocks from cognito resources #9684

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

ryndaniels
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Relates #7873

Release note for CHANGELOG:

BUG FIXES
* resource/aws_cognito_user_pool: Final retries after timeouts creating and updating Cognito user pools

Output from acceptance testing:

NOTE that test failure is an existing one


$ make testacc TESTARGS="-run=TestAccAWSCognitoIdentityPoolRolesAttachment"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSCognitoIdentityPoolRolesAttachment -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_basic
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_basic
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_basic
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError (20.24s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError (20.36s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError (20.67s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_basic (55.48s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings (89.03s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       90.268s

make testacc TESTARGS="-run=TestAccAWSCognitoUserPool"                   
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSCognitoUserPool -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSCognitoUserPoolClient_basic
=== PAUSE TestAccAWSCognitoUserPoolClient_basic
=== RUN   TestAccAWSCognitoUserPoolClient_importBasic
=== PAUSE TestAccAWSCognitoUserPoolClient_importBasic
=== RUN   TestAccAWSCognitoUserPoolClient_RefreshTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_RefreshTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_Name
=== PAUSE TestAccAWSCognitoUserPoolClient_Name
=== RUN   TestAccAWSCognitoUserPoolClient_allFields
=== PAUSE TestAccAWSCognitoUserPoolClient_allFields
=== RUN   TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== PAUSE TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== RUN   TestAccAWSCognitoUserPoolDomain_basic
=== PAUSE TestAccAWSCognitoUserPoolDomain_basic
=== RUN   TestAccAWSCognitoUserPoolDomain_custom
--- SKIP: TestAccAWSCognitoUserPoolDomain_custom (0.00s)
    resource_aws_cognito_user_pool_domain_test.go:56: Environment variable AWS_COGNITO_USER_POOL_DOMAIN_ROOT_DOMAIN is not set. This environment variable must be set to the fqdn of an ISSUED ACM certificate in us-east-1 to enable this test.
=== RUN   TestAccAWSCognitoUserPool_importBasic
=== PAUSE TestAccAWSCognitoUserPool_importBasic
=== RUN   TestAccAWSCognitoUserPool_basic
=== PAUSE TestAccAWSCognitoUserPool_basic
=== RUN   TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== RUN   TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== PAUSE TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== RUN   TestAccAWSCognitoUserPool_withDeviceConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withDeviceConfiguration
=== RUN   TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== PAUSE TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== RUN   TestAccAWSCognitoUserPool_withSmsVerificationMessage
=== PAUSE TestAccAWSCognitoUserPool_withSmsVerificationMessage
=== RUN   TestAccAWSCognitoUserPool_withEmailConfiguration
--- SKIP: TestAccAWSCognitoUserPool_withEmailConfiguration (0.00s)
    resource_aws_cognito_user_pool_test.go:278: 'TEST_AWS_SES_VERIFIED_EMAIL_ARN' not set, skipping test.
=== RUN   TestAccAWSCognitoUserPool_withSmsConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withSmsConfiguration
=== RUN   TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
=== PAUSE TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
=== RUN   TestAccAWSCognitoUserPool_withTags
=== PAUSE TestAccAWSCognitoUserPool_withTags
=== RUN   TestAccAWSCognitoUserPool_withAliasAttributes
=== PAUSE TestAccAWSCognitoUserPool_withAliasAttributes
=== RUN   TestAccAWSCognitoUserPool_withPasswordPolicy
=== PAUSE TestAccAWSCognitoUserPool_withPasswordPolicy
=== RUN   TestAccAWSCognitoUserPool_withLambdaConfig
=== PAUSE TestAccAWSCognitoUserPool_withLambdaConfig
=== RUN   TestAccAWSCognitoUserPool_withSchemaAttributes
=== PAUSE TestAccAWSCognitoUserPool_withSchemaAttributes
=== RUN   TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== PAUSE TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== RUN   TestAccAWSCognitoUserPool_update
=== PAUSE TestAccAWSCognitoUserPool_update
=== CONT  TestAccAWSCognitoUserPoolClient_basic
=== CONT  TestAccAWSCognitoUserPool_withAliasAttributes
=== CONT  TestAccAWSCognitoUserPool_withLambdaConfig
=== CONT  TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== CONT  TestAccAWSCognitoUserPool_withDeviceConfiguration
=== CONT  TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== CONT  TestAccAWSCognitoUserPool_withPasswordPolicy
=== CONT  TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== CONT  TestAccAWSCognitoUserPool_basic
=== CONT  TestAccAWSCognitoUserPool_importBasic
=== CONT  TestAccAWSCognitoUserPool_update
=== CONT  TestAccAWSCognitoUserPoolDomain_basic
=== CONT  TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== CONT  TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== CONT  TestAccAWSCognitoUserPool_withSchemaAttributes
=== CONT  TestAccAWSCognitoUserPoolClient_RefreshTokenValidity
=== CONT  TestAccAWSCognitoUserPool_withTags
=== CONT  TestAccAWSCognitoUserPoolClient_Name
=== CONT  TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
=== CONT  TestAccAWSCognitoUserPoolClient_importBasic
--- PASS: TestAccAWSCognitoUserPool_basic (25.30s)
=== CONT  TestAccAWSCognitoUserPoolClient_allFields
--- PASS: TestAccAWSCognitoUserPool_importBasic (26.85s)
=== CONT  TestAccAWSCognitoUserPool_withSmsVerificationMessage
--- PASS: TestAccAWSCognitoUserPoolClient_basic (27.87s)
=== CONT  TestAccAWSCognitoUserPool_withSmsConfiguration
--- PASS: TestAccAWSCognitoUserPoolClient_importBasic (30.84s)
--- PASS: TestAccAWSCognitoUserPoolDomain_basic (35.29s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (40.96s)
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (41.27s)
--- PASS: TestAccAWSCognitoUserPool_withTags (41.29s)
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (41.31s)
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (41.49s)
--- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (44.72s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (45.75s)
--- PASS: TestAccAWSCognitoUserPoolClient_RefreshTokenValidity (46.03s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (47.51s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (27.96s)
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (58.05s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (59.94s)
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (60.03s)
--- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (62.16s)
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (66.80s)
--- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (40.85s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (44.47s)
--- PASS: TestAccAWSCognitoUserPool_update (90.07s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       90.974s

make testacc TESTARGS="-run=TestAccAWSCognitoIdentityPool"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSCognitoIdentityPool -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_basic
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_basic
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError
=== RUN   TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError
=== PAUSE TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError
=== RUN   TestAccAWSCognitoIdentityPool_importBasic
=== PAUSE TestAccAWSCognitoIdentityPool_importBasic
=== RUN   TestAccAWSCognitoIdentityPool_basic
=== PAUSE TestAccAWSCognitoIdentityPool_basic
=== RUN   TestAccAWSCognitoIdentityPool_supportedLoginProviders
=== PAUSE TestAccAWSCognitoIdentityPool_supportedLoginProviders
=== RUN   TestAccAWSCognitoIdentityPool_openidConnectProviderArns
=== PAUSE TestAccAWSCognitoIdentityPool_openidConnectProviderArns
=== RUN   TestAccAWSCognitoIdentityPool_samlProviderArns
=== PAUSE TestAccAWSCognitoIdentityPool_samlProviderArns
=== RUN   TestAccAWSCognitoIdentityPool_cognitoIdentityProviders
=== PAUSE TestAccAWSCognitoIdentityPool_cognitoIdentityProviders
=== RUN   TestAccAWSCognitoIdentityPool_addingNewProviderKeepsOldProvider
--- PASS: TestAccAWSCognitoIdentityPool_addingNewProviderKeepsOldProvider (59.73s)
=== RUN   TestAccAWSCognitoIdentityPoolWithTags
=== PAUSE TestAccAWSCognitoIdentityPoolWithTags
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_basic
=== CONT  TestAccAWSCognitoIdentityPool_supportedLoginProviders
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings
=== CONT  TestAccAWSCognitoIdentityPool_basic
=== CONT  TestAccAWSCognitoIdentityPool_importBasic
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError
=== CONT  TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError
=== CONT  TestAccAWSCognitoIdentityPool_samlProviderArns
=== CONT  TestAccAWSCognitoIdentityPool_cognitoIdentityProviders
=== CONT  TestAccAWSCognitoIdentityPool_openidConnectProviderArns
=== CONT  TestAccAWSCognitoIdentityPoolWithTags
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError (18.96s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError (19.00s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError (19.15s)
--- PASS: TestAccAWSCognitoIdentityPool_importBasic (24.85s)
--- FAIL: TestAccAWSCognitoIdentityPool_openidConnectProviderArns (35.50s)
    testing.go:568: Step 1 error: After applying this step, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_cognito_identity_pool.main
          allow_unauthenticated_identities: "false" => "false"
          arn:                              "arn:aws:cognito-identity:us-west-2:187416307283:identitypool/us-west-2:5637e737-c093-4c2c-ba99-07cabf6bb323" => "arn:aws:cognito-identity:us-west-2:187416307283:identitypool/us-west-2:5637e737-c093-4c2c-ba99-07cabf6bb323"
          cognito_identity_providers.#:     "0" => "0"
          developer_provider_name:          "" => ""
          id:                               "us-west-2:5637e737-c093-4c2c-ba99-07cabf6bb323" => "us-west-2:5637e737-c093-4c2c-ba99-07cabf6bb323"
          identity_pool_name:               "identity pool wb1f86iqvk" => "identity pool wb1f86iqvk"
          openid_connect_provider_arns.#:   "2" => "2"
          openid_connect_provider_arns.0:   "arn:aws:iam::123456789012:oidc-provider/bar.example.com" => "arn:aws:iam::123456789012:oidc-provider/foo.example.com"
          openid_connect_provider_arns.1:   "arn:aws:iam::123456789012:oidc-provider/foo.example.com" => "arn:aws:iam::123456789012:oidc-provider/bar.example.com"
          saml_provider_arns.#:             "0" => "0"
        
        
        
        STATE:
        
        aws_cognito_identity_pool.main:
          ID = us-west-2:5637e737-c093-4c2c-ba99-07cabf6bb323
          provider = provider.aws
          allow_unauthenticated_identities = false
          arn = arn:aws:cognito-identity:us-west-2:187416307283:identitypool/us-west-2:5637e737-c093-4c2c-ba99-07cabf6bb323
          developer_provider_name = 
          identity_pool_name = identity pool wb1f86iqvk
          openid_connect_provider_arns.# = 2
          openid_connect_provider_arns.0 = arn:aws:iam::123456789012:oidc-provider/bar.example.com
          openid_connect_provider_arns.1 = arn:aws:iam::123456789012:oidc-provider/foo.example.com
--- PASS: TestAccAWSCognitoIdentityPool_basic (40.16s)
--- PASS: TestAccAWSCognitoIdentityPoolWithTags (40.66s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_basic (53.70s)
--- PASS: TestAccAWSCognitoIdentityPool_supportedLoginProviders (56.58s)
--- PASS: TestAccAWSCognitoIdentityPool_cognitoIdentityProviders (56.60s)
--- PASS: TestAccAWSCognitoIdentityPool_samlProviderArns (60.15s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings (89.01s)
FAIL
FAIL    github.com/terraform-providers/terraform-provider-aws/aws       149.613s
make: *** [testacc] Error 1

@ryndaniels ryndaniels requested a review from a team August 8, 2019 16:12
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/cognito labels Aug 8, 2019
@ryndaniels ryndaniels added the bug Addresses a defect in current functionality. label Aug 8, 2019
@ryndaniels ryndaniels added this to the v2.24.0 milestone Aug 9, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

(one test failure is "known")

--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError (15.69s)
--- SKIP: TestAccAWSCognitoUserPoolDomain_custom (0.00s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError (16.58s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError (16.63s)
--- PASS: TestAccAWSCognitoIdentityPool_importBasic (18.55s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (18.64s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (19.20s)
--- PASS: TestAccAWSCognitoUserPoolClient_importBasic (19.84s)
--- PASS: TestAccAWSCognitoUserPoolDomain_basic (20.17s)
--- SKIP: TestAccAWSCognitoUserPool_withEmailConfiguration (0.00s)
--- FAIL: TestAccAWSCognitoIdentityPool_openidConnectProviderArns (22.74s)
--- PASS: TestAccAWSCognitoIdentityPool_basic (26.46s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (27.92s)
--- PASS: TestAccAWSCognitoIdentityPoolWithTags (28.32s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (29.02s)
--- PASS: TestAccAWSCognitoUserPoolClient_RefreshTokenValidity (29.34s)
--- PASS: TestAccAWSCognitoUserPool_basic (15.90s)
--- PASS: TestAccAWSCognitoUserPool_importBasic (18.86s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_basic (35.41s)
--- PASS: TestAccAWSCognitoIdentityPool_addingNewProviderKeepsOldProvider (36.98s)
--- PASS: TestAccAWSCognitoIdentityPool_cognitoIdentityProviders (36.60s)
--- PASS: TestAccAWSCognitoIdentityPool_supportedLoginProviders (37.70s)
--- PASS: TestAccAWSCognitoIdentityPool_samlProviderArns (40.08s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (25.26s)
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (23.04s)
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (24.00s)
--- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (23.24s)
--- PASS: TestAccAWSCognitoUserPool_withTags (19.29s)
--- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (29.71s)
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (19.94s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (28.35s)
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (20.59s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings (49.52s)
--- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (19.94s)
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (16.72s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (41.46s)
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (35.18s)
--- PASS: TestAccAWSCognitoUserPool_update (39.42s)

@ryndaniels ryndaniels merged commit 0ee7bc7 into master Aug 12, 2019
@ryndaniels ryndaniels deleted the rfd-retry-cognito branch August 12, 2019 11:29
@ghost
Copy link

ghost commented Aug 15, 2019

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 1, 2019

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 Nov 1, 2019
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/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants