Skip to content

Commit

Permalink
update azurerm_log_analytics_workspace sku option (#27494)
Browse files Browse the repository at this point in the history
  • Loading branch information
hqhqhqhqhqhqhqhqhqhqhq authored Sep 30, 2024
1 parent 8477e14 commit 5805cda
Showing 1 changed file with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/loganalytics/migration"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/loganalytics/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
Expand All @@ -32,7 +31,7 @@ import (
)

func resourceLogAnalyticsWorkspace() *pluginsdk.Resource {
resource := &pluginsdk.Resource{
return &pluginsdk.Resource{
Create: resourceLogAnalyticsWorkspaceCreateUpdate,
Read: resourceLogAnalyticsWorkspaceRead,
Update: resourceLogAnalyticsWorkspaceCreateUpdate,
Expand Down Expand Up @@ -179,25 +178,6 @@ func resourceLogAnalyticsWorkspace() *pluginsdk.Resource {
"tags": commonschema.Tags(),
},
}

if !features.FourPointOhBeta() {
resource.Schema["sku"] = &pluginsdk.Schema{
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{
string(workspaces.WorkspaceSkuNameEnumFree),
string(workspaces.WorkspaceSkuNameEnumPerGBTwoZeroOneEight),
string(workspaces.WorkspaceSkuNameEnumPerNode),
string(workspaces.WorkspaceSkuNameEnumPremium),
string(workspaces.WorkspaceSkuNameEnumStandalone),
string(workspaces.WorkspaceSkuNameEnumStandard),
string(workspaces.WorkspaceSkuNameEnumCapacityReservation),
"Unlimited", // TODO check if this is actually no longer valid, removed in v28.0.0 of the SDK
}, false),
}
}
return resource
}

func resourceLogAnalyticsWorkspaceCustomDiff(ctx context.Context, d *pluginsdk.ResourceDiff, _ interface{}) error {
Expand Down

0 comments on commit 5805cda

Please sign in to comment.