Skip to content

Conversation

@shemau
Copy link
Contributor

@shemau shemau commented Jan 27, 2025

Description

Bug fix. Keys need to referenced by key-ring-name.key-name. The wrong key ring and key names were being used.

This error may be on the main branch. IF it is, then the upgrade test will have to be skipped.

This is a test change, so no release will be required.

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.

@shemau
Copy link
Contributor Author

shemau commented Jan 27, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented Jan 27, 2025

This is happening in the upgrade test, because the main branch is broken. The key-ring name created is icd-mysql, the referenced index is just icd.

The upgrade will have to be skipped.

 TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: ╷
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │ Error: Invalid index
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │ 
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │   on main.tf line 115, in module "mysql_db":
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185:115:   kms_key_crn                  = module.key_protect_all_inclusive.keys["icd.${var.prefix}-mysql"].crn
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │     ├────────────────
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │     │ module.key_protect_all_inclusive.keys is object with 2 attributes
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │     │ var.prefix is "mysql-upg-lojce1"
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │ 
TestRunUpgradeCompleteExample 2025-01-27T17:55:40Z command.go:185: │ The given key does not identify an element in this collection value.

@shemau
Copy link
Contributor Author

shemau commented Jan 27, 2025

/run pipeline

1 similar comment
@shemau
Copy link
Contributor Author

shemau commented Jan 27, 2025

/run pipeline

@ocofaigh ocofaigh merged commit 01637aa into main Jan 28, 2025
2 checks passed
@ocofaigh ocofaigh deleted the index-bug branch January 28, 2025 14:48
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.6.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.

5 participants