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

oidc_issuer_enabled must be set to true to enable Azure AD Worklo… #377

Merged
merged 1 commit into from
May 31, 2023

Conversation

zioproto
Copy link
Collaborator

Fixes the following error:

│ Error: `oidc_issuer_enabled` must be set to `true` to enable Azure AD Workload Identity
│
│   with module.aks.azurerm_kubernetes_cluster.main,
│   on .terraform/modules/aks/main.tf line 17, in resource "azurerm_kubernetes_cluster" "main":
│   17: resource "azurerm_kubernetes_cluster" "main" {

Copy link
Member

@lonegunmanb lonegunmanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zioproto thanks for opening this pr, we need merge this branch to the latest main branch to get version-upgrade test work, would you please update your branch and try again? Thanks!

@zioproto zioproto force-pushed the precondition-workload-identity branch from ab1e4aa to 9c23b45 Compare May 26, 2023 12:23
@zioproto zioproto temporarily deployed to acctests May 29, 2023 06:07 — with GitHub Actions Inactive
Copy link
Member

@lonegunmanb lonegunmanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zioproto for the update, one comment.

main.tf Outdated
@@ -451,6 +451,10 @@ resource "azurerm_kubernetes_cluster" "main" {
condition = !(var.kms_enabled && var.identity_type != "UserAssigned")
error_message = "KMS etcd encryption doesn't work with system-assigned managed identity."
}
precondition {
condition = var.workload_identity_enabled ? var.oidc_issuer_enabled : true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we simplify this expression to?:

condition     = !var.workload_identity_enabled || var.oidc_issuer_enabled

@zioproto zioproto force-pushed the precondition-workload-identity branch from 9c23b45 to f482eab Compare May 30, 2023 09:59
@zioproto zioproto temporarily deployed to acctests May 31, 2023 02:47 — with GitHub Actions Inactive
Copy link
Member

@lonegunmanb lonegunmanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zioproto for the update, LGTM! 🚀

@lonegunmanb lonegunmanb merged commit 17639f0 into Azure:main May 31, 2023
skolobov pushed a commit to skolobov/terraform-azurerm-aks that referenced this pull request Oct 29, 2023
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

Successfully merging this pull request may close these issues.

2 participants