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_log_analytics_linked_storage_account - fix data_source_type case sensitivity #18116

Merged
Merged
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package loganalytics
import (
"fmt"
"log"
"strings"
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
Expand Down Expand Up @@ -42,13 +41,12 @@ func resourceLogAnalyticsLinkedStorageAccount() *pluginsdk.Resource {
Required: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{
strings.ToLower(string(linkedstorageaccounts.DataSourceTypeCustomLogs)),
strings.ToLower(string(linkedstorageaccounts.DataSourceTypeAzureWatson)),
strings.ToLower(string(linkedstorageaccounts.DataSourceTypeQuery)),
strings.ToLower(string(linkedstorageaccounts.DataSourceTypeAlerts)),
// Value removed from enum in 2020-08-01, but effectively still works
"ingestion",
}, false),
string(linkedstorageaccounts.DataSourceTypeCustomLogs),
string(linkedstorageaccounts.DataSourceTypeAzureWatson),
string(linkedstorageaccounts.DataSourceTypeQuery),
string(linkedstorageaccounts.DataSourceTypeAlerts),
string(linkedstorageaccounts.DataSourceTypeIngestion),
}, true),
teowa marked this conversation as resolved.
Show resolved Hide resolved
},

"resource_group_name": azure.SchemaResourceGroupName(),
Expand Down Expand Up @@ -145,7 +143,6 @@ func resourceLogAnalyticsLinkedStorageAccountRead(d *pluginsdk.ResourceData, met
dataSourceType = string(*props.DataSourceType)
}
d.Set("data_source_type", dataSourceType)

}

return nil
Expand Down