Skip to content

Add NetApp Trial Resource - #18576

Open
anujagrawal-google wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
anujagrawal-google:revert-18421-revert-18102-add-netapp-trial-resource
Open

Add NetApp Trial Resource#18576
anujagrawal-google wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
anujagrawal-google:revert-18421-revert-18102-add-netapp-trial-resource

Conversation

@anujagrawal-google

Copy link
Copy Markdown
Contributor

Adds Terraform support for the Google Cloud NetApp Volumes (GCNV) Trial resource.

Implementation Details:

  • Custom Delete Logic: The endTrial API endpoint requires exitReason and optionally optOutReasons to be passed in the request body. Because these fields are not part of the subscribeTrial (CREATE) request body, they are implemented as Terraform-only parameters (action_on_destroy and provided_opt_out_reasons) using the url_param_only: true flag. This isolates them from the CREATE request, and a custom pre_delete hook maps them directly into the endTrial JSON payload during terraform destroy.
  • AIP-156 Singleton Validation: Because the Trial resource behaves as a pseudo-singleton, ending the trial transitions it to an INACTIVE state and returns 200 OK rather than yielding standard 404 Not Found teardown responses. A custom test_check_destroy template has been added to safely validate the INACTIVE REST response during testing.
  • Testing: The automated VCR tests use skip_test natively inside the generated test file. Google Cloud NetApp Volumes strictly enforces a quota of 1 free trial per project every 12 months. Running automated tests in the shared CI projects would instantly exhaust this quota and permanently break the pipeline for a year.
  • Verification: The full CREATE, READ (import), and DELETE lifecycle (including the custom parameter injection and the INACTIVE destroy validation) has been manually verified end-to-end against the Google Cloud Staging sandbox.
 [hi on] anujjagrawal@anujagrawal:~/go/src/github.com/hashicorp/terraform-provider-google-beta$ TF_ACC=1 go test ./google-beta/services/netapp -v -run TestAccNetappTrial_netappTrialExample
  === RUN   TestAccNetappTrial_netappTrialExample
  === PAUSE TestAccNetappTrial_netappTrialExample
  === CONT  TestAccNetappTrial_netappTrialExample
  --- PASS: TestAccNetappTrial_netappTrialExample (37.01s)
  PASS
  ok      github.com/hashicorp/terraform-provider-google-beta/google-beta/services/netapp    37.241s

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

@github-actions
github-actions Bot requested a review from SirGitsalot August 10, 2026 05:22
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@SirGitsalot, 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

modular-magician commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 4 files changed, 947 insertions(+)
google-beta provider View Diff 4 files changed, 947 insertions(+)

Test report

Important

Manual Verification Required

VCR cannot automatically execute the following tests added in this PR. Please verify them manually:

🔴 TestAccNetappTrial_netappTrialExample

Analytics

Total Tests Passed Skipped Affected
44 43 1 0
Affected Service Packages
  • netapp

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

Caution

Issues requiring attention before PR completion

🔴 Manual Verification Required: New tests were added that are skipped in presubmit tests. See the "Manual Verification Required" section at the top for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the replaying VCR build log

@anujagrawal-google, @SirGitsalot VCR tests complete for 1b9d7d5!

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.

2 participants