Skip to content

Commit

Permalink
Merge pull request #25367 from hashicorp/b/storage-account-dns-zone
Browse files Browse the repository at this point in the history
r/storage_account: defaulting the value for `dns_endpoint_type`
  • Loading branch information
tombuildsstuff authored Mar 22, 2024
2 parents 571e6d6 + 5738f92 commit e0bf475
Showing 1 changed file with 8 additions and 1 deletion.
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

0 comments on commit e0bf475

Please sign in to comment.