Skip to content

provider │ "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value #42911

Open
@apoguy

Description

@apoguy

Terraform and AWS Provider Version

Terraform v1.12.0
Aws provider: 6.0.0-beta3

Affected Resource(s) or Data Source(s)

  • aws_cognito_user_pool_client

Expected Behavior

Normal planning

Actual Behavior

While setting explicit auth flows as:

explicit_auth_flows = [
    "ALLOW_USER_PASSWORD_AUTH",
    "ALLOW_CUSTOM_AUTH",
    "ALLOW_REFRESH_TOKEN_AUTH"
  ]

planning threw:

Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to aws_cognito_user_pool_client.cli, provider
│ "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value: .region: was
│ cty.StringVal("us-east-1"), but now null.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Relevant Error/Panic Output

Error: Provider produced inconsistent result after apply

│ When applying changes to aws_cognito_user_pool_client.cli, provider
│ "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value: .region: was
│ cty.StringVal("us-east-1"), but now null.

│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Sample Terraform Configuration

Click to expand configuration
resource "aws_cognito_user_pool_client" "cli" {
  name         = "cli"
  user_pool_id = aws_cognito_user_pool.users_pool.id

  allowed_oauth_flows                  = ["code"]
  allowed_oauth_flows_user_pool_client = true
  allowed_oauth_scopes                 = ["openid", "email", "profile"]
  generate_secret                      = false

  callback_urls = [
    "http://localhost:53682/callback"
  ]
  logout_urls = [
    "http://localhost:53682/logout"
  ]

  supported_identity_providers = ["COGNITO"]

  access_token_validity  = 1
  id_token_validity      = 1
  refresh_token_validity = 30
  token_validity_units {
    access_token  = "hours"
    id_token      = "hours"
    refresh_token = "days"
  }
  explicit_auth_flows = [
    "ALLOW_USER_PASSWORD_AUTH",
    "ALLOW_CUSTOM_AUTH",
    "ALLOW_REFRESH_TOKEN_AUTH"
  ]
}

Steps to Reproduce

  1. Apply the configuration

Debug Logging

Click to expand log output

GenAI / LLM Assisted Development

n/a

Important Facts and References

No response

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

Labels

beta-feedbackIssues providing feedback on beta releases.bugAddresses a defect in current functionality.prioritizedPart of the maintainer teams immediate focus. To be addressed within the current quarter.service/cognitoidpIssues and PRs that pertain to the cognitoidp service.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions