From a2bb37a11a9adde99b4ed9f21292653636f3b2d4 Mon Sep 17 00:00:00 2001 From: Valentin Khramtsov Date: Tue, 20 Aug 2024 23:21:05 +0300 Subject: [PATCH] Added depends on for IAM policy and role for github runner --- terraform/modules/k8s-addons/eks-gha-runner-scale-set.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/terraform/modules/k8s-addons/eks-gha-runner-scale-set.tf b/terraform/modules/k8s-addons/eks-gha-runner-scale-set.tf index 73b5b19..201a6dc 100644 --- a/terraform/modules/k8s-addons/eks-gha-runner-scale-set.tf +++ b/terraform/modules/k8s-addons/eks-gha-runner-scale-set.tf @@ -64,6 +64,8 @@ resource "aws_iam_role" "github_actions_runner_role" { name = "${local.gha_runner_scale_set.name}-role" assume_role_policy = data.aws_iam_policy_document.github_actions_runner_assume_role_policy.json + + depends_on = [ helm_release.gha_runner_scale_set ] } data "aws_iam_policy_document" "github_actions_runner_assume_role_policy" { @@ -90,6 +92,8 @@ resource "aws_iam_role_policy" "github_actions_runner_policy" { role = aws_iam_role.github_actions_runner_role[0].id policy = data.aws_iam_policy_document.github_actions_runner_policy.json + + depends_on = [ helm_release.gha_runner_scale_set ] } data "aws_iam_policy_document" "github_actions_runner_policy" {