-
Notifications
You must be signed in to change notification settings - Fork 308
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
azuread_application_password: end_date and end_date_relative parameter should calculate the end date of the application password based on the start_date but it is calculated based on the current timestamp when TF apply is executed #843
Comments
Are there any updates on this? |
Thanks for requesting this @ccsandhanshive. I agree that setting an expiry date relative to the start date makes more sense. Whilst this technically constitutes a breaking behavioral change, in practice seems unlikely to break any existing workflows and will not affect any already-created credentials, so I think we're probably OK to update this. Thanks @Threpio for picking this up and submitting a PR! ⭐ |
This functionality has been released in v2.27.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
…ord (hashicorp#844) * Simple fix for end_date_relative bug * Testing locally + logic * There is no reason these two functions should be this different
@manicminer Thank you for adding functionality for The As per azure Powershell default value for If both Could you please let us know if this behavior is expected behavior, if not then what is the reason that terraform has not added this functionality |
@manicminer Thank you for adding this functionality for |
…ord (hashicorp#844) * Simple fix for end_date_relative bug * Testing locally + logic * There is no reason these two functions should be this different
* Initial DataSource file created * Update location * Switch Case added for some types * Basic docs, removed linter problem and added client * Run tflint * Forgetting that it has to define the provider in the datasource registration * Adding the Registration function * Assign data to state correctly * Update docs/data-sources/principal_type.md Additional Interpolation removed Co-authored-by: Tom Bamford <tom@bamford.io> * Update internal/services/directoryobjects/principal_type_data_source.go Imports tidied up Co-authored-by: Tom Bamford <tom@bamford.io> * Update docs/data-sources/principal_type.md Wording as per suggestion Co-authored-by: Tom Bamford <tom@bamford.io> * Updated as per other comments * Removed redundant type for this data_source * Import fmt and tests * Fixing Tests + Documents * Accidentally wrote the docs twice?? * Test config fixes, use provider context * Rename data source, add missing nil checking * TC config for directoryobjects package * Docs to reflect renamed data source * Docs wording for azuread_directory_object data source * Update application_password.md * Changelog for #844 * Fix for Issue #843 - end_date_relative for application_password (#844) * Simple fix for end_date_relative bug * Testing locally + logic * There is no reason these two functions should be this different * v2.27.0 * Add warning that OIDC auth only works in GitHub Actions * Update docs/guides/service_principal_oidc.md * Update to Go 1.19 * Remove tfproviderlint * Docs: azuread_group.dynamic_membership.rule is required, not optional. Fixes #857 Co-authored-by: Tom Bamford <tom@bamford.io> Co-authored-by: Sam Gladstone <42203151+samgladstone@users.noreply.github.com>
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. |
Community Note
Terraform (and AzureAD Provider) Version
Terraform v1.0.0
Affected Resource(s)
azuread_application_password
Terraform Configuration Files
Debug Output
Expected Behavior
As per Azure PowerShell, if
start date
is specified without anyend date
then the end-date would be calculated as 1 year after thestart-date
For example, if
start date
is 1/1/2024 1:02:03 AM then theend date
would be 1/1/2025 1:02:03 AMHowever, in terraform, the
end_date
parameter is calculated based on the current timestamp (NOT thestart_date
)If
start_date
is 2022-09-01T01:02:03Z andend_date_relative
is "10h" then the calculatedend_date
is 2022-07-13T11:02:03Z (since the current timestamp is 2022-07-13T01:02:03Z)The expected end_date is 2022-09-01T11:02:03Z
Similarly, if both end_date and end_date_relative aren't specified, the calculated
end_date
should be based on thestart_date
not the current timestampActual Behavior
Terraform calculates
end_date
parameter based on the current timestamp and not thestart_date
parameter.This leads to an error during the apply command if the calculated
end_date
ends up being before thestart_date
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: