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

SKIP UPGRADE TEST #259

Closed
wants to merge 2 commits into from
Closed

SKIP UPGRADE TEST #259

wants to merge 2 commits into from

Conversation

Vipin654
Copy link
Contributor

Description

Scope Policy to Exact KMS Key
Git Issue

Release required?

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

Scope Policy to Exact KMS Key

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

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 comments (please also update the title of the PR)

module "crn_parser" {
source = "terraform-ibm-modules/common-utilities/ibm//modules/crn-parser"
version = "1.1.0"
crn = var.kms_key_crn
Copy link
Member

Choose a reason for hiding this comment

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

kms_key_crn is optional. Meaning it could have a value of null. Meaning this module call would fail. You need to add a count around it to ensure its only called if kms_key_crn is not null

main.tf Outdated
@@ -7,15 +13,11 @@ locals {
validate_kms_values = !var.kms_encryption_enabled && (var.existing_kms_instance_guid != null || var.kms_key_crn != null) ? tobool("When passing values for var.existing_kms_instance_guid or/and var.kms_key_crn, you must set var.kms_encryption_enabled to true. Otherwise unset them to use default encryption") : true
# tflint-ignore: terraform_unused_declarations
validate_kms_vars = var.kms_encryption_enabled && (var.existing_kms_instance_guid == null || var.kms_key_crn == null) ? tobool("When setting var.kms_encryption_enabled to true, a value must be passed for var.existing_kms_instance_guid and var.kms_key_crn") : true
kms_service = module.crn_parser.service_name
kms_account_id = module.crn_parser.account_id
kms_key_id = module.crn_parser.resource
Copy link
Member

Choose a reason for hiding this comment

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

again your going to need ternary logic here, as the crn parser module wshould only be called if kms_key_crn is not null.
If it is null, just default these locals to null too as they wont be used

@Vipin654
Copy link
Contributor Author

/run pipeline

@ocofaigh
Copy link
Member

@Vipin654 please do not commit updates to common-dev-assets git submodule in your PRs, as you will end up with a conflict (like you have now) since we have other renovate automation that handles updating the git submodule in the repos.

@Vipin654
Copy link
Contributor Author

/run pipeline

@Vipin654
Copy link
Contributor Author

/run pipeline

@Vipin654 Vipin654 closed this Dec 30, 2024
@Vipin654 Vipin654 deleted the scope branch December 30, 2024 07:25
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