Skip to content

Use ARN extractor for Cloudwatch log group kms_key_id reference - #1675

Merged
turkenf merged 4 commits into
crossplane-contrib:mainfrom
finlaysawyer:cloudwatch-group-kms
Feb 6, 2025
Merged

Use ARN extractor for Cloudwatch log group kms_key_id reference#1675
turkenf merged 4 commits into
crossplane-contrib:mainfrom
finlaysawyer:cloudwatch-group-kms

Conversation

@finlaysawyer

@finlaysawyer finlaysawyer commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

Description of your changes

Currently, when specifying a reference to an AWS KMS Key in a Cloudwatch logs Group, it tries to use the KMS Key ID which does not work. It should use the ARN of the resource.

Despite the confusing parameter name, the TF provider docs do state this here:

kms_key_id - (Optional) The ARN of the KMS Key to use when encrypting log data.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

I have added an additional E2E test to cover this behaviour, let me know if this is suitable.

https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/13188245301

Signed-off-by: Finlay Sawyer <18363677+finlaysawyer@users.noreply.github.com>
@finlaysawyer

Copy link
Copy Markdown
Contributor Author

/test-examples="examples/cloudwatchlogs/v1beta1/group-with-kms.yaml"

@finlaysawyer
finlaysawyer marked this pull request as ready for review February 6, 2025 19:39
@turkenf

turkenf commented Feb 6, 2025

Copy link
Copy Markdown
Collaborator

/test-examples="examples/cloudwatchlogs/v1beta1/group-with-kms.yaml"

finlaysawyer and others added 2 commits February 6, 2025 20:11
Signed-off-by: Finlay Sawyer <18363677+finlaysawyer@users.noreply.github.com>
@turkenf

turkenf commented Feb 6, 2025

Copy link
Copy Markdown
Collaborator

/test-examples="examples/cloudwatchlogs/v1beta1/group-with-kms.yaml"

Signed-off-by: Finlay Sawyer <18363677+finlaysawyer@users.noreply.github.com>
@finlaysawyer

Copy link
Copy Markdown
Contributor Author

Forgot the key policy, that should fix up the e2e

@turkenf

turkenf commented Feb 6, 2025

Copy link
Copy Markdown
Collaborator

/test-examples="examples/cloudwatchlogs/v1beta1/group-with-kms.yaml"

@turkenf turkenf 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.

Hey @finlaysawyer,

Congratulations on your first contribution! 🎉 Thanks for this fix—it’s a great improvement. LGTM! 🚀

@turkenf
turkenf merged commit 2ea2137 into crossplane-contrib:main Feb 6, 2025
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.

2 participants