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

azurerm_netapp_snapshot_policy - remove four point oh feature flag #27335

Merged
Merged
Changes from all commits
Commits
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
17 changes: 0 additions & 17 deletions internal/services/netapp/netapp_snapshot_policy_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
netAppValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
Expand Down Expand Up @@ -72,7 +71,6 @@ func resourceNetAppSnapshotPolicy() *pluginsdk.Resource {
Type: pluginsdk.TypeList,
Optional: true,
MaxItems: 1,
Computed: !features.FourPointOhBeta(),
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"snapshots_to_keep": {
Expand All @@ -94,7 +92,6 @@ func resourceNetAppSnapshotPolicy() *pluginsdk.Resource {
Type: pluginsdk.TypeList,
Optional: true,
MaxItems: 1,
Computed: !features.FourPointOhBeta(),
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"snapshots_to_keep": {
Expand Down Expand Up @@ -122,7 +119,6 @@ func resourceNetAppSnapshotPolicy() *pluginsdk.Resource {
Type: pluginsdk.TypeList,
Optional: true,
MaxItems: 1,
Computed: !features.FourPointOhBeta(),
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"snapshots_to_keep": {
Expand Down Expand Up @@ -160,7 +156,6 @@ func resourceNetAppSnapshotPolicy() *pluginsdk.Resource {
Type: pluginsdk.TypeList,
Optional: true,
MaxItems: 1,
Computed: !features.FourPointOhBeta(),
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"snapshots_to_keep": {
Expand Down Expand Up @@ -199,30 +194,18 @@ func resourceNetAppSnapshotPolicy() *pluginsdk.Resource {

CustomizeDiff: pluginsdk.CustomDiffWithAll(
pluginsdk.ForceNewIfChange("hourly_schedule", func(ctx context.Context, old, new, meta interface{}) bool {
if !features.FourPointOhBeta() {
return false
}
return len(old.([]interface{})) > 0 && len(new.([]interface{})) == 0
}),

pluginsdk.ForceNewIfChange("daily_schedule", func(ctx context.Context, old, new, meta interface{}) bool {
if !features.FourPointOhBeta() {
return false
}
return len(old.([]interface{})) > 0 && len(new.([]interface{})) == 0
}),

pluginsdk.ForceNewIfChange("weekly_schedule", func(ctx context.Context, old, new, meta interface{}) bool {
if !features.FourPointOhBeta() {
return false
}
return len(old.([]interface{})) > 0 && len(new.([]interface{})) == 0
}),

pluginsdk.ForceNewIfChange("monthly_schedule", func(ctx context.Context, old, new, meta interface{}) bool {
if !features.FourPointOhBeta() {
return false
}
return len(old.([]interface{})) > 0 && len(new.([]interface{})) == 0
}),
),
Expand Down
Loading