hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.61k stars 9k forks source link

[Bug]: status 400 from DescribeUserPoolClient when using data aws_cognito_user_pool_client #38167

Closed t-oki closed 6 days ago

t-oki commented 6 days ago

Terraform Core Version

v1.9.0

AWS Provider Version

v5.56.0

Affected Resource(s)

data.aws_cognito_user_pool_client

Expected Behavior

The plan will success

Actual Behavior

terraform plan failed. Status 400 was returned from DescribeUserPoolClient. It seems that the clientID was not passed to DescribeUserPoolClient.

Relevant Error/Panic Output Snippet

│ Error: reading Cognito User Pool Client (xxxx): operation error Cognito Identity Provider: DescribeUserPoolClient, https response error StatusCode: 400, RequestID: xxx, InvalidParameterException: 2 validation errors detected: Value '' at 'clientId' failed to satisfy constraint: Member must have length greater than or equal to 1; Value '' at 'clientId' failed to satisfy constraint: Member must satisfy regular expression pattern: [\w+]+

Terraform Configuration Files

data "aws_cognito_user_pool_client" "xxx" {
  client_id    = "xxx"
  user_pool_id = resource.xxx
}

Steps to Reproduce

Plan data.aws_cognito_user_pool_client

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 6 days ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 6 days ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] commented 6 days ago

This functionality has been released in v5.56.1 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. Thank you!