Add Observability Folder Settings Resource#16542
Add Observability Folder Settings Resource#16542rileykarson merged 28 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @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. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
Action takenFound 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Tests analyticsTotal tests: 7 Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🟢 All tests passed! View the build log |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 12 Click here to see the affected service packages
🟢 All tests passed! View the build log |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 12 Click here to see the affected service packages
🟢 All tests passed! View the build log |
|
@rileykarson Hi! Could you please take a look at this PR? Thank you :) |
mmv1/third_party/terraform/services/observability/observability_operation.go.tmpl
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,14 @@ | |||
| var masks []string | |||
| if !d.GetRawConfig().GetAttr("default_storage_location").IsNull() { | |||
There was a problem hiding this comment.
Checking for explicit set-ness in config will guard against nulling these values out, but will also create a permadiff because Terraform expects the values out to be null/zero if unset. Can you walk through why we want to guard on being set here vs just setting both values in a fixed update mask?
There was a problem hiding this comment.
There are two reasons, the first is that we never allow users to update both resource fields (kmsKeyName and defaultStorageLocation). The second is because I want to allow setting a field to "".
Very briefly:
- You can't set
kmsKeyNameif the Settings is in theglobalregion. - You can't set
defaultStorageLocationif the Settings is not in theglobalregion.
You can set either one of these fields in a Settings resource, but not both. When I used the default fixed update mask the API would complain that both fields were included as update masks, this is why I needed to make a custom pre_create and pre_update in the first place.
Second, I wanted the explicit set-ness check of ...IsNull() to allow explicit clears by setting a field to the empty string "". Originally I just had this check as GetOk but this didn't work because it treated "" as being unset.
There was a problem hiding this comment.
There's no pre_update in this change- just confirming, are you seeing the results you expect w/o one?
There was a problem hiding this comment.
Thanks! I'll note there's no pre_update atm, but it does appear to work as intended.
mmv1/third_party/terraform/services/observability/observability_operation.go.tmpl
Outdated
Show resolved
Hide resolved
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 12 Click here to see the affected service packages
🟢 All tests passed! View the build log |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 17 Click here to see the affected service packages
Action takenFound 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🟢 All tests passed! |
Description:
This PR introduces the
google_observability_folder_settingsresource to Magic Modules for the google-beta provider, part of the broader Observability Settings surface for customers to manage observability compliance configurations across the project, folder and organization structures.Fixes hashicorp/terraform-provider-google#26239
Release Note Template for Downstream PRs (will be copied)