terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

custom_domain_verification_id output not being written to state file for azurerm_linux_function_app resources

Open shinji opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.2.4

AzureRM Provider Version

3.11.0

Affected Resource(s)/Data Source(s)

azurerm_linux_function_app

Terraform Configuration Files

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_storage_account" "example" {
  name                     = "linuxfunctionappsa"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_service_plan" "example" {
  name                = "example-app-service-plan"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  os_type             = "Linux"
  sku_name            = "Y1"
}

resource "azurerm_linux_function_app" "example" {
  name                = "example-linux-function-app"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location

  storage_account_name = azurerm_storage_account.example.name
  service_plan_id      = azurerm_service_plan.example.id

  site_config {}
}

output "custom-domain-verification-id" {
  value     = azurerm_linux_function_app.example.custom_domain_verification_id
  sensitive = true
}

Debug Output/Panic Output

$ terraform output custom-domain-verification-id
""

Expected Behaviour

$ terraform output custom-domain-verification-id
"CUSTOM DOMAIN VERIFICATION ID"

Actual Behaviour

$ terraform output custom-domain-verification-id
""

Steps to Reproduce

No response

Important Factoids

No response

References

Similar bug: https://github.com/hashicorp/terraform-provider-azurerm/issues/17042

shinji avatar Jun 29 '22 21:06 shinji

I can confirm some more version combinations in which this is currently broken

  • Terraform 1.2.4 and azurerm 3.9.0
  • Terraform 1.2.4 and azurerm 3.10.0
  • Terraform 1.2.4 and azurerm 3.11.0
  • Terraform 1.2.4 and azurerm 3.12.0
  • Terraform 1.2.3 and azurerm 3.12.0
  • Terraform 1.2.2 and azurerm 3.12.0
  • Terraform 1.2.1 and azurerm 3.12.0
  • Terraform 1.2.0 and azurerm 3.12.0
  • Terraform 1.3.0-alpha20220622 and azurerm 3.12.0

reifnir avatar Jul 03 '22 01:07 reifnir

I made a PR here with the fix, but the pipeline is on hold until a maintainer gives it the 👍 (since I've never contributed before)

reifnir avatar Jul 03 '22 21:07 reifnir

Closing since this has been fixed in v3.14.0 - thanks @reifnir

tombuildsstuff avatar Oct 24 '22 08:10 tombuildsstuff

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Nov 24 '22 02:11 github-actions[bot]