We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
app_role
azuread_application
Terraform v1.7.5 on windows_amd64 + provider registry.terraform.io/hashicorp/azuread v2.47.0 + provider registry.terraform.io/hashicorp/azurerm v3.97.1 + provider registry.terraform.io/hashicorp/random v3.6.0
We have a module with an app_roles.tf:
app_roles.tf
resource "random_uuid" "app_roles" { for_each = var.appRoles keepers = {} } resource "azuread_application_app_role" "app_roles" { for_each = var.appRoles application_id = azuread_application.ar.id allowed_member_types = each.value.allowed_member_types description = each.value.description display_name = each.key role_id = random_uuid.app_roles[each.key].result value = each.key }
And an ar.tf with ignore_changes for app_role
ar.tf
ignore_changes
data "azuread_users" "users" { user_principal_names = var.owners.users } resource "azuread_application" "ar" { display_name = var.displayName owners = data.azuread_users.users.object_ids api { mapped_claims_enabled = var.api.mapped_claims_enabled requested_access_token_version = var.api.requested_access_token_version known_client_applications = var.api.known_client_applications } sign_in_audience = var.sign_in_audience group_membership_claims = var.group_membership_claims web { implicit_grant { access_token_issuance_enabled = var.implicit_grant.access_token_issuance_enabled id_token_issuance_enabled = var.implicit_grant.id_token_issuance_enabled } } lifecycle { ignore_changes = [ app_role, api[0].oauth2_permission_scope, required_resource_access, web, single_page_application, public_client, optional_claims, identifier_uris, ] } }
N/A
tf plan should ignore difference on the app_role blocks on the azuread_application
tf plan
Differences are shown
# module.my_app.azuread_application.ar has changed ~ resource "azuread_application" "ar" { id = "/applications/xxxxxxx-xxxx-xxxx-xxxx-111111111111" # (16 unchanged attributes hidden) - app_role { - allowed_member_types = [ - "User", ] -> null - description = "Agent" -> null - display_name = "Agent" -> null - enabled = true -> null - id = "xxxxxxx-xxxx-xxxx-xxxx-111111111111" -> null - value = "Agent" -> null } + app_role { + allowed_member_types = [ + "User", ] + description = "Agent Role" + display_name = "Agent" + enabled = true + id = "xxxxxxx-xxxx-xxxx-xxxx-111111111111" + value = "Agent" } # (7 unchanged blocks hidden) }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Community Note
Terraform (and AzureAD Provider) Version
Affected Resource(s)
azuread_application
Terraform Configuration Files
We have a module with an
app_roles.tf
:And an
ar.tf
withignore_changes
forapp_role
Debug Output
N/A
Panic Output
Expected Behavior
tf plan
should ignore difference on theapp_role
blocks on theazuread_application
Actual Behavior
Differences are shown
Steps to Reproduce
N/A
Important Factoids
References
N/A
The text was updated successfully, but these errors were encountered: