Skip to content

r/aws_bedrockagentcore_api_key_credential_provider: add external secret support - #325

Merged
erhancagirici merged 6 commits into
upjet-v6.55.0from
feat/bedrock-ac-cred-provider-cms
Aug 20, 2026
Merged

r/aws_bedrockagentcore_api_key_credential_provider: add external secret support#325
erhancagirici merged 6 commits into
upjet-v6.55.0from
feat/bedrock-ac-cred-provider-cms

Conversation

@erhancagirici

@erhancagirici erhancagirici commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Cherry-pick unmerged upstream PR 48629 for supporting customer-managed Secrets Manager secrets in aws_bedrockagentcore_api_key_credential_provider

Test manifest:

apiVersion: bedrockagentcore.aws.upbound.io/v1beta1
kind: APIKeyCredentialProvider
metadata:
  annotations:
    meta.upbound.io/example-id: bedrockagentcore/v1beta1/apikeycredentialprovider
  labels:
    testing.upbound.io/example-name: apikeycredentialprovider-cms
  name: apikeycredentialprovider-cms
spec:
  forProvider:
    region: us-west-2
    apiKeySecretSource: EXTERNAL
    apiKeySecretConfig:
      secretIdSelector:
        matchLabels:
          testing.upbound.io/example-name: apikeycredentialprovider-cms
      jsonKey: test
    tags:
      Environment: Demo
---
apiVersion: secretsmanager.aws.upbound.io/v1beta1
kind: Secret
metadata:
  name: example-cms
  annotations:
    uptest.upbound.io/disable-import: "true"
    meta.upbound.io/example-id: bedrockagentcore/v1beta1/apikeycredentialprovider
  labels:
    testing.upbound.io/example-name: apikeycredentialprovider-cms
spec:
  forProvider:
    name: example-${Rand.RFC1123Subdomain}
    region: us-west-2
    recoveryWindowInDays: 0
---
apiVersion: secretsmanager.aws.upbound.io/v1beta1
kind: SecretVersion
metadata:
  name: example-cms-version
  annotations:
    uptest.upbound.io/disable-import: "true"
    meta.upbound.io/example-id: bedrockagentcore/v1beta1/apikeycredentialprovider
  labels:
    testing.upbound.io/example-name: apikeycredentialprovider-cms
spec:
  forProvider:
    region: us-west-2
    secretIdSelector:
      matchLabels:
        testing.upbound.io/example-name: apikeycredentialprovider-cms
    secretStringSecretRef:
      key: demo
      name: example-secret-version
      namespace: upbound-system
---
apiVersion: v1
kind: Secret
metadata:
  name: example-secret-version
  namespace: upbound-system
type: Opaque
stringData:
  demo: '{"test": "Test12345!"}'

…y-input combinations

The UpdateApiKeyCredentialProvider API rejects switching the secret source
between MANAGED and EXTERNAL, so derive the effective source from
configuration in ModifyPlan and force replacement. Deriving from config is
required because api_key_secret_source is Optional+Computed: when removed
from configuration, UseStateForUnknown keeps the prior value and no diff
would appear.

Also reject invalid combinations offline in ValidateConfig instead of at
Create time: api_key/api_key_wo conflict with api_key_secret_source =
EXTERNAL, and api_key_secret_config requires it.
@github-actions

Copy link
Copy Markdown

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • 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 documentation Improvements or additions to documentation size/XL tests labels Aug 19, 2026

@ulucinar ulucinar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @erhancagirici. Could you please add the Crossplane provider manifest and the provider test image you used to test the implementation to the PR description?

@erhancagirici
erhancagirici merged commit 0520d78 into upjet-v6.55.0 Aug 20, 2026
55 of 88 checks passed
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 size/XL tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants