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 default values from api to smb_settings field in google cloud netapp volumes #11182

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

Mehul3217
Copy link
Contributor

Release Note Template for Downstream PRs (will be copied)

netapp: added `default_from_api = true` attribute to `smb_settings` field of GoogleCloudNetappVolumes

Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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

google provider: Diff ( 1 file changed, 1 insertion(+))
google-beta provider: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 18
Passed tests: 18
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • netapp

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

@@ -211,6 +211,7 @@ properties:
- :SHOW_PREVIOUS_VERSIONS
- :ACCESS_BASED_ENUMERATION
- :CONTINUOUSLY_AVAILABLE
default_from_api: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could I get some more context of this addition? Their isn't a default value for this based off of the REST reference: https://cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.volumes#SMBSettings

Setting this could cause tests to fail in the future if the api suddenly changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The execution plan is not stable if we do not set this, since while creating a smb_volume we do not explicitly set this field and it also does not have the default value so everytime we try to run plan without any change to TF config, we see this

# google_netapp_volume.at_volume01 will be updated in-place
  ~ resource "google_netapp_volume" "at_volume01" {
        id                 = "projects/cvs-pm-host-1p/locations/us-west3/volumes/ok-at-volume01"
        name               = "ok-at-volume01"
      ~ smb_settings       = [
          - "OPLOCKS",
          - "CHANGE_NOTIFY",
          - "SHOW_PREVIOUS_VERSIONS",
          - "SHOW_SNAPSHOT",
          - "BROWSABLE",
        ]
        # (32 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

after we set it to true it will accept the empty value provided.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants