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

azuread_application_app_role always either deletes / recreates the role on each apply #1402

Closed
AlexcFrench opened this issue Jun 10, 2024 · 1 comment

Comments

@AlexcFrench
Copy link

AlexcFrench commented Jun 10, 2024

Community Note

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

Terraform (and AzureAD Provider) Version

Terraform v1.8.0
on windows_amd64

  • provider registry.terraform.io/hashicorp/azuread v2.51.0
  • provider registry.terraform.io/hashicorp/azurerm v3.107.0

Affected Resource(s)

azuread_application_app_role

  • azuread_XXXXX

Terraform Configuration Files

resource "azuread_application" "appreg" {
  display_name = "test123"
}

resource "azuread_application_app_role" "role1" {
  application_id       = azuread_application.appreg.id
  role_id              = "6bd5554f-a935-4e9f-9223-c87a64c22fba"
  allowed_member_types = ["User"]
  description          = "desc"
  display_name         = "displayname"
  value                = "123"
}

Debug Output

https://gist.github.com/AlexcFrench/8303351be3f32ac1fac99df9b618b11f

Expected Behavior

once applied there should be no changes required on subsequent plan/apply runs

Actual Behavior

a tf plan / apply creates the role
Another plan / apply deletes the role
Another plan / apply recreates the role

No code changes at any point

Steps to Reproduce

tf init
tf plan
tf apply
tf plan
tf apply

  1. terraform apply

Important Factoids

MAY be related to #1344 ??

References

  • #0000
@manicminer
Copy link
Contributor

Thanks for reporting this @AlexcFrench, you are correct that #1344 is related - in fact it's the same issue. Accordingly, I'll close this issue as a duplicate and ask that you subscribe to #1344 for updates, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants