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_federated_identity_credential & azurerm_federated_identity_credential are inconsistent with audience parameter #1442

Open
webstean opened this issue Jul 19, 2024 · 1 comment

Comments

@webstean
Copy link

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

latest

Affected Resource(s)

  • azuread_application_federated_identity_credential & azurerm_federated_identity_credential are inconsistent with their treatment of the audience parameter

Terraform Configuration Files

resource "azurerm_federated_identity_credential" "example" {
  name                = "example"
  resource_group_name = azurerm_resource_group.example.name
  parent_id           = azurerm_user_assigned_identity.example.id
  **audience**            = ["api://AzureADTokenExchange"]
  issuer              = "https://token.actions.githubusercontent.com"
  subject             = "repo:owner/name:ref:refs/heads/main"
}

resource "azuread_application_federated_identity_credential" "example" {
  application_id = azuread_application.example.id
  display_name   = "example"
  description    = "example"
  **audiences**      = ["api://AzureADTokenExchange"]
  issuer              = "https://token.actions.githubusercontent.com"
  subject             = "repo:owner/name:ref:refs/heads/main"
}

Debug Output

Panic Output

Expected Behavior

azurerm_federated_identity_credential uses audience (singular)
azuread_application_federated_identity_credential uses audiences (plural)

Probably make the most sense for both to use the plural (audiences)

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@manicminer
Copy link
Member

It's quite difficult to choose here, since the API is clearly designed for multiple values but so far there's a limitation of one audience 🤔

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