Skip to content

Add ontapSource field to Netapp Backup#17555

Merged
shuyama1 merged 1 commit into
GoogleCloudPlatform:mainfrom
ravisankardanda99:ontap-mode-backup
May 14, 2026
Merged

Add ontapSource field to Netapp Backup#17555
shuyama1 merged 1 commit into
GoogleCloudPlatform:mainfrom
ravisankardanda99:ontap-mode-backup

Conversation

@ravisankardanda99
Copy link
Copy Markdown
Contributor

@ravisankardanda99 ravisankardanda99 commented May 14, 2026

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

netapp: added `ontap_source` field to `google_netapp_backup` resource (beta)

@github-actions
Copy link
Copy Markdown

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

@shuyama1, 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
Copy Markdown
Collaborator

modular-magician commented May 14, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 20 insertions(+)
google-beta provider View Diff 3 files changed, 146 insertions(+)
terraform-google-conversion View Diff 1 file changed, 54 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_netapp_backup (7 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_netapp_backup" "primary" {
  ontap_source {
    snapshot_uuid = # value needed
    storage_pool  = # value needed
    volume_uuid   = # value needed
  }
}

Test report

Analytics

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

Learn how VCR tests work


Step 1: Replaying Mode

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

View the build log

@ravisankardanda99, @shuyama1 VCR tests complete for e166d77!

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 14, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 20 insertions(+)
google-beta provider View Diff 3 files changed, 137 insertions(+)
terraform-google-conversion View Diff 1 file changed, 54 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_netapp_backup (7 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_netapp_backup" "primary" {
  ontap_source {
    snapshot_uuid = # value needed
    storage_pool  = # value needed
    volume_uuid   = # value needed
  }
}

Test report

Analytics

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

Learn how VCR tests work


Step 1: Replaying Mode

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

View the build log

@ravisankardanda99, @shuyama1 VCR tests complete for e8c61a5!

@ravisankardanda99
Copy link
Copy Markdown
Contributor Author

An acceptance test was not added for the new ontapSource field because:

Multi-Provider Dependency: Creating an ONTAP-mode volume to get a valid volume_uuid requires the third-party NetApp/netapp-ontap provider. The google provider cannot manage these volumes.

CI Limitation: The Magic Modules CI pipeline does not include or support this third-party provider binary

API Validation: We cannot use dummy/mock UUIDs because the GCNV API performs strict validation, causing immediate 400/404 errors during creation.

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 14, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 20 insertions(+)
google-beta provider View Diff 3 files changed, 136 insertions(+)
terraform-google-conversion View Diff 1 file changed, 54 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_netapp_backup (7 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_netapp_backup" "primary" {
  ontap_source {
    snapshot_uuid = # value needed
    storage_pool  = # value needed
    volume_uuid   = # value needed
  }
}

Test report

Analytics

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

Learn how VCR tests work


Step 1: Replaying Mode

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

View the build log

@ravisankardanda99, @shuyama1 VCR tests complete for 5fc06b4!

Copy link
Copy Markdown
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Can you add a test please? Thanks! immutable: true

Comment on lines +157 to +171
- name: 'storagePool'
type: String
description: |
Name of the storage pool. This must be specified for creating backups for ONTAP mode volumes.
Format: `projects/{{project}}/locations/{{location}}/storagePools/{{storage_pool_id}}`
required: true
- name: 'volumeUuid'
type: String
description: |
The UUID of the ONTAP source volume.
required: true
- name: 'snapshotUuid'
type: String
description: |
The UUID of the ONTAP source snapshot.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these subfields also immutable? If so, they'll need immutable: true explicitly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added immutable: true to subfields as well.

As mentioned in #17555 (comment), it is not possible to add an acceptance test for this change.

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 14, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 20 insertions(+)
google-beta provider View Diff 3 files changed, 139 insertions(+)
terraform-google-conversion View Diff 1 file changed, 54 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_netapp_backup (7 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_netapp_backup" "primary" {
  ontap_source {
    snapshot_uuid = # value needed
    storage_pool  = # value needed
    volume_uuid   = # value needed
  }
}

Test report

Analytics

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

Learn how VCR tests work


Step 1: Replaying Mode

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

View the build log

@ravisankardanda99, @shuyama1 VCR tests complete for d662014!

Copy link
Copy Markdown
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

An acceptance test was not added for the new ontapSource field because:

Multi-Provider Dependency: Creating an ONTAP-mode volume to get a valid volume_uuid requires the third-party NetApp/netapp-ontap provider. The google provider cannot manage these volumes.

CI Limitation: The Magic Modules CI pipeline does not include or support this third-party provider binary

API Validation: We cannot use dummy/mock UUIDs because the GCNV API performs strict validation, causing immediate 400/404 errors during creation.

Sorry for missing this comment. Could you test it locally? We'd generally need some sort of testing to verify this is working. Local testing should be fine!

@ravisankardanda99
Copy link
Copy Markdown
Contributor Author

ravisankardanda99 commented May 14, 2026

Local testing result:

[hi on] ravisankard@ravisankard-test:~/tf-testing$ cat main.tf
provider "google-beta" {
  project = "gcnv-unif-file-backups-cep"
  region  = "us-central1"
}

# Create the Backup Vault
resource "google_netapp_backup_vault" "vault" {
  name        = "ravisankard-test-do-not-delete"
  location    = "us-central1"
  provider = google-beta
}

resource "google_netapp_backup" "backup" {
  name        = "ts-test-backup"
  location    = "us-central1"
  vault_name  = google_netapp_backup_vault.vault.name
  description = "Manual backup using ontap_source"

  ontap_source {
    storage_pool  = "projects/289940575530/locations/us-central1/storagePools/ontap-pool-ravisankard-test-1"
    volume_uuid   = "f4d73b8e-4f7b-11f1-aaf0-a98b65481b66"
  }
  provider = google-beta
}
[hi on] ravisankard@ravisankard-test:~/tf-testing$ TF_CLI_CONFIG_FILE="$HOME/tf-dev-override.tfrc" terraform apply
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - hashicorp/google in /usr/local/google/home/ravisankard/go/bin
│  - hashicorp/google-beta in /usr/local/google/home/ravisankard/go/bin
│ 
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become
│ incompatible with published releases.
╵
google_netapp_backup_vault.vault: Refreshing state... [id=projects/gcnv-unif-file-backups-cep/locations/us-central1/backupVaults/ravisankard-test-do-not-delete]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following
symbols:
  + create

Terraform will perform the following actions:

  # google_netapp_backup.backup will be created
  + resource "google_netapp_backup" "backup" {
      + backup_region       = (known after apply)
      + backup_type         = (known after apply)
      + chain_storage_bytes = (known after apply)
      + create_time         = (known after apply)
      + deletion_policy     = "DELETE"
      + description         = "Manual backup using ontap_source"
      + effective_labels    = {
          + "goog-terraform-provisioned" = "true"
        }
      + id                  = (known after apply)
      + location            = "us-central1"
      + name                = "ts-test-backup"
      + project             = "gcnv-unif-file-backups-cep"
      + state               = (known after apply)
      + terraform_labels    = {
          + "goog-terraform-provisioned" = "true"
        }
      + vault_name          = "ravisankard-test-do-not-delete"
      + volume_region       = (known after apply)
      + volume_usage_bytes  = (known after apply)

      + ontap_source {
          + storage_pool = "projects/289940575530/locations/us-central1/storagePools/ontap-pool-ravisankard-test-1"
          + volume_uuid  = "f4d73b8e-4f7b-11f1-aaf0-a98b65481b66"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

google_netapp_backup.backup: Creating...
google_netapp_backup.backup: Still creating... [10s elapsed]
google_netapp_backup.backup: Still creating... [20s elapsed]
google_netapp_backup.backup: Still creating... [30s elapsed]
google_netapp_backup.backup: Still creating... [40s elapsed]
google_netapp_backup.backup: Still creating... [50s elapsed]
google_netapp_backup.backup: Still creating... [1m0s elapsed]
google_netapp_backup.backup: Still creating... [1m10s elapsed]
google_netapp_backup.backup: Creation complete after 1m13s [id=projects/gcnv-unif-file-backups-cep/locations/us-central1/backupVaults/ravisankard-test-do-not-delete/backups/ts-test-backup]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
[hi on] ravisankard@ravisankard-test:~/tf-testing$ TF_CLI_CONFIG_FILE="$HOME/tf-dev-override.tfrc" terraform apply
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - hashicorp/google in /usr/local/google/home/ravisankard/go/bin
│  - hashicorp/google-beta in /usr/local/google/home/ravisankard/go/bin
│ 
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become
│ incompatible with published releases.
╵
google_netapp_backup_vault.vault: Refreshing state... [id=projects/gcnv-unif-file-backups-cep/locations/us-central1/backupVaults/ravisankard-test-do-not-delete]
google_netapp_backup.backup: Refreshing state... [id=projects/gcnv-unif-file-backups-cep/locations/us-central1/backupVaults/ravisankard-test-do-not-delete/backups/ts-test-backup]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
[hi on] ravisankard@ravisankard-test:~/tf-testing$ 

@github-actions github-actions Bot requested a review from shuyama1 May 14, 2026 18:53
Copy link
Copy Markdown
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Thanks for testing it locally!

@shuyama1 shuyama1 added this pull request to the merge queue May 14, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 8b7eeb7 May 14, 2026
22 of 23 checks passed
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.

4 participants