Terraform Azuread Workload Identity Module
Terraform module to create an Azure AD Workload Identity
locals {
oidc_issuer_url = " azurerm_kubernetes_cluster.default.identity.0.issuer"
resource_group = " example-group"
subscription_id = " 00000000-0000-0000-0000-000000000000"
}
module "azuread_workload_identity" {
source = " ../"
name = " cert-manager"
namespace = " cert-manager"
service_account_name = " cert-manager"
oidc_issuer_url = local. oidc_issuer_url
role_assignments = [
{
name = " dns" ,
scope = " /subscriptions/${ local . subscription_id } /resourceGroups/${ local . resource_group } " ,
role_definition_name = " DNS Zone Contributor"
}
]
}
Name
Description
Type
Default
Required
ad_application_fic_prefix
The prefix for the Azure AD application federated identity credential name
string
"fed-identity"
no
ad_application_prefix
The prefix for the Azure AD application name
string
"sp"
no
audiences
The audiences for the federated identity credential
list(string)
[ "api://AzureADTokenExchange" ]
no
name
The name of the workload identity
string
n/a
yes
namespace
The namespace of the workload identity
string
n/a
yes
oidc_issuer_url
The OIDC issuer URL
string
n/a
yes
role_assignments
Role assignments
list(object({ name = string, scope = string, role_definition_id = optional(string), role_definition_name = optional(string), principal_type = optional(string) }))
[]
no
service_account_name
The name of the service account
string
n/a
yes
We are Blackbird Cloud , Amsterdam based cloud consultancy, and cloud management service provider. We help companies build secure, cost efficient, and scale-able solutions.
Checkout our other 👉 terraform modules
Copyright © 2017-2024 Blackbird Cloud