Skip to content

Commit

Permalink
ci(infra): Only set aws_role_arn if both aws_account_id and aws_role_…
Browse files Browse the repository at this point in the history
…name are provided
  • Loading branch information
topher-lo committed Jan 3, 2025
1 parent f48170b commit 81105c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deployments/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ terraform {
}

locals {
# Only set aws_role_arn if aws_account_id is provided
aws_role_arn = var.aws_account_id != null ? "arn:aws:iam::${var.aws_account_id}:role/${var.aws_role_name}" : null
# Only set aws_role_arn if both aws_account_id and aws_role_name are provided
aws_role_arn = var.aws_account_id != null && var.aws_role_name != null ? "arn:aws:iam::${var.aws_account_id}:role/${var.aws_role_name}" : null
}

module "network" {
Expand Down

0 comments on commit 81105c8

Please sign in to comment.