Skip to content

Commit

Permalink
Handle gone gracefully in read for azurerm_mssql_server_dns_alias (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
turkenh authored Oct 3, 2022
1 parent e509c56 commit b108d0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/services/mssql/mssql_server_dns_alias_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (m ServerDNSAliasResource) Read() sdk.ResourceFunc {
client := metadata.Client.MSSQL.ServerDNSAliasClient
alias, err := client.Get(ctx, id.ResourceGroup, id.ServerName, id.DnsAliaseName)
if err != nil {
if utils.ResponseWasNotFound(alias.Response) {
return metadata.MarkAsGone(id)
}
return err
}
state := ServerDNSAliasModel{
Expand Down

0 comments on commit b108d0d

Please sign in to comment.