Skip to content

Commit

Permalink
fix nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
catriona-m committed Oct 4, 2024
1 parent b2331f8 commit 92ef223
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/services/mssql/mssql_database_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ func resourceMsSqlDatabaseCreate(d *pluginsdk.ResourceData, meta interface{}) er
return fmt.Errorf("retrieving %s: %s", elasticId, err)
}

if elasticPool.Model != nil && elasticPool.Model.Properties != nil {

if elasticPool.Model.Properties.PreferredEnclaveType != nil {
if elasticPool.Model != nil {
if elasticPool.Model.Properties != nil && elasticPool.Model.Properties.PreferredEnclaveType != nil {
elasticEnclaveType := string(pointer.From(elasticPool.Model.Properties.PreferredEnclaveType))
databaseEnclaveType := string(enclaveType)

Expand Down

0 comments on commit 92ef223

Please sign in to comment.