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

fix(init): #1049 fix problem that kms-key ref picks wrong metadata.name #1050

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

haarchri
Copy link
Member

@haarchri haarchri commented Jan 5, 2022

Signed-off-by: haarchri chhaar30@googlemail.com

Description of your changes

  • fixed following problem:

in kms alias:cannot create Alias in AWS: NotFoundException: Invalid keyId my-key
in rds dbcluster: KMSKeyNotAccessibleFault: The specified KMS key [rg-test-cluster-5bp8r-zzp65] does not exist, is not enabled or you do not have permissions to access it.

Fixes #902 #1049

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

created in one shot:

 apiVersion: kms.aws.crossplane.io/v1alpha1
 kind: Key
 metadata:
     name: my-key
 spec:
     deletionPolicy: Delete
     forProvider:
         region: us-west-2
         pendingWindowInDays: 21 
         tags:
         - tagKey: app
           tagValue: test
     providerConfigRef:
         name: example
---
apiVersion: kms.aws.crossplane.io/v1alpha1
kind: Alias
metadata:
    name: my-test
spec:
    deletionPolicy: Delete
    forProvider:
        region: us-west-2
        targetKeyIdRef:
            name: my-key
    providerConfigRef:
        name: example

NAME                                  READY   SYNCED   EXTERNAL-NAME
alias.kms.aws.crossplane.io/my-test   True    True     my-test

NAME                                READY   SYNCED   EXTERNAL-NAME
key.kms.aws.crossplane.io/my-key    True    True     34bf6b70-acc2-4bd0-80a0-184dbdf971d8

@haarchri haarchri closed this Jan 5, 2022
@haarchri haarchri reopened this Jan 5, 2022
@haarchri
Copy link
Member Author

haarchri commented Jan 5, 2022

e2e-test was failing because of #1052

…name

Signed-off-by: haarchri <chhaar30@googlemail.com>
Copy link
Member

@muvaf muvaf left a comment

Choose a reason for hiding this comment

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

Thanks!

@haarchri haarchri merged commit 6cba767 into crossplane-contrib:master Jan 6, 2022
@haarchri haarchri deleted the fix/kms-key-alias branch January 6, 2022 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RDS DBCluster provisioning with composite KMS Key fails with 'The specified KMS key [...] does not exist'
2 participants