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

Add prevent_destroy metadata configuration. #9383

Merged

Conversation

miroswan
Copy link
Contributor

@miroswan miroswan commented Oct 30, 2023

Add prevent_destroy metadata configuration for Memorystore Redis and Memorystore Redis Cluster examples. Since these are both database resources, it is best for the customer to supply this metadata configuration to prevent accidental deletion.

Release Note Template for Downstream PRs (will be copied)

redis: Updated the documentation examples to include the prevent_destroy metadata configuration

Add prevent_destroy metadata configuration for Memorystore Redis
and Memorystore Redis Cluster examples. Since these are both
database resources, it is best for the customer to supply this
metadata configuration to prevent accidental deletion.
@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

@rileykarson, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 41 insertions(+))
Terraform Beta: Diff ( 4 files changed, 41 insertions(+))
TF OiCS: Diff ( 5 files changed, 17 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3184
Passed tests 2854
Skipped tests: 325
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccRedisInstance_redisInstanceBasicExample|TestAccRedisInstance_redisInstanceFullWithPersistenceConfigExample|TestAccRedisInstance_redisInstanceFullExample|TestAccRedisInstance_redisInstanceMrrExample|TestAccRedisCluster_redisClusterHaExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccRedisInstance_redisInstanceBasicExample[Error message] [Debug log]
TestAccRedisInstance_redisInstanceFullWithPersistenceConfigExample[Error message] [Debug log]
TestAccRedisInstance_redisInstanceFullExample[Error message] [Debug log]
TestAccRedisInstance_redisInstanceMrrExample[Error message] [Debug log]
TestAccRedisCluster_redisClusterHaExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 59 insertions(+), 23 deletions(-))
Terraform Beta: Diff ( 4 files changed, 59 insertions(+), 23 deletions(-))
TF OiCS: Diff ( 6 files changed, 10 insertions(+), 6 deletions(-))

@@ -11,6 +11,10 @@ resource "google_redis_cluster" "<%= ctx[:primary_resource_id] %>" {
depends_on = [
google_network_connectivity_service_connection_policy.default
]

lifecycle {
prevent_destroy = <%= ctx[:vars]['prevent_destroy'] == 'true' %>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
prevent_destroy = <%= ctx[:vars]['prevent_destroy'] == 'true' %>
prevent_destroy = <%= ctx[:vars]['prevent_destroy'] %>

Copy link
Member

Choose a reason for hiding this comment

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

I suspect we just want this! We already have the value recorded in the vars map.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already have the changed pushed. Sorry about that!

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 67 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 4 files changed, 67 insertions(+), 10 deletions(-))
TF OiCS: Diff ( 6 files changed, 24 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3194
Passed tests 2869
Skipped tests: 325
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@rileykarson rileykarson merged commit 921c254 into GoogleCloudPlatform:main Oct 31, 2023
7 checks passed
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 28, 2023
jialei-chen pushed a commit to jialei-chen/magic-modules that referenced this pull request Nov 29, 2023
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.

3 participants