Skip to content

Commit

Permalink
Add volume replication support for Google Cloud NetApp Volumes (#9816) (
Browse files Browse the repository at this point in the history
#7002)

* Initial replication commit

* Cleanup work

- Renamed a lot of files to make clear which resource the belong to
- Updated documentation for resource fields
- Renamed a few resource fields and changed some types
- Disabled the custom code for now. Needs to be discussed first

* Update example file

* Updated example file

* Major updates

- Reorganisation of block
- Reorganisation of fields to match API documentation
- Updated example parameters
- Added missing API fields
- Improved descriptions
-

* For replication deletion, stop replication first

* Add support for deleting destination volume on replication delete

* Make volumes deletable in presence of snapshots.

This change will be PRed for volume resource independently. Adding it here while it is not in main.

* Improving debug error message

* yaml check and format fix

* Add wait for mirror to initialize.

Required to run destroy shortly after create.

* Wait on destroy, not on create

* Make deleting a replication more robust

- doc improvements
- started to implement stop/resume. More work required.
- renamed a few files to better reflect what they are good for

* adding support for stop/resume

* yamlformat and lint

* Add force delete to delete volumes with nested snapshots

* resource test first version

* More changes to make tests solid

- Introduced new parameter to wait for mirror_status==MIRRORED
- more mirror state reconciliation

* Test updates

* few cleanups

* Make virtual field verifies happy

* Minor test improvements

* More fine tuning

- Remove merge conflict in volume.yaml
- make generated test work
- make output field work
- ignore_read for virtual fields

* Resource name change as suggested by @slevenick

* Remove snapshot code block and fix typo

* Detect manual stop/resume actions

* Remove ignore_read for deletion_policy

* - Made destinationVolumeParameters immutable. It still requires ignore_read.
- removed ignore_read from virtual_fields

* destinationVolumeParameters are only evaluated at create. Make the immutable.

* Name cleanups and comment improvements

* removed comment



* tabs to spaces in resource block



* Updates to address review comments

- make wait_for_mirror also work for stop/resume, additionally to create
- convert tabs in test resource blocks to spaces
- fix typos

* Rewording of comments



---------




[upstream:37fb2ebf10afb245649e86f17bc344bf7b10ef8b]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Feb 21, 2024
1 parent 22da542 commit 1438ac5
Show file tree
Hide file tree
Showing 6 changed files with 1,905 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/9816.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
google_netapp_volume_replication
```
5 changes: 3 additions & 2 deletions google-beta/provider/provider_mmv1_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ var handwrittenIAMDatasources = map[string]*schema.Resource{
}

// Resources
// Generated resources: 443
// Generated resources: 444
// Generated IAM resources: 258
// Total generated resources: 701
// Total generated resources: 702
var generatedResources = map[string]*schema.Resource{
"google_folder_access_approval_settings": accessapproval.ResourceAccessApprovalFolderSettings(),
"google_organization_access_approval_settings": accessapproval.ResourceAccessApprovalOrganizationSettings(),
Expand Down Expand Up @@ -948,6 +948,7 @@ var generatedResources = map[string]*schema.Resource{
"google_monitoring_slo": monitoring.ResourceMonitoringSlo(),
"google_monitoring_uptime_check_config": monitoring.ResourceMonitoringUptimeCheckConfig(),
"google_netapp_volume": netapp.ResourceNetappVolume(),
"google_netapp_volume_replication": netapp.ResourceNetappVolumeReplication(),
"google_netapp_volume_snapshot": netapp.ResourceNetappVolumeSnapshot(),
"google_netapp_active_directory": netapp.ResourceNetappactiveDirectory(),
"google_netapp_backup_policy": netapp.ResourceNetappbackupPolicy(),
Expand Down
Loading

0 comments on commit 1438ac5

Please sign in to comment.