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

add skipping variable #644

Merged
merged 23 commits into from
Jan 10, 2024
Merged

add skipping variable #644

merged 23 commits into from
Jan 10, 2024

Conversation

Aayush-Abhyarthi
Copy link
Contributor

@Aayush-Abhyarthi Aayush-Abhyarthi commented Nov 29, 2023

Description

#573

Release required?

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

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.

variables.tf 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.

@Aayush-Abhyarthi I think we both agree on the renaming as per https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone/pull/644/files#r1414474051

Bare in mind, the new variable will need to be exposed in all of the patterns

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 latest comments

variables.tf Outdated
@@ -1497,10 +1497,16 @@ variable "vpc_placement_groups" {
# s2s variables
##############################################################################

variable "add_kms_block_storage_s2s" {
variable "skip_kms_block_storage_s2s_auth_policy" {
description = "Whether to create a service-to-service authorization between block storage and the key management service."
Copy link
Member

Choose a reason for hiding this comment

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

since the variable has changed, the description needs to be updated to: "Whether to skip the creation of a service-to-service authorization policy between block storage and the key management service."

Copy link
Member

Choose a reason for hiding this comment

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

You will need to update the description for this variable everywhere it exists too

variables.tf Outdated
}

variable "skip_all_s2s_auth_policies" {
description = "Set it to true to create the authorization policy."
Copy link
Member

Choose a reason for hiding this comment

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

"Whether to skip the creation of all of the service-to-service authorization policies. If setting to true, policies must be in place on the account before provisioning."

Copy link
Member

Choose a reason for hiding this comment

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

You will need to update the description for this variable everywhere you added it too

patterns/vsi/variables.tf Show resolved Hide resolved
patterns/vsi/module/variables.tf Outdated Show resolved Hide resolved
patterns/vpc/variables.tf Show resolved Hide resolved
patterns/vpc/module/variables.tf Outdated Show resolved Hide resolved
patterns/roks/variables.tf Show resolved Hide resolved
patterns/roks/module/variables.tf Outdated Show resolved Hide resolved
patterns/mixed/variables.tf Outdated Show resolved Hide resolved
@@ -43,7 +43,7 @@ locals {
module "kms_to_block_storage" {
source = "../list_to_map"
list = [
for instance in(var.add_kms_block_storage_s2s ? ["block-storage"] : []) :
for instance in(var.skip_kms_block_storage_s2s_auth_policy ? ["block-storage"] : []) :
Copy link
Member

Choose a reason for hiding this comment

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

The logic needs to be reversed now since skip_kms_block_storage_s2s_auth_policy will have value of false now

@ocofaigh
Copy link
Member

ocofaigh commented Dec 7, 2023

@Aayush-Abhyarthi A PR was merged yesterday that has a reference to the add_kms_block_storage_s2s variable in /patterns/vsi-extension/README.md - please update that as part of this PR too since we are changing the variable name. Thanks

@ocofaigh
Copy link
Member

@Aayush-Abhyarthi Can you resolve conflicts? Is there anything remaining in this PR? If PR is ready for review, can you remove the [DO NOT MERGE] text from the title? Thanks

@Aayush-Abhyarthi
Copy link
Contributor Author

/run pipeline

@Aayush-Abhyarthi Aayush-Abhyarthi changed the title [DO NOT MERGE]add skipping variable add skipping variable Dec 13, 2023
@ocofaigh
Copy link
Member

/run pipeline

@ocofaigh ocofaigh requested a review from toddgiguere December 14, 2023 15:42
@ocofaigh
Copy link
Member

@toddgiguere any further concerns with this PR? I'm thinking it might be good now?

toddgiguere
toddgiguere previously approved these changes Dec 14, 2023
@ocofaigh
Copy link
Member

/run pipeline

key_management = lookup(local.override[local.override_type], "key_management", local.config.key_management)
atracker = lookup(local.override[local.override_type], "atracker", local.config.atracker)
clusters = lookup(local.override[local.override_type], "clusters", local.config.clusters)
wait_till = lookup(local.override[local.override_type], "wait_till", "IngressReady")
Copy link
Member

Choose a reason for hiding this comment

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

A change was made on this line recently and look like you do not have it in your branch, so hence TFLint is failing. Can you replace "IngressReady" with var.wait_till

key_management = lookup(local.override[local.override_type], "key_management", local.config.key_management)
atracker = lookup(local.override[local.override_type], "atracker", local.config.atracker)
clusters = lookup(local.override[local.override_type], "clusters", local.config.clusters)
wait_till = lookup(local.override[local.override_type], "wait_till", "IngressReady")
Copy link
Member

Choose a reason for hiding this comment

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

key_management = lookup(local.override[local.override_type], "key_management", local.config.key_management)
atracker = lookup(local.override[local.override_type], "atracker", local.config.atracker)
clusters = lookup(local.override[local.override_type], "clusters", local.config.clusters)
wait_till = lookup(local.override[local.override_type], "wait_till", "IngressReady")
Copy link
Member

Choose a reason for hiding this comment

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

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.

@Aayush-Abhyarthi spotted another change needed

@Aayush-Abhyarthi
Copy link
Contributor Author

/run pipeline

@ocofaigh
Copy link
Member

@Aayush-Abhyarthi You must have introduced a bug somewhere..

│ Error: Inconsistent conditional result types
│ 
│   on ../../service_authorizations.tf line 19, in resource "ibm_iam_authorization_policy" "policy":
│   19:   for_each                    = var.skip_all_s2s_auth_policies == true ? [] : local.authorization_policies
│     ├────────────────
│     │ local.authorization_policies is object with 6 attributes
│     │ var.skip_all_s2s_auth_policies is false
│ 
│ The true and false result expressions must have consistent types. The
│ 'true' value is tuple, but the 'false' value is object.
``

@Aayush-Abhyarthi
Copy link
Contributor Author

/run pipeline

@Aayush-Abhyarthi
Copy link
Contributor Author

/run pipeline

@Aayush-Abhyarthi
Copy link
Contributor Author

/run pipeline

@ocofaigh
Copy link
Member

ocofaigh commented Jan 8, 2024

Will run the pipeline once #670 is merged (since this PR will need a rebase then anyway)

@ocofaigh
Copy link
Member

ocofaigh commented Jan 8, 2024

@Aayush-Abhyarthi looks like there is now a conflict in this PR after rebase. Can you resolve it please. Hold off on running the pipeline though, as #677 is running now and will be merged first

@Aayush-Abhyarthi
Copy link
Contributor Author

/run pipeline

@ocofaigh
Copy link
Member

ocofaigh commented Jan 9, 2024

/run pipeline

ocofaigh
ocofaigh previously approved these changes Jan 9, 2024
@ocofaigh
Copy link
Member

The TestRunVSIQuickStartPatternSchematics test failed with Error: cannot add more than 20 gateways - Let me do some cleanup and re-run.

@ocofaigh
Copy link
Member

@Aayush-Abhyarthi There was another PR ready so I just merged it and now this has conflicts again. Can you please resolve, and I'll priortise this PR once conflicts addressed. Thanks

@Aayush-Abhyarthi
Copy link
Contributor Author

/run pipeline

@ocofaigh ocofaigh merged commit 7e68518 into main Jan 10, 2024
2 checks passed
@ocofaigh ocofaigh deleted the skip-s2s-auth-policy-creation branch January 10, 2024 14:19
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 5.11.0 🎉

The release is available on:

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