Skip to content

Commit

Permalink
Merge pull request #14 from hashicorp/main
Browse files Browse the repository at this point in the history
Fork Sync: Update from parent repository
  • Loading branch information
mbialon authored Sep 20, 2023
2 parents 6072ae4 + 304b81e commit bfb7995
Show file tree
Hide file tree
Showing 162 changed files with 192 additions and 197 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ FEATURES:

ENHANCEMENTS:

* dependencies: updating to `v0.20230918.1115907` of `github.com/hashicorp/go-azure-sdk` [GH-23337]
* dependencies: downgrading to `v1.12.5` of `github.com/rickb777/date` [GH-23296]
* `mysql`: updating to use API Version `2022-01-01` [GH-23320]
* `azurerm_app_configuration` - add support for the `replica` block [GH-22452]
Expand All @@ -29,16 +30,18 @@ BUG FIXES:
* `azurerm_api_management_api` - set the `service_url` property when importing the resource [GH-23011]
* `azurerm_app_configuration` - prevent crash by nil checking the encryption configuration [GH-23302]
* `azurerm_app_configuration_feature` - update `percentage_filter_value` to accept correct type of float [GH-23263]
* `azurerm_linux_function_app` - fix a bug in setting the storage settings when using Elastic Premium plans [GH-21212]
* `azurerm_linux_web_app` - fix docker app stack update [GH-23303]
* `azurerm_linux_web_app` - Fix crash in auto heal expansion [GH-21328]
* `azurerm_linux_web_app_slot` - fix docker app stack update [GH-23303]
* `azurerm_linux_web_app_slot` - Fix crash in auto heal expansion [GH-21328]
* `azurerm_mssql_elasticpool` - remove check that prevents `license_type` from being set for certain skus [GH-23262]
* `azurerm_windows_web_app` - fix docker app stack update [GH-23303]
* `azurerm_windows_web_app_slot` - fix docker app stack update [GH-23303]
* `azurerm_servicebus_queue` - fixing an issue where `auto_delete_on_idle` couldn't be set to `P10675199DT2H48M5.4775807S` [GH-23296]
* `azurerm_servicebus_topic` - fixing an issue where `auto_delete_on_idle` couldn't be set to `P10675199DT2H48M5.4775807S` [GH-23296]
* `azurerm_storage_account` - prevent sending unsupported blob properties in payload for `Storage` account kind [GH-23288]
* `azurerm_windows_function_app` - fix a bug in setting the storage settings when using Elastic Premium plans [GH-21212]
* `azurerm_windows_web_app` - fix docker app stack update [GH-23303]
* `azurerm_windows_web_app_slot` - fix docker app stack update [GH-23303]

DEPRECATIONS:

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.1
github.com/hashicorp/go-azure-helpers v0.61.0
github.com/hashicorp/go-azure-sdk v0.20230907.1113401
github.com/hashicorp/go-azure-sdk v0.20230918.1115907
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-uuid v1.0.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv
github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg=
github.com/hashicorp/go-azure-helpers v0.61.0 h1:dIz23Vp8LdErxuImc6V5QIPtJcWjMgqP75bfp8o1Lro=
github.com/hashicorp/go-azure-helpers v0.61.0/go.mod h1:BQUQp5udwbJ8pnzl0wByCLVEEyPMAFpJ9vOREiCzObo=
github.com/hashicorp/go-azure-sdk v0.20230907.1113401 h1:rtikuZ4FzVZrJ4lbldIJk1oIa1+Ofnq76+Mv3muDbLs=
github.com/hashicorp/go-azure-sdk v0.20230907.1113401/go.mod h1:Rk63T4GsVOHb/WohiAX7F0tMEd8MIKV+g4aV0Jv4XEk=
github.com/hashicorp/go-azure-sdk v0.20230918.1115907 h1:V+SyLwBD9tpnW00H/AnqM2ir11CUchc0EPuf2Mi0c+s=
github.com/hashicorp/go-azure-sdk v0.20230918.1115907/go.mod h1:KSQRt0kuQGxFXo3t0KtQwTXhOWWxso2ZoSbtqQitruY=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
Expand Down
20 changes: 6 additions & 14 deletions internal/services/appservice/linux_function_app_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,20 +459,16 @@ func (r LinuxFunctionAppResource) Create() sdk.ResourceFunc {
suffix := uuid.New().String()[0:4]
_, contentOverVnetEnabled := functionApp.AppSettings["WEBSITE_CONTENTOVERVNET"]
_, contentSharePresent := functionApp.AppSettings["WEBSITE_CONTENTSHARE"]
_, contentShareConnectionString := functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]
if _, contentShareConnectionStringPresent := functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]; !contentShareConnectionStringPresent {
functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}

if !contentSharePresent {
if contentOverVnetEnabled {
return fmt.Errorf("the app_setting WEBSITE_CONTENTSHARE must be specified and set to a valid share when WEBSITE_CONTENTOVERVNET is specified")
}
functionApp.AppSettings["WEBSITE_CONTENTSHARE"] = fmt.Sprintf("%s-%s", strings.ToLower(functionApp.Name), suffix)
}
if !contentShareConnectionString {
if contentOverVnetEnabled && contentSharePresent {
return fmt.Errorf("WEBSITE_CONTENTAZUREFILECONNECTIONSTRING must be set when WEBSITE_CONTENTSHARE and WEBSITE_CONTENTOVERVNET are specified")
}
functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}
} else {
if _, present := functionApp.AppSettings["AzureWebJobsStorage__accountName"]; !present {
functionApp.AppSettings["AzureWebJobsStorage__accountName"] = storageString
Expand Down Expand Up @@ -945,20 +941,16 @@ func (r LinuxFunctionAppResource) Update() sdk.ResourceFunc {
suffix := uuid.New().String()[0:4]
_, contentOverVnetEnabled := state.AppSettings["WEBSITE_CONTENTOVERVNET"]
_, contentSharePresent := state.AppSettings["WEBSITE_CONTENTSHARE"]
_, contentShareConnectionString := state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]
if _, contentShareConnectionStringPresent := state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]; !contentShareConnectionStringPresent {
state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}

if !contentSharePresent {
if contentOverVnetEnabled {
return fmt.Errorf("the value of WEBSITE_CONTENTSHARE must be set to a predefined share when the storage account is restricted to a virtual network")
}
state.AppSettings["WEBSITE_CONTENTSHARE"] = fmt.Sprintf("%s-%s", strings.ToLower(state.Name), suffix)
}
if !contentShareConnectionString {
if contentOverVnetEnabled && contentSharePresent {
return fmt.Errorf("WEBSITE_CONTENTAZUREFILECONNECTIONSTRING must be set when WEBSITE_CONTENTSHARE and WEBSITE_CONTENTOVERVNET is specified")
}
state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}
} else {
if _, present := state.AppSettings["AzureWebJobsStorage__accountName"]; !present {
state.AppSettings["AzureWebJobsStorage__accountName"] = storageString
Expand Down
20 changes: 6 additions & 14 deletions internal/services/appservice/windows_function_app_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,20 +457,16 @@ func (r WindowsFunctionAppResource) Create() sdk.ResourceFunc {
suffix := uuid.New().String()[0:4]
_, contentOverVnetEnabled := functionApp.AppSettings["WEBSITE_CONTENTOVERVNET"]
_, contentSharePresent := functionApp.AppSettings["WEBSITE_CONTENTSHARE"]
_, contentShareConnectionString := functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]
if _, contentShareConnectionStringPresent := functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]; !contentShareConnectionStringPresent {
functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}

if !contentSharePresent {
if contentOverVnetEnabled {
return fmt.Errorf("the app_setting WEBSITE_CONTENTSHARE must be specified and set to a valid share when WEBSITE_CONTENTOVERVNET is specified")
}
functionApp.AppSettings["WEBSITE_CONTENTSHARE"] = fmt.Sprintf("%s-%s", strings.ToLower(functionApp.Name), suffix)
}
if !contentShareConnectionString {
if contentOverVnetEnabled && contentSharePresent {
return fmt.Errorf("WEBSITE_CONTENTAZUREFILECONNECTIONSTRING must be set when WEBSITE_CONTENTSHARE and WEBSITE_CONTENTOVERVNET are specified")
}
functionApp.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}
} else {
if _, present := functionApp.AppSettings["AzureWebJobsStorage__accountName"]; !present {
functionApp.AppSettings["AzureWebJobsStorage__accountName"] = storageString
Expand Down Expand Up @@ -948,20 +944,16 @@ func (r WindowsFunctionAppResource) Update() sdk.ResourceFunc {
suffix := uuid.New().String()[0:4]
_, contentOverVnetEnabled := state.AppSettings["WEBSITE_CONTENTOVERVNET"]
_, contentSharePresent := state.AppSettings["WEBSITE_CONTENTSHARE"]
_, contentShareConnectionString := state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]
if _, contentShareConnectionStringPresent := state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"]; !contentShareConnectionStringPresent {
state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}

if !contentSharePresent {
if contentOverVnetEnabled {
return fmt.Errorf("the value of WEBSITE_CONTENTSHARE must be set to a predefined share when the storage account is restricted to a virtual network")
}
state.AppSettings["WEBSITE_CONTENTSHARE"] = fmt.Sprintf("%s-%s", strings.ToLower(state.Name), suffix)
}
if !contentShareConnectionString {
if contentOverVnetEnabled && contentSharePresent {
return fmt.Errorf("WEBSITE_CONTENTAZUREFILECONNECTIONSTRING must be set when WEBSITE_CONTENTSHARE and WEBSITE_CONTENTOVERVNET is specified")
}
state.AppSettings["WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"] = storageString
}
} else {
if _, present := state.AppSettings["AzureWebJobsStorage__accountName"]; !present {
state.AppSettings["AzureWebJobsStorage__accountName"] = storageString
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bfb7995

Please sign in to comment.