Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot create KMS Key Alias by using selectors #1550

Closed
1 task done
niralmehtasb1 opened this issue Nov 1, 2024 · 1 comment
Closed
1 task done

[Bug]: Cannot create KMS Key Alias by using selectors #1550

niralmehtasb1 opened this issue Nov 1, 2024 · 1 comment
Labels
bug Something isn't working needs:triage

Comments

@niralmehtasb1
Copy link

niralmehtasb1 commented Nov 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

apiVersion: kms.aws.upbound.io/v1beta1
kind: Alias

Resource MRs required to reproduce the bug

key.kms.aws.upbound.io/v1beta1

Steps to Reproduce

  1. Create a MR key.kms.aws.upbound.io/v1beta1
  2. Create a MR Alias.kms.aws.upbound.io/v1beta1 and try to associate to the KMS Key created above using spec.forProvider.targetKeyIdRef

What happened?

Ideally it should be able to lookup KMSKeyId and populate Spec.ForProvider.TargetKeyID and create the MR Alias.kms.aws.upbound.io/v1beta1

Relevant Error Output Snippet

The Alias never gets created with an error message in the MR that says:

`message: 'cannot resolve references: mg.Spec.ForProvider.TargetKeyID: referenced
      field was empty (referenced resource may not yet be ready)'
    reason: ReconcileError
    status: "False"
`

Crossplane Version

v1.17.2

Provider Version

v1.14.0

Kubernetes Version

v1.31.0

Kubernetes Distribution

EKS

Additional Info

(Probably same as #1523)
No response

@niralmehtasb1 niralmehtasb1 added bug Something isn't working needs:triage labels Nov 1, 2024
@niralmehtasb1 niralmehtasb1 changed the title [Bug]: Cannot create KMS Key Alias by using selectors (Probably same as https://github.com/crossplane-contrib/provider-upjet-aws/issues/1523) [Bug]: Cannot create KMS Key Alias by using selectors Nov 4, 2024
@turkenf
Copy link
Collaborator

turkenf commented Dec 1, 2024

Hi @niralmehtasb1,

Thank you, I can easily create resources with the following MRs:

apiVersion: kms.aws.upbound.io/v1beta1
kind: Alias
metadata:
  annotations:
    meta.upbound.io/example-id: kms/v1beta1/alias
  labels:
    testing.upbound.io/example-name: a
  name: a
spec:
  forProvider:
    region: us-west-1
    targetKeyIdSelector:
      matchLabels:
        testing.upbound.io/example-name: a
---
apiVersion: kms.aws.upbound.io/v1beta1
kind: Key
metadata:
  annotations:
    meta.upbound.io/example-id: kms/v1beta1/alias
  labels:
    testing.upbound.io/example-name: a
  name: a
spec:
  forProvider:
    region: us-west-1

Please make sure your resources are in the same region and the label and selector match. I am closing this issue for now; if you still have problems, you can reopen the issue by sharing your MRs.

@turkenf turkenf closed this as completed Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage
Projects
None yet
Development

No branches or pull requests

2 participants