Skip to content

Add NetApp Trial Resource - #1382

Merged
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-4b277e1b5bf0afc9eef4e773762465ca694f7d52
Jul 27, 2026
Merged

Add NetApp Trial Resource#1382
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-4b277e1b5bf0afc9eef4e773762465ca694f7d52

Conversation

@modular-magician

Copy link
Copy Markdown
Collaborator

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.

resource `google_netapp_trial`: added support for Google Cloud NetApp Volumes Trial

Derived from GoogleCloudPlatform/magic-modules#18102

Signed-off-by: Anuj Agrawal <anujjagrawal@google.com>

[upstream:4b277e1b5bf0afc9eef4e773762465ca694f7d52]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician
modular-magician merged commit c02939a into terraform-google-modules:master Jul 27, 2026
3 checks passed
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.

1 participant