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

bugfix: end_date_relative for application_password #1428

Closed
wants to merge 6 commits into from

Conversation

nickdala
Copy link

@nickdala nickdala commented Jul 8, 2024

This fix supports end_date_relative for azuread_application_password. See #843 and #1424 for more details.

Terraform version

Terraform v1.9.1
on darwin_amd64

Provider version

2.53.1

Terraform Configuration Files

data "azuread_client_config" "current" {}

resource "azuread_application" "example" {
  display_name = "example"
  owners       = [data.azuread_client_config.current.object_id]
}

resource "azuread_application_password" "application_password" {
  application_id = azuread_application.example.id
  end_date_relative = "360h" # 15 days
}

Expected Behavior

The expiration of the client secret in Microsoft Entra ID is calculated based on the end_date_relative argument.

Actual Behavior

end_date_relative is ignored and the expiration of the client secret in Microsoft Entra ID is set to the default of 2 years.

Steps to Reproduce

terraform apply

Sample

https://github.com/nickdala/azure-app-registration

Fixed #1424

@nickdala nickdala changed the title bug fix: end_date_relative for application_password bugfix: end_date_relative for application_password Jul 18, 2024
@twalter-dev
Copy link

Hi @nickdala
can you give us an estimate when this PR will be closed and the fix will be released?
regards Thomas

@nickdala
Copy link
Author

nickdala commented Oct 4, 2024

Hi @nickdala can you give us an estimate when this PR will be closed and the fix will be released? regards Thomas

I'm reaching out to folks internally to see how I can get this PR reviewed and merged.

@nickdala
Copy link
Author

nickdala commented Nov 8, 2024

Here is the latest warning message with version 3.0.2 of azuread. From the message, end_date_relative is deprecated.


│ Warning: Argument is deprecated

│ with azuread_application_password.application_password,
│ on main.tf line 10, in resource "azuread_application_password" "application_password":
│ 10: end_date_relative = "360h" # 15 days

│ The end_date_relative property is deprecated and will be removed in a future
│ version of the AzureAD provider. Please instead use the Terraform timeadd()
│ function to calculate a value for the end_date property.

@nickdala nickdala closed this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azuread_application_password.end_date_relative is ignored
2 participants