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

Federated credential doesn't work #6

Open
Vermyndax opened this issue Apr 29, 2024 · 1 comment
Open

Federated credential doesn't work #6

Vermyndax opened this issue Apr 29, 2024 · 1 comment

Comments

@Vermyndax
Copy link

I am trying to use your code, but it's dying on the federated identity credential. I am getting this error:

│ User Assigned Identity Name: "azure-alb-identity"
│ Federated Identity Credential Name: "azure-alb-identity"): unexpected
│ status 400 (400 Bad Request) with error: BadRequest: The request format was
│ unexpected. Federated Identity Credential must specify 'issuer', 'subject'
│ and 'audience'.
@zioproto
Copy link
Owner

Hello @Vermyndax
thanks for reporting this issue.

I understand you are doing the following steps on the main branch:

cd istio-aks-example/istio-on-aks/aks-tf
terraform init -upgrade
terraform apply

Do you get that error during the terraform apply ?

Can you share what is your Terraform plan for this resource:

resource "azurerm_federated_identity_credential" "alb_controller" {
name = "azure-alb-identity"
resource_group_name = azurerm_resource_group.this.name
audience = ["api://AzureADTokenExchange"]
issuer = module.aks.oidc_issuer_url
parent_id = azurerm_user_assigned_identity.alb_controller.id
subject = "system:serviceaccount:azure-alb-system:alb-controller-sa"
depends_on = [module.aks]
}

Could you try to add a depends_on = [module.aks] at the above resource ? It could be it fails randomly if the value for module.aks.oidc_issuer_url is not available yet ?

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

No branches or pull requests

2 participants