Skip to content

Conversation

@shemau
Copy link
Contributor

@shemau shemau commented Apr 29, 2025

Description

The following variables are named inconsistently/incorrectly:

  • skip_mongodb_secret_manager_auth_policy
  • admin_pass_secret_manager_secret_group
  • use_existing_admin_pass_secret_manager_secret_group
  • admin_pass_secret_manager_secret_name

They are correctly renamed for Secrets Manager

  • skip_mongodb_secrets_manager_auth_policy
  • admin_pass_secrets_manager_secret_group
  • use_existing_admin_pass_secrets_manager_secret_group
  • admin_pass_secrets_manager_secret_name

Is this a minor release, or a major release changing inputs in the DA?

Release required?

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

Inputs to the deployable architecture need updating. The following inputs are corrected, adding an s to make it secrets_manager.

  • skip_mongodb_secret_manager_auth_policy becomes skip_mongodb_secrets_manager_auth_policy
  • admin_pass_secret_manager_secret_group becomes admin_pass_secrets_manager_secret_group
  • use_existing_admin_pass_secret_manager_secret_group becomes use_existing_admin_pass_secrets_manager_secret_group
  • admin_pass_secret_manager_secret_name becomes admin_pass_secrets_manager_secret_name

If the DA is being consumed as code, terraform inputs will need updating before plan and apply can be run.
If the DA is being consumed via projects/schematics the old value with have to be put in the new property in the UI.

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 Apr 29, 2025

/run pipeline

akocbek
akocbek previously approved these changes Apr 29, 2025
@shemau
Copy link
Contributor Author

shemau commented May 1, 2025

/run pipeline

locals {
create_secret_manager_auth_policy = var.skip_mongodb_secret_manager_auth_policy || var.existing_secrets_manager_instance_crn == null ? 0 : 1
## Variable validation (approach based on https://github.com/hashicorp/terraform/issues/25609#issuecomment-1057614400)
# tflint-ignore: terraform_unused_declarations
Copy link
Member

Choose a reason for hiding this comment

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

These validations should be part of the variables.tf. See example: https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager/blob/main/variables.tf#L69

Copy link
Contributor

Choose a reason for hiding this comment

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

yes good point since module and examples now require tf >=1.9.0 we should use cross variable validation here

Copy link
Contributor Author

@shemau shemau May 2, 2025

Choose a reason for hiding this comment

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

I will push a change.

The existing validation in main at L320 is already present (duplicated) in variables at L344
The existing validation in main at L322 is already present (duplicated) in variables at L364
The existing validation in main at L324 is already present (duplicated) in variables at L383

It appears the new validation was added as part of the 1.9 upgrade, but this occurrence, which was not at the top of the file was overlooked during a merge conflict resolution and got restored by mistake. Good catch.

@rajatagarwal-ibm
Copy link
Member

Is this a minor release, or a major release changing inputs in the DA?

I think it should be a minor release. @ocofaigh can confirm.

@shemau
Copy link
Contributor Author

shemau commented May 2, 2025

/run pipeline

@ocofaigh
Copy link
Contributor

ocofaigh commented May 2, 2025

/run pipeline

Copy link
Contributor

@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.

It seems we have a test gap - there is no test for the complete example??

@shemau
Copy link
Contributor Author

shemau commented May 6, 2025

/run pipeline

@shemau
Copy link
Contributor Author

shemau commented May 7, 2025

/run pipeline

1 similar comment
@shemau
Copy link
Contributor Author

shemau commented May 7, 2025

/run pipeline

@ocofaigh ocofaigh merged commit f7139c4 into main May 7, 2025
2 checks passed
@ocofaigh ocofaigh deleted the da-inputs branch May 7, 2025 11:06
@terraform-ibm-modules-ops
Copy link
Contributor

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

6 participants