Skip to content

Commit

Permalink
Update linux_function_app_resource.go
Browse files Browse the repository at this point in the history
Latest Azure API changes throws errors if this setting is present in both locations:

```
performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with response: {"Code":"BadRequest","Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property.","Target":null,"Details":[{"Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"01020","MessageTemplate":"There was a conflict. {0}","Parameters":["SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."],"Code":"BadRequest","Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."}}],"Innererror":null}
```
  • Loading branch information
pauldotknopf authored Apr 29, 2024
1 parent 1714812 commit 29a4f5f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions internal/services/appservice/linux_function_app_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,7 @@ func (r LinuxFunctionAppResource) Update() sdk.ResourceFunc {
pna = helpers.PublicNetworkAccessDisabled
}

// (@jackofallops) - Values appear to need to be set in both SiteProperties and SiteConfig for now? https://github.com/Azure/azure-rest-api-specs/issues/24681
model.Properties.PublicNetworkAccess = pointer.To(pna)
model.Properties.SiteConfig.PublicNetworkAccess = model.Properties.PublicNetworkAccess
}

if err := client.CreateOrUpdateThenPoll(ctx, *id, model); err != nil {
Expand Down

0 comments on commit 29a4f5f

Please sign in to comment.