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

feat: Scope Policy To Exact KMS Key #270

Merged
merged 5 commits into from
Jan 20, 2025
Merged

feat: Scope Policy To Exact KMS Key #270

merged 5 commits into from
Jan 20, 2025

Conversation

Vipin654
Copy link
Contributor

@Vipin654 Vipin654 commented Dec 30, 2024

Description

Scoping IAM Auth Policy to a specific key in the key protect instance instead of targeting the whole instance.
[Git Issue] : #243

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Scoping IAM Auth Policy to a specific key in the key protect instance instead of targeting the whole instance.

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@Vipin654
Copy link
Contributor Author

/run pipeline

@Vipin654 Vipin654 requested a review from Ak-sky January 9, 2025 09:06
@Vipin654
Copy link
Contributor Author

Vipin654 commented Jan 9, 2025

/run pipeline

@Ak-sky
Copy link
Member

Ak-sky commented Jan 10, 2025

@Vipin654, in PR template

  • please update the description
  • link git issue
  • Add release notes
    and
  • Paste the screenshot in the comment and the reason why skipping upgrade test
  • While commiting the code, provide commmit message in the format <ty­pe>: <de­scr­ipt­ion>, in this case
    feat: Scope Policy To Exact KMS Key. This helps in module release generation.

Copy link
Member

@Ak-sky Ak-sky left a comment

Choose a reason for hiding this comment

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

See comment #270 (comment).

@Vipin654 Vipin654 changed the title Scope Policy To Exact KMS Key eat: Scope Policy To Exact KMS Key Jan 13, 2025
@Vipin654 Vipin654 changed the title eat: Scope Policy To Exact KMS Key feat: Scope Policy To Exact KMS Key Jan 13, 2025
@Vipin654
Copy link
Contributor Author

@Ak-sky UPGRADE test has to be skipped because Auth Policy will be destroyed and re-created which is a breaking change. I have Pasted screenshot for your reference.
Screenshot 2025-01-15 at 10 40 51 AM

@Vipin654
Copy link
Contributor Author

/run pipeline

main.tf Show resolved Hide resolved
main.tf Outdated
count = (var.kms_encryption_enabled && !var.skip_iam_authorization_policy) ? 1 : 0
source_service_name = "appid"
source_resource_group_id = var.resource_group_id
description = "Allow all AppID instances in the given resource group reader access to KMS instance ${var.existing_kms_instance_guid}"
Copy link
Member

Choose a reason for hiding this comment

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

Description should be like this if source is scoped to resource group id.

Suggested change
description = "Allow all AppID instances in the given resource group reader access to KMS instance ${var.existing_kms_instance_guid}"
description = "Allow all AppID instances in the given resource group ${var.resource_group_id} to read the ${local.kms_service} key ${local.kms_key_id} from instance ${var.existing_kms_instance_guid}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Description has been changed.

@Vipin654
Copy link
Contributor Author

/run pipeline

Ak-sky
Ak-sky previously approved these changes Jan 18, 2025
main.tf Outdated Show resolved Hide resolved
Copy link
Member

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

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

see comment, there is a bug in count logic

@Vipin654
Copy link
Contributor Author

/run pipeline

@ocofaigh ocofaigh merged commit 78e9e63 into main Jan 20, 2025
2 checks passed
@ocofaigh ocofaigh deleted the scope-kms-key branch January 20, 2025 18:19
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants