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: change the names of vpc_inbound_rule and vpc_outbound_rule #581

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Aashiq-J
Copy link
Member

@Aashiq-J Aashiq-J commented Jul 21, 2023

Description

Background: https://github.ibm.com/GoldenEye/issues/issues/4999#issuecomment-60308385
Modifying the current logic, where instead of using the index for cidr blocks alone, we could use indexes for both address_prefixes and cidr blocks. The modification can be done as follows:

   for address_index, address in data.ibm_is_vpc_address_prefixes.get_address_prefixes.address_prefixes : [
      for cidr_index, cidrs in var.network_cidrs != null ? var.network_cidrs : ["0.0.0.0/0"] :
      {
        name        = "ibmflow-allow-vpc-connectivity-inbound-${address_index}-${cidr_index}"

Types of changes in this PR

Changes that affect the core Terraform module or submodules

  • Bug fix
  • New feature
  • Dependency update

Changes that don't affect the core Terraform module or submodules

  • Examples or tests (addition or updates of examples or tests)
  • Documentation update
  • CI-related update (pipeline, etc.)
  • Other

Release required?

Identify the type of release. For information about the changes in a semantic versioning release, see Release versioning.

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

If a release is required, replace this text with information that users need to know about the release. Write the release notes to help users understand the changes, and include information about how to update from the previous version.

Your notes help the merger write the commit message for the PR that is published in the release notes for the module.

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.

Merge actions for mergers

  • Use a relevant conventional commit message that is based on the PR contents and any release notes provided by the PR author. The commit message determines whether a new version of the module is needed, and if so, which semver increment to use (major, minor, or patch).
  • Merge by using "Squash and merge".

@Aashiq-J
Copy link
Member Author

/run pipeline

@ocofaigh ocofaigh requested a review from toddgiguere July 21, 2023 10:39
@ocofaigh
Copy link
Member

Is there any impact to consumers when renaming an ACL rule?

@ocofaigh
Copy link
Member

ocofaigh commented Jul 21, 2023

The test failed with Resource(s) identified to be updated Name: network_acl Address: module.slz_vpc.ibm_is_network_acl.network_acl["vpc-acl"] Actions: [update] which is expected due to the nature of the change here. But what I want to ensure is that there is no disruption to the customer when doing this update. It doesn't do a destroy and re-create, so at least that is a good sign.

@Aashiq-J
Copy link
Member Author

@ocofaigh ,
I tested the upgrade test on local while keeping a watch on the acls.
The acls rules are being deleted and re-created with the new name in the ibmcloud side. There is like a 5 sec window in which the rules are re-created. While, on the terraform side only the state files is being updated with the new names.

@ocofaigh
Copy link
Member

@Aashiq-J Thanks for checking. I'm not sure we should roll this out until we find a way to update ACLs non disruptively. There is an internal issue tracking that effort already https://github.ibm.com/GoldenEye/issues/issues/4517
Feel free to leave a comment in it with your observations.

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