Skip to content

Commit

Permalink
Remove Workaround for US Gov Bug (#987)
Browse files Browse the repository at this point in the history
* Update client.go

* Update client.go

* fix format

* Update client.go
  • Loading branch information
MarkDordoy committed Jan 30, 2023
1 parent 802ac9b commit 02942df
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions internal/services/applications/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package client

import (
"github.com/hashicorp/terraform-provider-azuread/internal/common"
"github.com/manicminer/hamilton/environments"
"github.com/manicminer/hamilton/msgraph"
)

Expand All @@ -18,14 +17,6 @@ func NewClient(o *common.ClientOptions) *Client {

applicationTemplatesClient := msgraph.NewApplicationTemplatesClient(o.TenantID)

if o.Environment.MsGraph.Endpoint == environments.MsGraphUSGovL4Endpoint {
//Short term fix while we wait for Microsoft to fix an intermittent 504 error causing an applicationTemplate instantiate
//call to produce a 504. However MS api doesnt cancel request and you end up creating multiple app registrations and service principals
//as the client retries. Bug is not present in the beta API.
//Expected fix Feb 2023
applicationTemplatesClient.BaseClient.ApiVersion = msgraph.VersionBeta
}

o.ConfigureClient(&applicationTemplatesClient.BaseClient)

directoryObjectsClient := msgraph.NewDirectoryObjectsClient(o.TenantID)
Expand Down

0 comments on commit 02942df

Please sign in to comment.