Skip to content

Commit

Permalink
fix: Add cert-manager dependency for pca issuer
Browse files Browse the repository at this point in the history
  • Loading branch information
askulkarni2 committed Feb 12, 2024
1 parent 077b8bc commit eede194
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ locals {

iam_role_policy_prefix = "arn:${local.partition}:iam::aws:policy"

wait_for_cert_manager = [
module.cert_manager.name,
module.cert_manager.namespace
]

# Used by Karpenter & AWS Node Termination Handler
ec2_events = {
health_event = {
Expand Down Expand Up @@ -1820,6 +1825,8 @@ module "aws_privateca_issuer" {
}
}

depends_on = [local.wait_for_cert_manager]

tags = var.tags
}

Expand Down Expand Up @@ -2196,10 +2203,7 @@ resource "aws_eks_addon" "this" {

tags = var.tags

depends_on = [
module.cert_manager.name,
module.cert_manager.namespace,
]
depends_on = [local.wait_for_cert_manager]
}

################################################################################
Expand Down Expand Up @@ -3684,9 +3688,6 @@ module "aws_gateway_api_controller" {
################################################################################
# Bottlerocket Update Operator
################################################################################
locals {
wait_for_cert_manager = try(var.cert_manager.wait, false) ? [module.cert_manager] : []
}

module "bottlerocket_shadow" {
source = "aws-ia/eks-blueprints-addon/aws"
Expand Down

0 comments on commit eede194

Please sign in to comment.