Skip to content

r/aws_bedrockagentcore_gateway_target: add inference target configuration#48705

Open
jesseturner21 wants to merge 6 commits into
hashicorp:mainfrom
jesseturner21:agentcore/gateway-target-inference
Open

r/aws_bedrockagentcore_gateway_target: add inference target configuration#48705
jesseturner21 wants to merge 6 commits into
hashicorp:mainfrom
jesseturner21:agentcore/gateway-target-inference

Conversation

@jesseturner21

Copy link
Copy Markdown

Description

Adds the inference target configuration block to aws_bedrockagentcore_gateway_target — the third member of the top-level target-configuration union (alongside http and mcp). Supports both the connector and provider variants; the provider variant exposes endpoint, model_mapping (provider_prefix with separator / strip), and operations (path, provider_path, models). Maps to InferenceTargetConfiguration in the AgentCore Control API.

Source

  • Go SDK: aws/aws-sdk-go-v2 @ 8881653298eb2d13cc8b60910bd7c2e8b6642df4 (service/bedrockagentcorecontrol, InferenceTargetConfiguration / InferenceProviderTargetConfiguration)

Testing

$ TF_ACC=1 go test -v -timeout 60m ./internal/service/bedrockagentcore/ \
  -run 'TestAccBedrockAgentCoreGatewayTarget_targetConfigurationInference'
=== RUN   TestAccBedrockAgentCoreGatewayTarget_targetConfigurationInference
=== PAUSE TestAccBedrockAgentCoreGatewayTarget_targetConfigurationInference
=== CONT  TestAccBedrockAgentCoreGatewayTarget_targetConfigurationInference
--- PASS: TestAccBedrockAgentCoreGatewayTarget_targetConfigurationInference (44.88s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagentcore	45.048s

Caveats for reviewers

  • The inference target is a nested union with list-of-object members (operationsmodels); the Expand/Flatten round-trip is exercised by the acceptance test (live create + read) but warrants a review of the nested flattening.

@github-actions

Copy link
Copy Markdown
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions Bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/bedrockagentcore Issues and PRs that pertain to the bedrockagentcore service. size/XL Managed by automation to categorize the size of a PR. labels Jun 30, 2026
@jesseturner21 jesseturner21 marked this pull request as ready for review July 1, 2026 22:55
@jesseturner21 jesseturner21 requested a review from a team as a code owner July 1, 2026 22:55
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 2, 2026
…ix.strip and mcp endpoint validator bugs

- provider_prefix.strip is Optional+Computed with a false default. The SDK models
  ProviderPrefix.Strip as a non-pointer bool that the service defaults to false
  and always returns from Get, so a plain Optional produced "Provider produced
  inconsistent result after apply" (planned null, but now cty.False) on any
  inference target whose provider_prefix omitted strip, tainting the resource.
  Optional+Computed+booldefault.StaticBool(false) absorbs the server value.
- Anchor the mcp_server endpoint validator to ^https://.+ (was https://.*).
  Unanchored, RegexMatches accepted any string merely containing https:// (e.g.
  ftp://x-https://y); this mirrors the inference provider endpoint validator.

Add acctests: an inference provider_prefix without strip that must apply cleanly
and re-plan empty, and an mcp_server endpoint that must be rejected at plan time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/bedrockagentcore Issues and PRs that pertain to the bedrockagentcore service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants