Skip to content

Commit

Permalink
Merge branch 'pmarques/avg-oracle' of github.com:paulomarquesc/terraf…
Browse files Browse the repository at this point in the history
…orm-provider-azurerm into pmarques/avg-oracle
  • Loading branch information
paulomarquesc committed Dec 27, 2024
2 parents b782821 + c3023ab commit f44941d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
20 changes: 19 additions & 1 deletion internal/services/netapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,22 @@ backupPolicyIdRemoval := volumes.VolumePatch{
},
},
}
```
```

## `Computed` attribute of a few configuration items

- Azure NetApp Files resources are complex enough on the backend and a few configuration items must remain in `computed = true` state and not changed under any circumstance, otherwise, if it is a `ForceNew = true` type of configuration, it may result in data loss. The best example of this is the configuration called `network_features`, this must be `computed = true` at all times, Azure NetApp Files team will soon make changes to networking that will make the property `network_features` be changed from `basic` to `standard` and to prevent data loss, this configuration should stay as is, with `computed = true` set.

```golang
"network_features": {
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
Default: string(volumes.NetworkFeaturesBasic),
ValidateFunc: validation.StringInSlice([]string{
string(volumes.NetworkFeaturesBasic),
string(volumes.NetworkFeaturesStandard),
}, false),
},
```

Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ func (r NetAppVolumeGroupOracleResource) Arguments() map[string]*pluginsdk.Schem
Type: pluginsdk.TypeString,
Optional: true,
Default: "Basic",
Computed: true,
ValidateFunc: validation.StringInSlice(volumegroups.PossibleValuesForNetworkFeatures(), false),
},
},
Expand Down
1 change: 1 addition & 0 deletions internal/services/netapp/netapp_volume_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func resourceNetAppVolume() *pluginsdk.Resource {
"network_features": {
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
Default: string(volumes.NetworkFeaturesBasic),
ValidateFunc: validation.StringInSlice([]string{
string(volumes.NetworkFeaturesBasic),
Expand Down

0 comments on commit f44941d

Please sign in to comment.