Open nerddtvg opened 1 month ago
~ terraform version Terraform v1.9.3 on windows_amd64 + provider registry.terraform.io/hashicorp/azuread v3.0.2
azuread_application_password
resource "azurerm_key_vault" "app" { name = "removed" } resource "azuread_application" "app" { display_name = "Removed" } resource "azuread_application_password" "app" { application_id = azuread_application.app.id display_name = "App Secret" } resource "azurerm_key_vault_secret" "app_secret" { key_vault_id = azurerm_key_vault.app.id name = "app-secret" value = azuread_application_password.app.value expiration_date = azuread_application_password.app.end_date }
Not applicable.
The RFC3339 output of expiration_date should be formatted such as the documentation states: 2018-01-01T01:02:03Z
expiration_date
2018-01-01T01:02:03Z
The output includes milliseconds which introduces constant changes which have no effective change in the state or infrastructure.
# azurerm_key_vault_secret.dbw_secret["geno-dbw"] will be updated in-place ~ resource "azurerm_key_vault_secret" "app_secret" { ~ expiration_date = "2026-10-23T17:36:39Z" -> "2026-10-23T17:36:39.4384728Z" id = "https://removed.vault.azure.net/secrets/app-secret/removed" name = "app-secret" tags = {} # (7 unchanged attributes hidden) }
terraform apply
https://github.com/hashicorp/terraform-provider-azuread/blob/main/docs/resources/application_password.md?plain=1#L58
The resource documentation states it will be RFC3339 compliant with 2-digits for the seconds.
The API response may contain milliseconds, and the provider sets it to state without formatting. It should be parsed in the provider to avoid this issue.
https://github.com/hashicorp/terraform-provider-azuread/blob/b98dda9b9ef40099293c49fa13b3358e9a407229/internal/services/applications/application_password_resource.go#L264
Community Note
Terraform (and AzureAD Provider) Version
Affected Resource(s)
azuread_application_password
Terraform Configuration Files
Debug Output
Not applicable.
Panic Output
Not applicable.
Expected Behavior
The RFC3339 output of
expiration_date
should be formatted such as the documentation states:2018-01-01T01:02:03Z
Actual Behavior
The output includes milliseconds which introduces constant changes which have no effective change in the state or infrastructure.
Steps to Reproduce
terraform apply
Important Factoids
Not applicable.
References
https://github.com/hashicorp/terraform-provider-azuread/blob/main/docs/resources/application_password.md?plain=1#L58
The resource documentation states it will be RFC3339 compliant with 2-digits for the seconds.