Skip to content

Commit

Permalink
disable_default_output field can be sourced from `ARM_DISABLE_DEFAU…
Browse files Browse the repository at this point in the history
…LT_OUTPUT` env
  • Loading branch information
ms-henglu committed Mar 6, 2025
1 parent 18189e1 commit aca4d6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FEATURES:
ENHANCEMENTS:
- `azapi` provider: The `oidc_azure_service_connection_id` field can be sourced from the `ARM_ADO_PIPELINE_SERVICE_CONNECTION_ID` or `ARM_OIDC_AZURE_SERVICE_CONNECTION_ID` Environment Variables.
- `azapi` provider: The `enable_preflight` field can be sourced from the `ARM_ENABLE_PRE_FLIGHT` Environment Variable.
- `azapi` provider: The `disable_default_output` field can be sourced from the `ARM_DISABLE_DEFAULT_OUTPUT` Environment Variable.
- `azapi` provider: Support `maximum_busy_retry_attempts` field, which is used to specify the maximum number of busy retry attempts if the Azure API returns an HTTP 408, 429, 500, 502, 503, or 504 response.
- `azapi_resource_action` resource, data source: Support `sensitive_response_export_values` field, which is used to specify the sensitive fields to export.
- `azaapi_resource_action` resource, data source: Support `sensitive_output` field, which is a sensitive computed field that contains the fields exported by `sensitive_response_export_values`.
Expand Down
8 changes: 6 additions & 2 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (p Provider) Schema(ctx context.Context, request provider.SchemaRequest, re

"disable_default_output": schema.BoolAttribute{
Optional: true,
Description: "Disable default output. The default is false. When set to false, the provider will output the read-only properties if `response_export_values` is not specified in the resource block. When set to true, the provider will disable this output.",
Description: "Disable default output. The default is false. When set to false, the provider will output the read-only properties if `response_export_values` is not specified in the resource block. When set to true, the provider will disable this output. This can also be sourced from the `ARM_DISABLE_DEFAULT_OUTPUT` Environment Variable.",
},

"maximum_busy_retry_attempts": schema.Int32Attribute{
Expand Down Expand Up @@ -592,7 +592,11 @@ func (p Provider) Configure(ctx context.Context, request provider.ConfigureReque
}
}
if model.DisableDefaultOutput.IsNull() {
model.DisableDefaultOutput = types.BoolValue(false)
if v := os.Getenv("ARM_DISABLE_DEFAULT_OUTPUT"); v != "" {
model.DisableDefaultOutput = types.BoolValue(v == "true")
} else {
model.DisableDefaultOutput = types.BoolValue(false)
}
}

var cloudConfig cloud.Configuration
Expand Down

0 comments on commit aca4d6a

Please sign in to comment.