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

feature flagged schema fixes #23024

Merged
merged 4 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion internal/services/appservice/helpers/app_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ var windowsApplicationStackConstraint = []string{
"site_config.0.application_stack.0.java_version",
"site_config.0.application_stack.0.node_version",
"site_config.0.application_stack.0.php_version",
"site_config.0.application_stack.0.python_version",
"site_config.0.application_stack.0.python",
}

Expand Down
4 changes: 2 additions & 2 deletions internal/services/consumption/consumption_budget_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (br consumptionBudgetBaseResource) arguments(fields map[string]*pluginsdk.S
"dimension": {
Type: pluginsdk.TypeSet,
Optional: true,
AtLeastOneOf: []string{"filter.0.dimension", "filter.0.tag", "filter.0.not"},
AtLeastOneOf: []string{"filter.0.dimension", "filter.0.tag"},
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"name": {
Expand Down Expand Up @@ -105,7 +105,7 @@ func (br consumptionBudgetBaseResource) arguments(fields map[string]*pluginsdk.S
"tag": {
Type: pluginsdk.TypeSet,
Optional: true,
AtLeastOneOf: []string{"filter.0.dimension", "filter.0.tag", "filter.0.not"},
AtLeastOneOf: []string{"filter.0.dimension", "filter.0.tag"},
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"name": {
Expand Down
5 changes: 2 additions & 3 deletions internal/services/kusto/kusto_cluster_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,8 @@ func resourceKustoCluster() *pluginsdk.Resource {

if features.FourPointOhBeta() {
s.Schema["language_extensions"] = &pluginsdk.Schema{
Type: pluginsdk.TypeList,
Optional: true,
ConflictsWith: []string{"language_extensions"},
Type: pluginsdk.TypeList,
Optional: true,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"name": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,10 @@ func resourceMonitorDiagnosticSetting() *pluginsdk.Resource {
},

"enabled_log": {
Type: pluginsdk.TypeSet,
Optional: true,
Computed: !features.FourPointOhBeta(),
ConflictsWith: []string{"log"},
AtLeastOneOf: []string{"enabled_log", "log", "metric"},
Type: pluginsdk.TypeSet,
Optional: true,
Computed: !features.FourPointOhBeta(),
AtLeastOneOf: []string{"enabled_log", "metric"},
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"category": {
Expand Down Expand Up @@ -153,7 +152,7 @@ func resourceMonitorDiagnosticSetting() *pluginsdk.Resource {
"metric": {
Type: pluginsdk.TypeSet,
Optional: true,
AtLeastOneOf: []string{"enabled_log", "log", "metric"},
AtLeastOneOf: []string{"enabled_log", "metric"},
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"category": {
Expand Down Expand Up @@ -240,6 +239,9 @@ func resourceMonitorDiagnosticSetting() *pluginsdk.Resource {
},
Set: resourceMonitorDiagnosticLogSettingHash,
}

resource.Schema["metric"].AtLeastOneOf = []string{"enabled_log", "log", "metric"}
resource.Schema["enabled_log"].ConflictsWith = []string{"log"}
}

return resource
Expand Down