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

Add endpoint attribute to cognito_user_pool #4718

Merged
merged 1 commit into from
Jun 2, 2018
Merged

Add endpoint attribute to cognito_user_pool #4718

merged 1 commit into from
Jun 2, 2018

Conversation

bespokebob
Copy link
Contributor

Cognito User Pools have a provider/issuer/endpoint name (I can't find a consistent name for this) of the format cognito-idp..amazonaws.com/<YOUR_USER_POOL_ID>. This name is used by various clients (as the token issuer, and to form the URL to retrieve the JWKs), and for configuring the user pool as an identity provider in a Cognito Identity Pool.

Fixes #4700

Changes proposed in this pull request:

  • Adds endpoint attribute to cognito_user_pool

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCognitoUserPool_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSCognitoUserPool_basic -timeout 120m
=== RUN   TestAccAWSCognitoUserPool_basic
--- PASS: TestAccAWSCognitoUserPool_basic (14.82s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	25.618s

Cognito User Pools have a provider/issuer/endpoint name (I can't find a consistent name for this) of the format cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID>. This name is used by various clients (as the token issuer, and to form the URL to retrieve the JWKs), and for configuring the user pool as an identity provider in a Cognito Identity Pool.

Resolves #4700
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label May 31, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/cognito labels Jun 2, 2018
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.

Thanks for this contribution! LGTM with one minor documentation nitpick, which I'll address post-merge. 🚀

15 tests passed (all tests)
=== RUN   TestAccAWSCognitoUserPool_basic
--- PASS: TestAccAWSCognitoUserPool_basic (8.60s)
=== RUN   TestAccAWSCognitoUserPool_importBasic
--- PASS: TestAccAWSCognitoUserPool_importBasic (9.62s)
=== RUN   TestAccAWSCognitoUserPool_withTags
--- PASS: TestAccAWSCognitoUserPool_withTags (13.64s)
=== RUN   TestAccAWSCognitoUserPool_withSmsVerificationMessage
--- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (14.30s)
=== RUN   TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (14.44s)
=== RUN   TestAccAWSCognitoUserPool_withDeviceConfiguration
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (14.97s)
=== RUN   TestAccAWSCognitoUserPool_withAliasAttributes
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (20.58s)
=== RUN   TestAccAWSCognitoUserPool_withEmailConfiguration
--- PASS: TestAccAWSCognitoUserPool_withEmailConfiguration (23.20s)
=== RUN   TestAccAWSCognitoUserPool_withSchemaAttributes
--- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (24.37s)
=== RUN   TestAccAWSCognitoUserPool_withSmsConfiguration
--- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (26.11s)
=== RUN   TestAccAWSCognitoUserPool_withLambdaConfig
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (32.79s)
=== RUN   TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
--- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (36.27s)
=== RUN   TestAccAWSCognitoUserPool_withVerificationMessageTemplate
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (37.22s)
=== RUN   TestAccAWSCognitoUserPool_withPasswordPolicy
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (38.04s)
=== RUN   TestAccAWSCognitoUserPool_withEmailVerificationMessage
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (41.57s)

@@ -126,6 +126,7 @@ The following additional attributes are exported:

* `id` - The id of the user pool.
* `arn` - The ARN of the user pool.
* `endpoint` - The endpoint name of the user pool.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the Cognito documentation does not signify what this attribute's value might be we should include an example of what is meant here, e.g. Example: cognito-idp.us-east-1.amazonaws.com/xxxx_yyyyy

@bflad bflad added this to the v1.22.0 milestone Jun 2, 2018
@bflad bflad merged commit d9486de into hashicorp:master Jun 2, 2018
bflad added a commit that referenced this pull request Jun 2, 2018
@bespokebob bespokebob deleted the cognito-user-pool-endpoint branch June 4, 2018 15:32
@bflad
Copy link
Contributor

bflad commented Jun 5, 2018

This has been released in version 1.22.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 5, 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 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. size/XS 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 should export a provider name
2 participants