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

feat: expose the ability to use default encryption keys in fscloud submodule + DA #330

Merged
merged 12 commits into from
Nov 14, 2024

Conversation

jor2
Copy link
Member

@jor2 jor2 commented Nov 11, 2024

Description

Expose provider visibility in the DA #320
Add workaround to ignore groups config when provisioning instance using backup CRN #324
Scope KMS policy to the exact KMS key #321

Release required?

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

Expose the ability to use default encryption keys in fscloud submodule + DA

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.

@jor2 jor2 self-assigned this Nov 11, 2024
@jor2
Copy link
Member Author

jor2 commented Nov 11, 2024

based off this pr

@jor2
Copy link
Member Author

jor2 commented Nov 11, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Nov 11, 2024

Skipping upgrade tests, only seen this fail

TestRunStandardUpgradeSolution 2024-11-11T20:49:28Z logger.go:66: │ Error: Value for undeclared variable
TestRunStandardUpgradeSolution 2024-11-11T20:49:28Z logger.go:66: │ 
TestRunStandardUpgradeSolution 2024-11-11T20:49:28Z logger.go:66: │ A variable named "provider_visibility" was assigned on the command line,
TestRunStandardUpgradeSolution 2024-11-11T20:49:28Z logger.go:66: │ but the root module does not declare a variable of that name. To use this
TestRunStandardUpgradeSolution 2024-11-11T20:49:28Z logger.go:66: │ value, add a "variable" block to the configuration.
TestRunStandardUpgradeSolution 2024-11-11T20:49:28Z logger.go:66:

@jor2
Copy link
Member Author

jor2 commented Nov 11, 2024

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

some minor comments, and also please add the fix for #324 as discussed

tests/pr_test.go Outdated Show resolved Hide resolved
modules/fscloud/variables.tf Outdated Show resolved Hide resolved
@jor2
Copy link
Member Author

jor2 commented Nov 12, 2024

/run pipeline

@jor2 jor2 requested a review from ocofaigh November 12, 2024 11:33
shemau
shemau previously approved these changes Nov 12, 2024
Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

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

LGTM. The restore/group changes look good to.

The schematics test failed.

@shemau
Copy link
Contributor

shemau commented Nov 12, 2024

 2024/11/12 11:49:21 Terraform apply |   CreateSecretGroupWithContext failed: request_id: '77e1104f-3b52-a9fb-5499-4adc6343bb1c' path: 'manage/v2/groups' operation: 'create' a secret group with name 'els-sr-da-secret-group' already exists. [secrets-manager.04126E]

There seems to be a test collision if/when tests run in parallel the prefix is missing.

@jor2
Copy link
Member Author

jor2 commented Nov 12, 2024

/run pipeline

@ocofaigh
Copy link
Member

@jor2 Still the same issue:

2024/11/12 16:18:21 Terraform apply |   CreateSecretGroupWithContext failed: request_id: 'bb136db9-014a-1488-9abf-ff03e560f000' path: 'manage/v2/groups' operation: 'create' a secret group with name 'els-sr-da-secret-group' already exists. [secrets-manager.04126E]

Somewhere a prefix value is not being passed and hence the secret name is clashing. Can you try find where and ensure prefix is being used

@ocofaigh
Copy link
Member

Seems to be related to service credentials: with module.secrets_manager_service_credentials[0].module.secret_groups["els-sr-da-secret-group"].ibm_sm_secret_group.secret_group,

@ocofaigh
Copy link
Member

FYI, there was also a bug in terraform-ibm-modules/terraform-ibm-icd-postgresql#521 - I'm working on a fix so you will need that fix too

@jor2
Copy link
Member Author

jor2 commented Nov 12, 2024

Seems to be related to service credentials: with module.secrets_manager_service_credentials[0].module.secret_groups["els-sr-da-secret-group"].ibm_sm_secret_group.secret_group,

its because of this, any reason for it? https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/blob/main/tests/pr_test.go#L154

@jor2
Copy link
Member Author

jor2 commented Nov 12, 2024

/run pipeline

@ocofaigh
Copy link
Member

FYI, there is currently an outage that is impacting tests

@jor2
Copy link
Member Author

jor2 commented Nov 12, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Nov 13, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Nov 13, 2024

/run pipeline

@jor2 jor2 requested a review from shemau November 13, 2024 21:35
@jor2
Copy link
Member Author

jor2 commented Nov 13, 2024

/run pipeline

@jor2
Copy link
Member Author

jor2 commented Nov 13, 2024

/run pipeline

Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

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

LGTM

I focus on the restore/group logic and that is fine for now.

@ocofaigh ocofaigh merged commit 28bef1e into main Nov 14, 2024
2 checks passed
@ocofaigh ocofaigh deleted the feat-320 branch November 14, 2024 11:05
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

daniel-butler-irl pushed a commit that referenced this pull request Nov 18, 2024
…mly generated keys for disk and backups encryption in the fscloud submodule, and the DA using new input `use_ibm_owned_encryption_key`<br>* Exposed the ability to set the IBM terraform provider visability in the DA using new input `provider_visibility` ([Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints))<br>* updated the scope of the KMS auth policy that is created so the policy is now scoped to the exact KMS key. If upgrading from a previous version, this will destroy the old policy, however the new one will be created before its destroyed to ensure no impact to every day services.<br>* Fixed an issue in the original ICD hosting model logic for conditionally including the group block during a database restore operation (#330)
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