aws_bedrockagentcore_agent_runtime: Add platform_version argument

Author: drewmullenCreated Sep 18, 2026Updated Sep 18, 2026
Labelsenhancementneeds-triageservice/bedrockagentcore

Description

Amazon Bedrock AgentCore Runtime now supports a platformVersion field (V1 | V2) on the CreateAgentRuntime, UpdateAgentRuntime, and GetAgentRuntime APIs. V2 starts agents from a prepared snapshot, giving consistent cold starts and usage-based billing.

The aws_bedrockagentcore_agent_runtime resource currently has no way to set this, so:

  • every Terraform-managed agent runtime is created on V1, and
  • a runtime moved to V2 outside of Terraform cannot be represented in configuration.

Proposal

Add a platform_version argument:

  • Optional + Computed string, valid values V1 and V2.
  • Updatable in place. The API supports moving a runtime between V1 and V2 via UpdateAgentRuntime.
  • When omitted, the API default (V1) applies on create, and the runtime's current value is retained on update. Existing configurations and state therefore see no diff.

Implementation notes

  • Requires github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol >= v1.67.0 (2026-09-15), which added PlatformVersion. The provider currently pins v1.66.0.
  • The SDK models the field as *string with no enum type, so validation needs an explicit stringvalidator.OneOf("V1", "V2").
  • Neither CreateAgentRuntimeOutput nor UpdateAgentRuntimeOutput returns platformVersion; the value must be read back from GetAgentRuntime.
  • V2 create/update takes minutes rather than seconds. The existing waiters already poll GetAgentRuntime until READY (failing on CREATE_FAILED / UPDATE_FAILED), and the 30m default timeouts are sufficient.
  • V2 is only available in a subset of Regions, so acceptance tests need a Region pre-check.
  • The documentation should note the longer V2 provisioning time and the smaller environment-variable size limit on V2.

Affected Resource(s) or Data Source(s)

  • aws_bedrockagentcore_agent_runtime

Potential Terraform Configuration

hcl
resource "aws_bedrockagentcore_agent_runtime" "example" {
  agent_runtime_name = "example"
  role_arn           = aws_iam_role.example.arn
  platform_version   = "V2"

  agent_runtime_artifact {
    container_configuration {
      container_uri = "${aws_ecr_repository.example.repository_url}:latest"
    }
  }

  network_configuration {
    network_mode = "PUBLIC"
  }
}

References

Would you like to implement the enhancement?

No

Source: hashicorp/terraform-provider-aws