Skip to content

aws_bedrockagent_agent_alias produces inconsistent result: routing_configuration.agent_version changes from null to string after apply #43406

@cmmo

Description

@cmmo

Terraform and AWS Provider Version

Terraform Version
  1.11.4

AWS Provider Version
  ~> 6.3

Affected Resource(s) or Data Source(s)

  • aws_bedrockagent_agent_alias

Expected Behavior

The provider should not change the agent_version value from null to a string after apply without being
explicitly configured.

Actual Behavior

The provider changes routing_configuration[0].agent_version from null to a string value (e.g., "37", "24")
after apply, causing inconsistent state.

Relevant Error/Panic Output


│ Error: Provider produced inconsistent result after apply

│ When applying changes to module.aifp_financial_bedrock_agent.aws_bedrockagent_agent_alias.this[0], provider
│ "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value: .routing_configuration[0].agent_version: was null, but now
│ cty.StringVal("37").

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


│ Error: Provider produced inconsistent result after apply

│ When applying changes to module.aifp_general_bedrock_agent.aws_bedrockagent_agent_alias.this[0], provider "provider[\"registry.terraform.io/hashicorp/aws\"]"
│ produced an unexpected new value: .routing_configuration[0].agent_version: was null, but now cty.StringVal("24").

│ 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_bedrockagent_agent_alias" "this" {
    agent_alias_name = "example-alias"
    agent_id         = "AGENT123"
    description      = "Example agent alias"
    
    routing_configuration {
      agent_version = null  # or not specified
    }
  }

Steps to Reproduce

  1. Create aws_bedrockagent_agent_alias with routing_configuration.agent_version as null
  2. Run terraform apply
  3. Observer the inconsistent result error

Debug Logging

Click to expand log output
  Error: Provider produced inconsistent result after apply

  When applying changes to module.aifp_financial_bedrock_agent.aws_bedrockagent_agent_alias.this[0], provider
   "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value:
  .routing_configuration[0].agent_version: was null, but now cty.StringVal("37").

GenAI / LLM Assisted Development

n/a

Important Facts and References

No response

Would you like to implement a fix?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/bedrockagentIssues and PRs that pertain to the bedrockagent service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions