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
Draft
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b6e14ba
WIP: Initial commit for AVG Oracle
Nov 21, 2024
695a063
WIP: AVG for Oracle support
Nov 27, 2024
fb14fe3
fixing panic on data protection replication removal for Oracle
Nov 27, 2024
f8fc32d
Dedicating functions to SAPHana plus naming convention fixes for gola…
Nov 27, 2024
7997c44
WIP: AVG for Oracle
Dec 3, 2024
5d21308
Reverting UpdateThenPull changes
Dec 3, 2024
efe1b6f
updating readme
Dec 3, 2024
fa4aea8
rolling back a few ThenPoll changes
Dec 3, 2024
9a0d610
Removing alias
Dec 3, 2024
019d6d5
fixing double provider definition
Dec 3, 2024
1bc8b69
scaling back oracle volume tests
Dec 3, 2024
2b17d57
Changing region for AZ supported one
Dec 3, 2024
ba12d83
fixing a few issues with testing
Dec 4, 2024
df4784f
scaling down SAP Hana tests to avoid regional capacity issues
Dec 4, 2024
4923c31
Changing region for CRR and SAP Hana
Dec 4, 2024
413cf22
PPG testing and CMK implementation
Dec 18, 2024
404e041
adding cmk support on data source
Dec 18, 2024
0422ff9
CMK implementation
Dec 19, 2024
a4e9f2f
Changes to make it work with MSFT test sub
Dec 19, 2024
9135bc6
Updating access policies
Dec 19, 2024
979be23
AVG test fixes
Dec 20, 2024
f2e7d1f
Adding more validations, making Basic network feature the default
Dec 20, 2024
5d61c29
Fixes to avoid allocation issues and fixing volume updates
Dec 20, 2024
08836a1
removing hard-coded regions for AVG for Oracle, updating readme
Dec 20, 2024
5ec9c41
restoring HANA pool size
Dec 20, 2024
7e5b0ea
adding data protection back to shared volume
Dec 20, 2024
723c402
removing snapshot policy before deleting volume if exists
Dec 21, 2024
179c990
WIP: working on snapshot policy deletion bug
Dec 27, 2024
00e0e3b
Adding docs and examples, minor fixes
paulomarquesc Dec 27, 2024
c3023ab
updating network_features back to computed=true
Dec 27, 2024
b782821
Removing comments and extra logs
paulomarquesc Dec 27, 2024
f44941d
Merge branch 'pmarques/avg-oracle' of github.com:paulomarquesc/terraf…
paulomarquesc Dec 27, 2024
2e46e8f
fixing linting issues
paulomarquesc Dec 28, 2024
2e4ae6e
Making network feature required
paulomarquesc Dec 28, 2024
57d7ed6
Making network_features required
paulomarquesc Dec 28, 2024
fc23b01
updating network addresses
paulomarquesc Dec 28, 2024
3b5a8b3
updating O+C comment
paulomarquesc Dec 28, 2024
f02e13d
Adding computed back and comment about it
paulomarquesc Dec 28, 2024
a72c0af
Merge branch 'main' into pmarques/avg-oracle
paulomarquesc Dec 28, 2024
e05a0f8
Update website/docs/r/netapp_volume_group_oracle.html.markdown
paulomarquesc Jan 10, 2025
5123fb4
Removing not-needed deeper validations
Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding more validations, making Basic network feature the default
Your Name committed Dec 20, 2024
commit f2e7d1f55a77abfe13bec7fb28e1ea29bffe3f38
Original file line number Diff line number Diff line change
@@ -272,6 +272,7 @@ func (r NetAppVolumeGroupOracleResource) Arguments() map[string]*pluginsdk.Schem
"network_features": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "Basic",
ValidateFunc: validation.StringInSlice(volumegroups.PossibleValuesForNetworkFeatures(), false),
},
},
Original file line number Diff line number Diff line change
@@ -1269,6 +1269,7 @@ func TestValidateNetAppVolumeGroupOracleVolumes(t *testing.T) {
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleData1)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
{ // log
@@ -1280,6 +1281,7 @@ func TestValidateNetAppVolumeGroupOracleVolumes(t *testing.T) {
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleLog)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
},
@@ -1296,6 +1298,7 @@ func TestValidateNetAppVolumeGroupOracleVolumes(t *testing.T) {
SecurityStyle: pointer.To(volumegroups.SecurityStyleUnix),
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleData1)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
{ // log
@@ -1306,6 +1309,7 @@ func TestValidateNetAppVolumeGroupOracleVolumes(t *testing.T) {
SecurityStyle: pointer.To(volumegroups.SecurityStyleUnix),
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleLog)),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
},
@@ -1323,6 +1327,7 @@ func TestValidateNetAppVolumeGroupOracleVolumes(t *testing.T) {
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleData1)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
{ // data2
@@ -1344,10 +1349,11 @@ func TestValidateNetAppVolumeGroupOracleVolumes(t *testing.T) {
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleLog)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE1"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
},
Errors: 10,
Errors: 2,
},
{
Name: "ValidatePlatformManagedKey",
@@ -1375,6 +1381,65 @@ func TestValidateNetAppVolumeGroupOracleVolumes(t *testing.T) {
},
Errors: 0,
},
{
Name: "ValidateCustomerManagedKeyFailsOnBasicNetworkFeatures",
VolumesData: []volumegroups.VolumeGroupVolumeProperties{
{ // data1
Name: pointer.To(fmt.Sprintf("volume-%v", string(VolumeSpecNameOracleData1))),
Properties: volumegroups.VolumeProperties{
ProtocolTypes: pointer.To([]string{"NFSv4.1"}),
ProximityPlacementGroup: pointer.To("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"),
SecurityStyle: pointer.To(volumegroups.SecurityStyleUnix),
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleData1)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesBasic),
},
},
{ // log
Name: pointer.To(fmt.Sprintf("volume-%v", string(VolumeSpecNameOracleLog))),
Properties: volumegroups.VolumeProperties{
ProtocolTypes: pointer.To([]string{"NFSv4.1"}),
ProximityPlacementGroup: pointer.To("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"),
SecurityStyle: pointer.To(volumegroups.SecurityStyleUnix),
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleLog)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
},
},
},
Errors: 2,
},
{
Name: "ValidateCustomerManagedKeyPassOnStandardNetworkFeatures",
VolumesData: []volumegroups.VolumeGroupVolumeProperties{
{ // data1
Name: pointer.To(fmt.Sprintf("volume-%v", string(VolumeSpecNameOracleData1))),
Properties: volumegroups.VolumeProperties{
ProtocolTypes: pointer.To([]string{"NFSv4.1"}),
ProximityPlacementGroup: pointer.To("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"),
SecurityStyle: pointer.To(volumegroups.SecurityStyleUnix),
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleData1)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
{ // log
Name: pointer.To(fmt.Sprintf("volume-%v", string(VolumeSpecNameOracleLog))),
Properties: volumegroups.VolumeProperties{
ProtocolTypes: pointer.To([]string{"NFSv4.1"}),
ProximityPlacementGroup: pointer.To("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"),
SecurityStyle: pointer.To(volumegroups.SecurityStyleUnix),
VolumeSpecName: pointer.To(string(VolumeSpecNameOracleLog)),
EncryptionKeySource: pointer.To(volumegroups.EncryptionKeySourceMicrosoftPointKeyVault),
KeyVaultPrivateEndpointResourceId: pointer.To("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myKeyvaultPE"),
NetworkFeatures: pointer.To(volumegroups.NetworkFeaturesStandard),
},
},
},
Errors: 0,
},
}

for _, tc := range cases {