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

Unable to import cognito user pool client #3753

Closed
repl-chris opened this issue Mar 12, 2018 · 5 comments · Fixed by #3762
Closed

Unable to import cognito user pool client #3753

repl-chris opened this issue Mar 12, 2018 · 5 comments · Fixed by #3762
Labels
bug Addresses a defect in current functionality.
Milestone

Comments

@repl-chris
Copy link

Terraform Version

Terraform v0.11.3
+ provider.aws v1.11.0

Affected Resource(s)

aws_cognito_user_pool_client

Terraform Configuration Files

resource "aws_cognito_user_pool" "pool" {
    name = "pool"
}
resource "aws_cognito_user_pool_client" "client" {
    name = "client"
    user_pool_id = "${aws_cognito_user_pool.pool.id}"
}

Debug Output

https://gist.github.com/repl-chris/7215ee65e99e7ead2caf8100b0b1101d

Expected Behavior

It should import successfully

Actual Behavior

It appears to import successfully, but then errors out on 'Refreshing state...'

C:\temp> terraform import aws_cognito_user_pool_client.client 3v1ugef2oda5amrfsv9faegkog
aws_cognito_user_pool_client.client: Importing from ID "3v1ugef2oda5amrfsv9faegkog"...
aws_cognito_user_pool_client.client: Import complete!
  Imported aws_cognito_user_pool_client (ID: 3v1ugef2oda5amrfsv9faegkog)
aws_cognito_user_pool_client.client: Refreshing state... (ID: 3v1ugef2oda5amrfsv9faegkog)

Error: aws_cognito_user_pool_client.client (import id: 3v1ugef2oda5amrfsv9faegkog): 1 error(s) occurred:

* import aws_cognito_user_pool_client.client result: 3v1ugef2oda5amrfsv9faegkog: aws_cognito_user_pool_client.client: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, DescribeUserPoolClientInput.UserPoolId.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Comment out the aws_cognito_user_pool_client resource from the config listed above
  2. terraform apply
  3. Add a client manually (via the AWS console or whatever)...take note of its ID
  4. Uncomment out the aws_cognito_user_pool_client
  5. terraform import aws_cognito_user_pool_client.client <your client ID here>
@loivis
Copy link
Contributor

loivis commented Mar 16, 2018

submitted pr to include user-pool-id for import

@arocki7
Copy link

arocki7 commented Apr 18, 2018

I have got the same problem.

@bflad bflad added this to the v1.16.0 milestone Apr 24, 2018
@bflad
Copy link
Contributor

bflad commented Apr 24, 2018

The fix for this has been merged in and will release with v1.16.0 of the AWS provider, likely tomorrow.

@bflad
Copy link
Contributor

bflad commented Apr 25, 2018

This has been released in version 1.16.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 6, 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 6, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants