-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_windows_web_app
- fix health_check_eviction_time_in_min
not being set issue
#17656
Changes from 1 commit
39875da
a38a79b
5a00e49
2b6b6bb
0688340
2f3b1e6
a3e5a0a
7e36c9c
243a6b0
a236563
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3785,8 +3785,8 @@ func ExpandAppSettingsForCreate(settings map[string]string) *[]web.NameValuePair | |
return nil | ||
} | ||
|
||
func FlattenAppSettings(input web.StringDictionary) (map[string]string, *int) { | ||
maxPingFailures := "WEBSITE_HEALTHCHECK_MAXPINGFAILURE" | ||
func FlattenAppSettings(input web.StringDictionary, d sdk.ResourceMetaData) (map[string]string, *int) { | ||
maxPingFailures := "WEBSITE_HEALTHCHECK_MAXPINGFAILURES" | ||
unmanagedSettings := []string{ | ||
"DIAGNOSTICS_AZUREBLOBCONTAINERSASURL", | ||
"DIAGNOSTICS_AZUREBLOBRETENTIONINDAYS", | ||
|
@@ -3803,6 +3803,12 @@ func FlattenAppSettings(input web.StringDictionary) (map[string]string, *int) { | |
healthCheckCount = &h | ||
} | ||
|
||
if userInputAppSetting := d.ResourceData.Get("app_settings").(map[string]interface{}); userInputAppSetting != nil { | ||
if _, ok := userInputAppSetting[maxPingFailures]; ok { | ||
unmanagedSettings = unmanagedSettings[:len(unmanagedSettings)-1] | ||
} | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be removed, users should set this value via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But azure provided such way to set this property and lots of users are aware of this usage as well. shall we just let them set it via app_setting? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have moved it out of the map into its own property, therefor it should only be set there as @jackofallops, and if the user does put it into the app settings map we should maybe toss up an error telling the user to set it there? |
||
// Remove the settings the service adds for legacy reasons. | ||
for _, v := range unmanagedSettings { //nolint:typecheck | ||
delete(appSettings, v) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the metadata is not needed here, just the correction of the typo in the
WEBSITE_HEALTHCHECK_MAXPINGFAILURES
string.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to move the
WEBSITE_HEALTHCHECK_MAXPINGFAILURES
from theunmanagedSettings
list if user adds the key explicitly in the config?