-
Notifications
You must be signed in to change notification settings - Fork 22
OPCR-6: Customer Managed Key support for pro and active active subscriptions #635
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ba89624
chore: updating schema and go modules
burythehammer e2a015b
feat: routing through bool for cmk and writing tests
burythehammer 1df6bf4
test: cmek tests
burythehammer 1a8e459
feat: new pending status incorporated
burythehammer d3b53b3
test: starting to update resource so that it can have the cmk key upd…
burythehammer 3b2235c
chore: reorganising functions
burythehammer 8adafe4
chore: temporarily making them not force new on a new cloud provider
burythehammer a4e925a
fix: getting pro subs working with cmk update
burythehammer 6e1d65a
feat: output subscription principal info and custom force new logic f…
burythehammer 2c6cbfd
fix: cmk flag not correctly set to bool
burythehammer 8e51d13
fix: custom logic for regions now does attempt to destroy CMK resources
burythehammer 9f25066
fix: adding in extra safeguards against not supplying cmk in terraform
burythehammer 799ae16
test: changes expectations at end of test
burythehammer 957ca0d
fix: output now correctly renders in cmk flow
burythehammer 445868c
fix: better stability with waiting for subscriptions to be active vs …
burythehammer 76ec052
feat: active active subscription creation of cmk enabled subscription
burythehammer df3ea8f
feat: updates to the delete and read flow so that CMK is taken into a…
burythehammer e9a7861
feat: active active subscriptions now updatable with CMKs
burythehammer 6cffcd2
chore: bumping the rediscloud sdk version
burythehammer 1bc021f
chore: minor renaming
burythehammer f551b50
fix: updated go.sum
burythehammer d3cea0f
chore: tidying up unused function
burythehammer 01ef00c
docs: updating documentation and schema docs
burythehammer d29d92e
fix: adding cmk enabled check to updates on encryption key pending as…
burythehammer d07c893
fix: adding checkdestroys as required by tfproviderlint
burythehammer 24515a1
fix: fixes to essentials subscription tests
burythehammer ecc3da2
test: updating all tests to use a specific payment card as there are …
burythehammer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,8 @@ subscription, then the databases defined as separate resources will be attached | |
| the subscription. The creation_plan block can ONLY be used for provisioning new | ||
| subscriptions, the block will be ignored if you make any further changes or try importing the resource (e.g. `terraform import` ...). | ||
|
|
||
| ~> **Note:** The CMK (customer managed encryption key) fields require a specific flow which involves a multi step apply. Please refer to the relevant documents if using these fields. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there any links to consider putting in here. Maybe for a later release? |
||
|
|
||
| ## Example Usage | ||
|
|
||
| ```hcl | ||
|
|
@@ -80,6 +82,9 @@ The following arguments are supported: | |
| * `cloud_provider` - (Required) A cloud provider object, documented below. **Modifying this attribute will force creation of a new resource.** | ||
| * `creation_plan` - (Required) A creation plan object, documented below. | ||
| * `maintenance_windows` - (Optional) The subscription's maintenance window specification, documented below. | ||
| * `customer_managed_key_enabled` - (Optional) Whether to enable the customer managed encryption key flow. | ||
| * `customer_managed_key_deletion_grace_period` - (Optional) The grace period for deleting the subscription. If not set, will default to immediate deletion grace period. | ||
| * `customer_managed_key` - (Optional) The customer managed keys (CMK) to use for this subscription. If is active-active subscription, must set a key for each region. | ||
|
|
||
| The `allowlist` block supports: | ||
|
|
||
|
|
@@ -128,6 +133,9 @@ The cloud_provider `region` block supports: | |
| ~> **Note:** The preferred_availability_zones parameter is required for Terraform, but is optional within the Redis Enterprise Cloud UI. | ||
| This difference in behaviour is to guarantee that a plan after an apply does not generate differences. In AWS Redis internal cloud account, please set the zone IDs (for example: `["use-az2", "use-az3", "use-az5"]`). | ||
|
|
||
| The `customer_managed_key` block supports: | ||
| * `resource_name` - The resource name of the customer managed key as defined by the cloud provider, e.g. projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY_NAME | ||
|
|
||
| The `maintenance_windows` object has these attributes: | ||
|
|
||
| * `mode` - Either `automatic` (Redis specified) or `manual` (User specified) | ||
|
|
@@ -149,6 +157,8 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/d | |
|
|
||
| ## Attribute reference | ||
|
|
||
| * `customer_managed_key_redis_service_account` - Outputs the id of the service account associated with the subscription. Useful as part of the CMK flow. | ||
|
|
||
| The `region` block has these attributes: | ||
|
|
||
| * `networks` - List of generated network configuration | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any links to consider putting in here. Maybe for a later release?