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

New resource: azurerm_netapp_volume_group_oracle #28391

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

paulomarquesc
Copy link
Contributor

@paulomarquesc paulomarquesc commented Dec 27, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

This PR implements a new Azure NetApp Files resource called Volume Group for Oracle.

On top of implementing the new resource azurerm_netapp_volume_group_oracle, it also contains the following changes/improvements:

  • azurerm_netapp_volume_group_oracle - new resource implementation with resource, data source, unit tests, acceptance tests and documentation/examples.
  • azurerm_netapp_volume - changed VolumesBreakReplicationThenPoll to VolumesBreakReplication due to issue LRO Polling fails from time to time pandora#4571
  • azurerm_netapp_volume_quota_rule - included wait function waitForQuotaRuleCreateOrUpdate to make sure resource completes its updates.
  • azurerm_netapp_volume_group_sap_hana - case refactored in multiple place to be more consist with golang same is true to the data source code, modified configuration data_protection_snapshot_policy for computed = true due to an issue with terraform not properly identifying the deletion graph and ending up trying to delete a snapshot policy before the volumes, causing issues with acceptance tests and resource destruction, this is due to volumes in AVG being listed inside a list. Made a specific function to expand volumes called expandNetAppVolumeGroupSAPHanaVolumes so it can be independent of the Oracle one due to a few major differences. ValidateNetAppVolumeGroupExportPolicyRuleSAPHanna is now renamed to ValidateNetAppVolumeGroupExportPolicyRule and shared with Oracle AVG.
  • azurerm_netapp_snapshot_policy - implemented handling for the 409 issue when terraform tries to delete the snapshot policy before the volumes using it are being handled so it can disassociate the volumes from itself before deletion.
  • Changed a few acceptance tests to increase reliability, especially the ones depending on akv.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Unit tests execution:

pmarques [ ~/go/src/github.com/terraform-providers/terraform-provider-azurerm ]$ go test -run TestValidateNetApp ./internal/services/netapp/validate/ -v -count=1
=== RUN   TestValidateNetAppBackupPolicyCombinedRetention
=== RUN   TestValidateNetAppBackupPolicyCombinedRetention/ValidateCombinedRetentionWithValidValues
=== RUN   TestValidateNetAppBackupPolicyCombinedRetention/ValidateCombinedRetentionWithValidValuesMaximumReachedFailure
--- PASS: TestValidateNetAppBackupPolicyCombinedRetention (0.00s)
    --- PASS: TestValidateNetAppBackupPolicyCombinedRetention/ValidateCombinedRetentionWithValidValues (0.00s)
    --- PASS: TestValidateNetAppBackupPolicyCombinedRetention/ValidateCombinedRetentionWithValidValuesMaximumReachedFailure (0.00s)
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv41EnabledOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv3EnabledOnNFSv3Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv3Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv3Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv3NotEnabledOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv41NotEnabledOnNFSv3Volume
--- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv41EnabledOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv3EnabledOnNFSv3Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv3Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv3Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv3NotEnabledOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleOracle/ValidateNFSv41NotEnabledOnNFSv3Volume (0.00s)
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesPPG
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesAvailabilityZone
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesProximityPlacementGroup
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesProximityPlacementGroupFailsWhenDifferent
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidatePPGAndAvailabilityZoneNotSetAtSameTime
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateMinimumVolumes
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateVolumesSameZone
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateVolumesNotSameZoneErrors
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateRequiredVolumeSpecs
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateLessThanMinimumVolumes
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateMultiProtocolFails
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateNoProtocolFails
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateInvalidProtocolList
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateInvalidProtocol
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCIFSInvalidProtocolForOracle
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateVolumeSpecCantRepeat
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateEndpointDstNotEnabledOnLogVolume
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyOptionsAreSetTogether
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyOptionsNotSetTogetherFailsWhenKeyVault
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyNotSameAllVolumesFails
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidatePlatformManagedKey
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyFailsOnBasicNetworkFeatures
=== RUN   TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyPassOnStandardNetworkFeatures
--- PASS: TestValidateNetAppVolumeGroupOracleVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesPPG (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesAvailabilityZone (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesProximityPlacementGroup (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCorrectSettingsAllVolumesProximityPlacementGroupFailsWhenDifferent (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidatePPGAndAvailabilityZoneNotSetAtSameTime (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateMinimumVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateVolumesSameZone (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateVolumesNotSameZoneErrors (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateRequiredVolumeSpecs (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateLessThanMinimumVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateMultiProtocolFails (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateNoProtocolFails (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateInvalidProtocolList (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateInvalidProtocol (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCIFSInvalidProtocolForOracle (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateVolumeSpecCantRepeat (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateEndpointDstNotEnabledOnLogVolume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyOptionsAreSetTogether (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyOptionsNotSetTogetherFailsWhenKeyVault (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyNotSameAllVolumesFails (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidatePlatformManagedKey (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyFailsOnBasicNetworkFeatures (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupOracleVolumes/ValidateCustomerManagedKeyPassOnStandardNetworkFeatures (0.00s)
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv41EnabledOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv3EnabledOnNFSv3Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv3Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv3Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv3NotEnabledOnNFSv41Volume
=== RUN   TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv41NotEnabledOnNFSv3Volume
--- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv41EnabledOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv3EnabledOnNFSv3Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotEnabledAtSameTimeOnNFSv3Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv3Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateBothProtocolsNotDisabledAtSameTimeOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv3NotEnabledOnNFSv41Volume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupExportPolicyRuleSAPHana/ValidateNFSv41NotEnabledOnNFSv3Volume (0.00s)
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateCorrectSettingsAllVolumes
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateMinimumVolumes
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateRequiredVolumeSpecs
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateLessThanMinimumVolumes
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateMultiProtocolFails
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateNoProtocolFails
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateInvalidProtocolList
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateInvalidProtocol
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateCIFSInvalidProtocolForSAPHana
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateNoNfsVersionThreeOnDataLogAndSharedVolumes
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateNoPPGBackupVolumes
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateRequiredPpgForNonBackupVolumes
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateVolumeSpecCantRepeat
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateEndpointDstNotEnabledOnLogVolume
=== RUN   TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateSnapshotPolicyNotEnabledOnEndpointDstVolume
--- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateCorrectSettingsAllVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateMinimumVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateRequiredVolumeSpecs (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateLessThanMinimumVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateMultiProtocolFails (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateNoProtocolFails (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateInvalidProtocolList (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateInvalidProtocol (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateCIFSInvalidProtocolForSAPHana (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateNoNfsVersionThreeOnDataLogAndSharedVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateNoPPGBackupVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateRequiredPpgForNonBackupVolumes (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateVolumeSpecCantRepeat (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateEndpointDstNotEnabledOnLogVolume (0.00s)
    --- PASS: TestValidateNetAppVolumeGroupSAPHanaVolumes/ValidateSnapshotPolicyNotEnabledOnEndpointDstVolume (0.00s)
=== RUN   TestValidateNetAppVolumeQuotaRulesUnix
=== RUN   TestValidateNetAppVolumeQuotaRulesUnix/ValidateCorrectUnixUserGroupID
=== RUN   TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithLettersFail
=== RUN   TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithMoreThanMaxCharsFail
=== RUN   TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithEmptyStringFail
=== RUN   TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithNegativeNumberFail
--- PASS: TestValidateNetAppVolumeQuotaRulesUnix (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesUnix/ValidateCorrectUnixUserGroupID (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithLettersFail (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithMoreThanMaxCharsFail (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithEmptyStringFail (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesUnix/ValidateUnixUserGroupIDWithNegativeNumberFail (0.00s)
=== RUN   TestValidateNetAppVolumeQuotaRules
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsUserIDLong
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsGroupIDLong
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsGroupIDShort
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsGroupIDExtraShort
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsUserIDLongFails
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsGroupIDLongFails
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsGroupIDShortFails
=== RUN   TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsGroupIDExtraShortFails
--- PASS: TestValidateNetAppVolumeQuotaRules (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsUserIDLong (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsGroupIDLong (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsGroupIDShort (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateCorrectWindowsGroupIDExtraShort (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsUserIDLongFails (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsGroupIDLongFails (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsGroupIDShortFails (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRules/ValidateIncorrectWindowsGroupIDExtraShortFails (0.00s)
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualUserQuotaTargetIsDefined
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetIsDefined
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateDefaultUserQuotaTargetIsNotDefined
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetIsNotDefined
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualUserQuotaTargetIsDefinedFailsWhenMissingTarget
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetIsDefinedFailsWhenMissingTarget
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateDefaultUserQuotaTargetFailsWhenDefiningTarget
=== RUN   TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetFailsWhenDefiningTarget
--- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualUserQuotaTargetIsDefined (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetIsDefined (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateDefaultUserQuotaTargetIsNotDefined (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetIsNotDefined (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualUserQuotaTargetIsDefinedFailsWhenMissingTarget (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetIsDefinedFailsWhenMissingTarget (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateDefaultUserQuotaTargetFailsWhenDefiningTarget (0.00s)
    --- PASS: TestValidateNetAppVolumeQuotaRulesQuotaType/ValidateIndividualGroupQuotaTargetFailsWhenDefiningTarget (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate       0.012s

Acceptance tests results:

pmarques [ ~ ]$ tail -f ~/go/src/github.com/terraform-providers/terraform-provider-azurerm/test_run_20250102_205655.log | grep -e "--- PASS:" -e "--- FAIL:"

--- PASS: TestAccDataSourceNetAppPool_basic (230.26s)
--- PASS: TestAccNetAppVolumeGroupSAPHanaDataSource_basic (939.82s)
--- PASS: TestAccNetAppVolumeGroupOracleDataSource_basic (846.56s)
--- PASS: TestAccNetAppPool_basic (243.47s)
--- PASS: TestAccNetAppPool_requiresImport (235.08s)
--- PASS: TestAccNetAppPool_complete (243.64s)
--- PASS: TestAccNetAppPool_update (421.06s)
--- PASS: TestAccNetAppPool_doubleEncryption (242.33s)
--- PASS: TestAccDataSourceNetAppAccount_basic (73.14s)
--- PASS: TestAccDataSourceNetAppAccount_systemAssignedManagedIdentity (73.20s)
--- PASS: TestAccNetAppAccountResource (336.15s)
    --- PASS: TestAccNetAppAccountResource/Resource (0.00s)
        --- PASS: TestAccNetAppAccountResource/Resource/basic (86.57s)
    --- PASS: TestAccNetAppAccountResource/Resource#01 (0.00s)
        --- PASS: TestAccNetAppAccountResource/Resource#01/requiresImport (70.61s)
    --- PASS: TestAccNetAppAccountResource/Resource#02 (0.00s)
        --- PASS: TestAccNetAppAccountResource/Resource#02/complete (77.01s)
    --- PASS: TestAccNetAppAccountResource/Resource#03 (0.00s)
        --- PASS: TestAccNetAppAccountResource/Resource#03/update (101.95s)
--- PASS: TestAccNetAppAccount_systemAssignedManagedIdentity (100.51s)
--- PASS: TestAccNetAppAccount_userAssignedManagedIdentity (113.20s)
--- PASS: TestAccNetAppAccount_updateManagedIdentity (153.95s)
--- PASS: TestAccNetAppVolumeGroupSAPHana_basic (917.48s)
--- PASS: TestAccNetAppVolumeGroupSAPHana_backupVolumeSpecsNfsv3 (1089.47s)
--- PASS: TestAccNetAppVolumeGroupSAPHana_snapshotPolicy (1163.01s)
--- PASS: TestAccNetAppVolumeGroupSAPHana_snapshotPolicyUpdate (1319.68s)
--- PASS: TestAccNetAppVolumeGroupSAPHana_snapshotPolicyUpdate (1116.47s)
--- PASS: TestAccNetAppVolumeGroupSAPHana_volumeUpdates (1084.29s)
--- FAIL: TestAccNetAppVolumeGroupSAPHana_crossRegionReplication (258.42s)
--- PASS: TestAccNetAppBackupVault_basic (149.95s)
--- PASS: TestAccNetAppBackupVault_update (187.21s)
--- PASS: TestAccNetAppBackupPolicyDataSource_basic (121.53s)
--- PASS: TestAccNetAppAccountEncryptionDataSource_basic (274.32s)
--- PASS: TestAccNetAppVolume_basic (730.47s)
--- PASS: TestAccNetAppVolume_backupPolicyUpdate (1428.31s)
--- PASS: TestAccNetAppVolume_backupPolicy (1448.54s)
--- PASS: TestAccNetAppVolume_backupPolicyUpdate (1135.03s)
--- PASS: TestAccNetAppVolume_availabilityZone (733.96s)
--- PASS: TestAccNetAppVolume_nfsv41 (836.41s)
--- PASS: TestAccNetAppVolume_standardNetworkFeature (794.12s)
--- PASS: TestAccNetAppVolume_snapshotPolicy (939.18s)
--- PASS: TestAccNetAppVolume_snapshotPolicyUpdate (1105.59s)
--- PASS: TestAccNetAppVolume_snapshotPolicyUpdate (815.37s)
--- PASS: TestAccNetAppVolume_crossRegionReplication (1805.78s)
--- PASS: TestAccNetAppVolume_nfsv3FromSnapshot (941.08s)
--- PASS: TestAccNetAppVolume_nfsv3SnapshotDirectoryVisibleFalse (725.23s)
--- PASS: TestAccNetAppVolume_nfsv3SnapshotDirectoryVisibleTrue (733.84s)
--- PASS: TestAccNetAppVolume_requiresImport (725.85s)
--- PASS: TestAccNetAppVolume_complete (752.99s)
--- PASS: TestAccNetAppVolume_update (947.87s)
--- PASS: TestAccNetAppVolume_updateExportPolicyRule (1130.52s)
--- PASS: TestAccNetAppVolume_updateExportPolicyRule (835.49s)
--- PASS: TestAccNetAppVolume_volEncryptionCmkUserAssigned (917.04s)
--- PASS: TestAccNetAppVolume_volEncryptionCmkSystemAssigned (942.68s)
--- PASS: TestAccDataSourceNetAppVolume_basic (749.38s)
--- FAIL: TestAccDataSourceNetAppVolume_backupPolicy (1139.84s)
--- PASS: TestAccNetAppAccountEncryption_cmkSystemAssigned (294.92s)
--- PASS: TestAccNetAppAccountEncryption_cmkUserAssigned (272.56s)
--- PASS: TestAccNetAppAccountEncryption_updateKey (344.39s)
--- PASS: TestAccNetAppVolumeQuotaRuleDataSource_basic (814.14s)
--- PASS: TestAccNetAppSnapshotPolicy_basic (274.31s)
--- PASS: TestAccNetAppSnapshotPolicy_hourlySchedule (301.62s)
--- PASS: TestAccNetAppSnapshotPolicy_dailySchedule (303.45s)
--- PASS: TestAccNetAppSnapshotPolicy_weeklySchedule (301.96s)
--- PASS: TestAccNetAppSnapshotPolicy_monthlySchedule (279.46s)
--- PASS: TestAccNetAppSnapshotPolicy_requiresImport (263.04s)
--- PASS: TestAccNetAppSnapshotPolicy_updateSnapshotPolicy (325.69s)
--- PASS: TestAccNetAppSnapshotPolicy_complete (273.13s)
--- PASS: TestAccNetAppBackupPolicy_basic (142.34s)
--- PASS: TestAccNetAppBackupPolicy_complete (136.38s)
--- PASS: TestAccNetAppBackupPolicy_update (173.06s)
--- PASS: TestAccNetAppVolumeGroupOracle_basicAvailabilityZone (856.64s)
--- PASS: TestAccNetAppVolumeGroupOracle_basicProximityPlacementGroup (926.04s)
--- PASS: TestAccNetAppVolumeGroupOracle_nfsv3 (913.60s)
--- PASS: TestAccNetAppVolumeGroupOracle_snapshotPolicyUpdate (1273.32s)
--- PASS: TestAccNetAppVolumeGroupOracle_volumeUpdates (997.24s)
--- PASS: TestAccDataSourceNetAppSnapshot_basic (758.66s)
--- PASS: TestAccNetAppBackupVaultDataSource_basic (159.22s)
--- PASS: TestAccNetAppSnapshot_basic (750.34s)
--- PASS: TestAccNetAppSnapshot_requiresImport (738.26s)
--- PASS: TestAccNetAppSnapshot_complete (788.86s)
--- PASS: TestAccNetAppVolumeQuotaRule_individualGroupQuotaType (860.01s)
--- PASS: TestAccNetAppVolumeQuotaRule_individualUserQuotaType (794.88s)
--- PASS: TestAccNetAppVolumeQuotaRule_defaultGroupQuotaType (805.03s)
--- PASS: TestAccNetAppVolumeQuotaRule_defaultUserQuotaType (805.41s)
--- PASS: TestAccDataSourceNetAppSnapshotPolicy_basic (258.25s)

Acceptance tests retry for the 3 initially failed tests:

pmarques [ ~/go/src/github.com/terraform-providers/terraform-provider-azurerm ]$ ~/run_netapp_tests_from_file.sh ~/retry-tests.txt
Log file: test_run_20250103_151844.log
Running test: TestAccNetAppVolumeGroupSAPHana_crossRegionReplication
Start time: Fri Jan  3 15:18:44 UTC 2025
-----------------------------------------
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/netapp -parallel 5 -run=TestAccNetAppVolumeGroupSAPHana_crossRegionReplication -count=1 -timeout 1200m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccNetAppVolumeGroupSAPHana_crossRegionReplication
=== PAUSE TestAccNetAppVolumeGroupSAPHana_crossRegionReplication
=== CONT  TestAccNetAppVolumeGroupSAPHana_crossRegionReplication
--- PASS: TestAccNetAppVolumeGroupSAPHana_crossRegionReplication (2272.33s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp        2272.350s
-----------------------------------------
End time: Fri Jan  3 15:57:00 UTC 2025
Test TestAccNetAppVolumeGroupSAPHana_crossRegionReplication completed successfully.
-----------------------------------------

Running test: TestAccDataSourceNetAppVolume_backupPolicy
Start time: Fri Jan  3 15:57:00 UTC 2025
-----------------------------------------
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/netapp -parallel 5 -run=TestAccDataSourceNetAppVolume_backupPolicy -count=1 -timeout 1200m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceNetAppVolume_backupPolicy
=== PAUSE TestAccDataSourceNetAppVolume_backupPolicy
=== CONT  TestAccDataSourceNetAppVolume_backupPolicy
--- PASS: TestAccDataSourceNetAppVolume_backupPolicy (1116.40s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp        1116.421s
-----------------------------------------
End time: Fri Jan  3 16:16:00 UTC 2025
Test TestAccDataSourceNetAppVolume_backupPolicy completed successfully.
-----------------------------------------

Running test: TestAccNetAppVolumeGroupOracle_snapshotPolicy
Start time: Fri Jan  3 16:16:00 UTC 2025
-----------------------------------------
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/netapp -parallel 5 -run=TestAccNetAppVolumeGroupOracle_snapshotPolicy -count=1 -timeout 1200m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccNetAppVolumeGroupOracle_snapshotPolicy
=== PAUSE TestAccNetAppVolumeGroupOracle_snapshotPolicy
=== RUN   TestAccNetAppVolumeGroupOracle_snapshotPolicyUpdate
=== PAUSE TestAccNetAppVolumeGroupOracle_snapshotPolicyUpdate
=== CONT  TestAccNetAppVolumeGroupOracle_snapshotPolicy
=== CONT  TestAccNetAppVolumeGroupOracle_snapshotPolicyUpdate
--- PASS: TestAccNetAppVolumeGroupOracle_snapshotPolicy (1289.64s)
--- PASS: TestAccNetAppVolumeGroupOracle_snapshotPolicyUpdate (1309.69s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp        1309.711s
-----------------------------------------
End time: Fri Jan  3 16:38:13 UTC 2025
Test TestAccNetAppVolumeGroupOracle_snapshotPolicy completed successfully.
-----------------------------------------

All tests completed.
Total errors encountered: 0

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azurerm_netapp_volume_group_oracle - new resource
  • azurerm_netapp_volume - changed VolumesBreakReplicationThenPoll to VolumesBreakReplication due to issue LRO Polling fails from time to time pandora#4571
  • azurerm_netapp_volume_quota_rule - included wait function waitForQuotaRuleCreateOrUpdate to make sure resource completes its updates.
  • azurerm_netapp_snapshot_policy - implemented handling for the 409 issue when terraform tries to delete the snapshot policy before the volumes using it are being handled so it can disassociate the volumes from itself before deletion.

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Hey @paulomarquesc, I took a look over this PR and it mostly seems fine. My main concern is that existing tests are being changed which might lead to breaking changes. Can you confirm that migrating from the current version of the provider to this version doesn't cause issues?

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