-
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
resource/function_app: Share the site_config schema of app_service #3666
Conversation
The API and SDK intrinsicly links these as the *same* config block therefore, we can share the schema and take advantage of all of that of the app_service site_config block I added the new documentation to function_app to reflect the changes based in app_service. Also added a new test to show the enhancement request this was all to fix - addition of cors_support ``` ▶ acctests azurerm TestAccAzureRMFunctionApp_ === RUN TestAccAzureRMFunctionApp_basic === PAUSE TestAccAzureRMFunctionApp_basic === RUN TestAccAzureRMFunctionApp_requiresImport --- SKIP: TestAccAzureRMFunctionApp_requiresImport (0.00s) resource_arm_function_app_test.go:49: Skipping since resources aren't required to be imported === RUN TestAccAzureRMFunctionApp_tags === PAUSE TestAccAzureRMFunctionApp_tags === RUN TestAccAzureRMFunctionApp_tagsUpdate === PAUSE TestAccAzureRMFunctionApp_tagsUpdate === RUN TestAccAzureRMFunctionApp_appSettings === PAUSE TestAccAzureRMFunctionApp_appSettings === RUN TestAccAzureRMFunctionApp_siteConfig === PAUSE TestAccAzureRMFunctionApp_siteConfig === RUN TestAccAzureRMFunctionApp_linuxFxVersion === PAUSE TestAccAzureRMFunctionApp_linuxFxVersion === RUN TestAccAzureRMFunctionApp_connectionStrings === PAUSE TestAccAzureRMFunctionApp_connectionStrings === RUN TestAccAzureRMFunctionApp_siteConfigMulti === PAUSE TestAccAzureRMFunctionApp_siteConfigMulti === RUN TestAccAzureRMFunctionApp_updateVersion === PAUSE TestAccAzureRMFunctionApp_updateVersion === RUN TestAccAzureRMFunctionApp_3264bit === PAUSE TestAccAzureRMFunctionApp_3264bit === RUN TestAccAzureRMFunctionApp_httpsOnly === PAUSE TestAccAzureRMFunctionApp_httpsOnly === RUN TestAccAzureRMFunctionApp_consumptionPlan === PAUSE TestAccAzureRMFunctionApp_consumptionPlan === RUN TestAccAzureRMFunctionApp_consumptionPlanUppercaseName === PAUSE TestAccAzureRMFunctionApp_consumptionPlanUppercaseName === RUN TestAccAzureRMFunctionApp_createIdentity === PAUSE TestAccAzureRMFunctionApp_createIdentity === RUN TestAccAzureRMFunctionApp_updateIdentity === PAUSE TestAccAzureRMFunctionApp_updateIdentity === RUN TestAccAzureRMFunctionApp_loggingDisabled === PAUSE TestAccAzureRMFunctionApp_loggingDisabled === RUN TestAccAzureRMFunctionApp_updateLogging === PAUSE TestAccAzureRMFunctionApp_updateLogging === RUN TestAccAzureRMFunctionApp_corsSettings === PAUSE TestAccAzureRMFunctionApp_corsSettings === CONT TestAccAzureRMFunctionApp_basic === CONT TestAccAzureRMFunctionApp_3264bit === CONT TestAccAzureRMFunctionApp_linuxFxVersion === CONT TestAccAzureRMFunctionApp_updateVersion --- PASS: TestAccAzureRMFunctionApp_basic (138.80s) === CONT TestAccAzureRMFunctionApp_siteConfigMulti --- PASS: TestAccAzureRMFunctionApp_linuxFxVersion (151.18s) === CONT TestAccAzureRMFunctionApp_connectionStrings --- PASS: TestAccAzureRMFunctionApp_3264bit (174.06s) === CONT TestAccAzureRMFunctionApp_appSettings --- PASS: TestAccAzureRMFunctionApp_updateVersion (175.55s) === CONT TestAccAzureRMFunctionApp_siteConfig --- PASS: TestAccAzureRMFunctionApp_connectionStrings (135.78s) === CONT TestAccAzureRMFunctionApp_updateIdentity --- PASS: TestAccAzureRMFunctionApp_siteConfig (142.55s) === CONT TestAccAzureRMFunctionApp_updateLogging --- PASS: TestAccAzureRMFunctionApp_appSettings (211.50s) === CONT TestAccAzureRMFunctionApp_loggingDisabled --- PASS: TestAccAzureRMFunctionApp_updateIdentity (168.26s) === CONT TestAccAzureRMFunctionApp_tags --- PASS: TestAccAzureRMFunctionApp_siteConfigMulti (354.83s) === CONT TestAccAzureRMFunctionApp_tagsUpdate --- PASS: TestAccAzureRMFunctionApp_updateLogging (206.62s) === CONT TestAccAzureRMFunctionApp_consumptionPlanUppercaseName --- PASS: TestAccAzureRMFunctionApp_loggingDisabled (144.01s) === CONT TestAccAzureRMFunctionApp_createIdentity --- PASS: TestAccAzureRMFunctionApp_tags (136.79s) === CONT TestAccAzureRMFunctionApp_consumptionPlan --- PASS: TestAccAzureRMFunctionApp_consumptionPlanUppercaseName (165.62s) === CONT TestAccAzureRMFunctionApp_httpsOnly --- PASS: TestAccAzureRMFunctionApp_createIdentity (165.89s) --- PASS: TestAccAzureRMFunctionApp_tagsUpdate (205.60s) --- PASS: TestAccAzureRMFunctionApp_consumptionPlan (172.33s) --- PASS: TestAccAzureRMFunctionApp_httpsOnly (126.97s) === CONT TestAccAzureRMFunctionApp_corsSettings --- PASS: TestAccAzureRMFunctionApp_corsSettings (138.49s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 817.367s ```
After speaking with @tombuildsstuff offline about this, we can't take this approach. Even though the SDK uses the same models under the hood, the API accept different versions of the parameters. So the reuse of the same swagger to generate the SDK feels stupid IMO |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Fixes: #1374
The API and SDK intrinsically links these as the same config block
therefore, we can share the schema and take advantage of all of that
of the app_service site_config block
I added the new documentation to function_app to reflect the changes
based in app_service. Also added a new test to show the enhancement
request this was all to fix - addition of cors_support