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

New Resource: aws_cognito_user_pool_domain #2325

Merged
merged 1 commit into from
Jan 3, 2018
Merged

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Nov 16, 2017

Test results

TF_ACC=1 go test ./aws -v -run=TestAccAWSCognitoUserPoolDomain_ -timeout 120m
=== RUN   TestAccAWSCognitoUserPoolDomain_basic
--- PASS: TestAccAWSCognitoUserPoolDomain_basic (43.74s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	43.772s

@radeksimko radeksimko added the new-resource Introduces a new resource. label Nov 16, 2017
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

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

Looks very good!

Just left a small nitpicks: it's up to you to go on or fix them, nothing critical!

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

Create: resourceAwsCognitoUserPoolDomainCreate,
Read: resourceAwsCognitoUserPoolDomainRead,
Delete: resourceAwsCognitoUserPoolDomainDelete,
Importer: &schema.ResourceImporter{
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of adding a test for the import?


func resourceAwsCognitoUserPoolDomainCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).cognitoidpconn
log.Print("[DEBUG] Creating Cognito User Pool Domain")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: I would add the params as %#v here moving this after the structure definition


stateConf := resource.StateChangeConf{
Pending: []string{
cognitoidentityprovider.DomainStatusTypeCreating,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

d.Set("cloudfront_distribution_arn", desc.CloudFrontDistribution)
d.Set("s3_bucket", desc.S3Bucket)
d.Set("user_pool_id", desc.UserPoolId)
d.Set("version", desc.Version)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: What do you think of checking that these attributes are actually set, in the related test?

@radeksimko radeksimko modified the milestones: v1.3.0, v1.4.0 Nov 17, 2017
@Ninir Ninir changed the title r/cognito_identity_pool_domain: Add resource r/cognito_user_pool_domain: Add resource Nov 17, 2017
@radeksimko
Copy link
Member Author

Addressed all comments, but I'll ship it after 1.3.1 as discussed earlier.

"domain": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

@radeksimko radeksimko force-pushed the f-cognito-idp-domain branch 2 times, most recently from 56069d6 to 50be8b1 Compare November 29, 2017 14:28
@radeksimko radeksimko changed the title r/cognito_user_pool_domain: Add resource New Resource: aws_cognito_user_pool_domain Jan 3, 2018
@radeksimko radeksimko merged commit e13139e into master Jan 3, 2018
@radeksimko radeksimko deleted the f-cognito-idp-domain branch January 3, 2018 11:41
@bflad
Copy link
Contributor

bflad commented Jan 12, 2018

This has been released in terraform-provider-aws version 1.7.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad bflad modified the milestones: v1.4.0, v1.7.0 Jan 12, 2018
@ghost
Copy link

ghost commented Apr 8, 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 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants