Skip to content

Commit

Permalink
Merge pull request #15829 from ms-henglu/ticket-13798286-fix-synapse-…
Browse files Browse the repository at this point in the history
…workspace-import

fix import a connected synapse workspace
  • Loading branch information
tombuildsstuff authored Mar 22, 2022
2 parents 188244c + 6fba699 commit 32fc726
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/services/synapse/synapse_workspace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,15 @@ func resourceSynapseWorkspaceRead(d *pluginsdk.ResourceData, meta interface{}) e

aadAdmin, err := aadAdminClient.Get(ctx, id.ResourceGroup, id.Name)
if err != nil {
if !utils.ResponseWasNotFound(aadAdmin.Response) {
// NOTE: AAD Admin isn't supported for a Workspace created from a Dedicated SQL Pool / SQL DataWarehouse and returns a Conflict
if !utils.ResponseWasNotFound(aadAdmin.Response) && !utils.ResponseWasConflict(aadAdmin.Response) {
return fmt.Errorf("retrieving AzureAD Admin for %s: %+v", *id, err)
}
}
sqlAdmin, err := sqlAdminClient.Get(ctx, id.ResourceGroup, id.Name)
if err != nil {
if !utils.ResponseWasNotFound(sqlAdmin.Response) {
// NOTE: SQL Admin isn't supported for a Workspace created from a Dedicated SQL Pool / SQL DataWarehouse and returns a Conflict
if !utils.ResponseWasNotFound(sqlAdmin.Response) && !utils.ResponseWasConflict(sqlAdmin.Response) {
return fmt.Errorf("retrieving Sql Admin for %s: %+v", *id, err)
}
}
Expand Down

0 comments on commit 32fc726

Please sign in to comment.