Skip to content

r/aws_bedrockagentcore_oauth2_credential_provider: add token_endpoint_auth_methods#2

Open
aidandaly24 wants to merge 3 commits into
jesseturner21:agentcore/oauth2_credential_providerfrom
aidandaly24:agentcore/oauth2-token-endpoint-auth-methods
Open

r/aws_bedrockagentcore_oauth2_credential_provider: add token_endpoint_auth_methods#2
aidandaly24 wants to merge 3 commits into
jesseturner21:agentcore/oauth2_credential_providerfrom
aidandaly24:agentcore/oauth2-token-endpoint-auth-methods

Conversation

@aidandaly24

Copy link
Copy Markdown
Collaborator

Description

Adds token_endpoint_auth_methods to the custom provider's authorization_server_metadata block. This is Oauth2AuthorizationServerMetadata.tokenEndpointAuthMethods in the SDK (TokenEndpointAuthMethodsType: a list of 1–2 TokenAuthMethod strings, client_secret_post / client_secret_basic) — the last unmodeled Create-input field on this branch. With it, the resource reaches full CreateOauth2CredentialProvider input parity against the pinned SDK (v1.45.2).

Modeled as a Set (consistent with the sibling response_types), Optional, with SizeBetween(1, 2) and a per-element regex validator mirroring the SDK's TokenAuthMethod pattern. The value round-trips via GetOauth2CredentialProvider and is auto-wired through AutoFlex (matching Go field name), so no hand-rolled Expand/Flatten was needed.

Targeting this branch (rather than a standalone PR against main) so it folds into hashicorp#48517.

Relations

Relates hashicorp#48517

Output from Acceptance Testing

$ make testacc TESTS=TestAccBedrockAgentCoreOAuth2CredentialProvider_authorizationServerMetadata PKG=bedrockagentcore
--- PASS: TestAccBedrockAgentCoreOAuth2CredentialProvider_authorizationServerMetadata (24.72s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagentcore   24.899s

Also verified offline: an invalid method (not_a_valid_method) is rejected at terraform validatevalue must match regular expression '^(client_secret_post|client_secret_basic)$'.

…_auth_methods

Oauth2AuthorizationServerMetadata has a tokenEndpointAuthMethods member
(TokenEndpointAuthMethodsType: list of 1-2 TokenAuthMethod strings,
client_secret_post / client_secret_basic) that was the last unmodeled
Create-input field on the custom provider's authorization_server_metadata
block. Add it as a Set attribute (mirroring response_types), with
SizeBetween(1,2) and a per-element regex validator mirroring the SDK
pattern. The value round-trips via GetOauth2CredentialProvider and is
auto-wired through AutoFlex (matching Go field name).

Verified: authorizationServerMetadata acceptance test passes against real
AWS with both methods set and import-verified; an invalid method is
rejected offline by `terraform validate`.
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests service/bedrockagentcore size/S labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

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.

…of token_endpoint_auth_methods

Extend the authorizationServerMetadata acceptance test with an update step
(two methods -> one, ExpectResourceAction Update) and a clear step
(set->unset, ExpectResourceAction Update, count 0) so the mutate and
clearing transitions of token_endpoint_auth_methods have a durable
regression guard rather than only create+import coverage. Parameterize the
config helper for the methods value and add a no-methods variant for the
clear step.

All 4 steps pass against real AWS (create 2 -> update to 1 -> clear ->
import); no perpetual diff or inconsistent-result on the clearing step.
@github-actions github-actions Bot added size/M and removed size/S labels Jul 8, 2026
…D032 in provider-config list

The included-provider `-> **Note:**` callout was placed between the
`included_oauth2_provider_config` and `linkedin_oauth2_provider_config`
bullets, splitting the provider-config list so the resumed items were not
preceded by a blank line (markdownlint MD032/blanks-around-lists). Keep the
list contiguous and move the note to immediately after it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation service/bedrockagentcore size/M tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant