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

r/storage_account: defaulting the value for dns_endpoint_type #25367

Merged
merged 1 commit into from
Mar 22, 2024
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
9 changes: 8 additions & 1 deletion internal/services/storage/storage_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,14 @@ func resourceStorageAccountRead(d *pluginsdk.ResourceData, meta interface{}) err
publicNetworkAccessEnabled = false
}
d.Set("public_network_access_enabled", publicNetworkAccessEnabled)
d.Set("dns_endpoint_type", props.DNSEndpointType)

// DNSEndpointType is null when unconfigured - therefore default this to Standard
dnsEndpointType := storage.DNSEndpointTypeStandard
if props.DNSEndpointType != "" {
// TODO: when this is ported over to `hashicorp/go-azure-sdk` this should be able to become != nil
dnsEndpointType = props.DNSEndpointType
}
d.Set("dns_endpoint_type", dnsEndpointType)

if crossTenantReplication := props.AllowCrossTenantReplication; crossTenantReplication != nil {
d.Set("cross_tenant_replication_enabled", crossTenantReplication)
Expand Down
Loading