Skip to content
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

Add fields for App Service and App Service Slot #9162

Conversation

daxsorbito
Copy link
Contributor

@daxsorbito daxsorbito commented Nov 5, 2020

Background

This PR adds detailed_error_mesage_enabled and failed_request_tracing_enabled properties to the App Service and App Service Slot resources's log argument reference.

Both fields are optional and have a default value of false.

This is a fix for this issue: #7050

Usage

azurerm_app_service

resource "azurerm_app_service" "example" {
  # Other settings here
  logs {
    detailed_error_messages_enabled = true
    failed_request_tracing_enabled  = true
  }
}

azurerm_app_service_slot

resource "azurerm_app_service_slot" "example" {
  # Other settings here
  logs {
    detailed_error_messages_enabled = true
    failed_request_tracing_enabled  = true
  }
}

Test Result

❯ make acctests SERVICE='web' TESTARGS='-run=TestAccAzureRMAppService.*Log' TESTTIMEOUT='60m'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./azurerm/internal/services/web/tests/ -run=TestAccAzureRMAppService.*Log -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAzureRMAppServiceSlot_authSettingsAdditionalLoginParams
=== PAUSE TestAccAzureRMAppServiceSlot_authSettingsAdditionalLoginParams
=== RUN   TestAccAzureRMAppServiceSlot_applicationBlobStorageLogs
=== PAUSE TestAccAzureRMAppServiceSlot_applicationBlobStorageLogs
=== RUN   TestAccAzureRMAppServiceSlot_httpFileSystemLogs
=== PAUSE TestAccAzureRMAppServiceSlot_httpFileSystemLogs
=== RUN   TestAccAzureRMAppServiceSlot_httpBlobStorageLogs
=== PAUSE TestAccAzureRMAppServiceSlot_httpBlobStorageLogs
=== RUN   TestAccAzureRMAppServiceSlot_detailedErrorMessagesLogs
=== PAUSE TestAccAzureRMAppServiceSlot_detailedErrorMessagesLogs
=== RUN   TestAccAzureRMAppServiceSlot_failedRequestTracingLogs
=== PAUSE TestAccAzureRMAppServiceSlot_failedRequestTracingLogs
=== RUN   TestAccAzureRMAppService_applicationBlobStorageLogs
=== PAUSE TestAccAzureRMAppService_applicationBlobStorageLogs
=== RUN   TestAccAzureRMAppService_httpFileSystemLogs
=== PAUSE TestAccAzureRMAppService_httpFileSystemLogs
=== RUN   TestAccAzureRMAppService_httpBlobStorageLogs
=== PAUSE TestAccAzureRMAppService_httpBlobStorageLogs
=== RUN   TestAccAzureRMAppService_httpFileSystemAndStorageBlobLogs
=== PAUSE TestAccAzureRMAppService_httpFileSystemAndStorageBlobLogs
=== RUN   TestAccAzureRMAppService_detailedErrorMessagesLogs
=== PAUSE TestAccAzureRMAppService_detailedErrorMessagesLogs
=== RUN   TestAccAzureRMAppService_failedRequestTracingLogs
=== PAUSE TestAccAzureRMAppService_failedRequestTracingLogs
=== RUN   TestAccAzureRMAppService_authSettingsAdditionalLoginParams
=== PAUSE TestAccAzureRMAppService_authSettingsAdditionalLoginParams
=== CONT  TestAccAzureRMAppServiceSlot_authSettingsAdditionalLoginParams
=== CONT  TestAccAzureRMAppService_httpFileSystemLogs
=== CONT  TestAccAzureRMAppServiceSlot_failedRequestTracingLogs
=== CONT  TestAccAzureRMAppService_authSettingsAdditionalLoginParams
=== CONT  TestAccAzureRMAppServiceSlot_httpBlobStorageLogs
=== CONT  TestAccAzureRMAppService_detailedErrorMessagesLogs
=== CONT  TestAccAzureRMAppServiceSlot_detailedErrorMessagesLogs
=== CONT  TestAccAzureRMAppService_applicationBlobStorageLogs
=== CONT  TestAccAzureRMAppService_failedRequestTracingLogs
=== CONT  TestAccAzureRMAppServiceSlot_httpFileSystemLogs
=== CONT  TestAccAzureRMAppService_httpFileSystemAndStorageBlobLogs
=== CONT  TestAccAzureRMAppServiceSlot_applicationBlobStorageLogs
=== CONT  TestAccAzureRMAppService_httpBlobStorageLogs
--- PASS: TestAccAzureRMAppService_authSettingsAdditionalLoginParams (135.71s)
--- PASS: TestAccAzureRMAppService_httpFileSystemAndStorageBlobLogs (141.66s)
--- PASS: TestAccAzureRMAppService_httpFileSystemLogs (142.56s)
--- PASS: TestAccAzureRMAppService_detailedErrorMessagesLogs (143.23s)
--- PASS: TestAccAzureRMAppService_failedRequestTracingLogs (143.60s)
--- PASS: TestAccAzureRMAppService_applicationBlobStorageLogs (145.94s)
--- PASS: TestAccAzureRMAppServiceSlot_applicationBlobStorageLogs (148.38s)
--- PASS: TestAccAzureRMAppServiceSlot_httpFileSystemLogs (151.73s)
--- PASS: TestAccAzureRMAppServiceSlot_httpBlobStorageLogs (152.07s)
--- PASS: TestAccAzureRMAppService_httpBlobStorageLogs (170.66s)
--- PASS: TestAccAzureRMAppServiceSlot_authSettingsAdditionalLoginParams (181.56s)
--- PASS: TestAccAzureRMAppServiceSlot_failedRequestTracingLogs (183.22s)
--- PASS: TestAccAzureRMAppServiceSlot_detailedErrorMessagesLogs (185.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/web/tests	(cached)```

@vicioussn

This comment has been minimized.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @daxsorbito
Thanks for this PR, it's off to a good start. I've left some comments and changes/suggestions below.

azurerm/internal/services/web/app_service.go Outdated Show resolved Hide resolved
azurerm/internal/services/web/app_service.go Outdated Show resolved Hide resolved
azurerm/internal/services/web/app_service.go Outdated Show resolved Hide resolved
azurerm/internal/services/web/app_service.go Outdated Show resolved Hide resolved
website/docs/r/app_service.html.markdown Outdated Show resolved Hide resolved
website/docs/r/app_service_slot.html.markdown Outdated Show resolved Hide resolved
@ghost ghost added size/L and removed size/XL labels Nov 18, 2020
@katbyte katbyte added this to the v2.42.0 milestone Dec 27, 2020
@jackofallops jackofallops force-pushed the appService-and-appServiceSlot-new-fields branch from f2ce6f2 to ca7f945 Compare January 7, 2021 10:22
@jackofallops
Copy link
Member

Hi @daxsorbito - I hope you don't mind, but I've fixed up the merge conflicts here and updated the tests to the match the rest in the package. I'll get the tests run for this today and it should be good for today's release if everything looks good. Thanks again for your contribution 👍

@jackofallops
Copy link
Member

Tests looking good, failures unrelated:
image

@jackofallops jackofallops merged commit 528dba7 into hashicorp:master Jan 7, 2021
jackofallops added a commit that referenced this pull request Jan 7, 2021
@ghost
Copy link

ghost commented Jan 8, 2021

This has been released in version 2.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.42.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Feb 6, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants