Skip to content

Commit

Permalink
Ensure stage is created before dependents.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoogieZork committed Jan 29, 2025
1 parent 216b334 commit 172a70b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/terraform/modules/analyzer/api_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,8 @@ resource "aws_api_gateway_base_path_mapping" "api" {
api_id = aws_api_gateway_rest_api.api.id
stage_name = var.api_stage
domain_name = aws_api_gateway_domain_name.api.*.domain_name[count.index]

depends_on = [aws_api_gateway_stage.api]
}

################################################################################
Expand Down
4 changes: 4 additions & 0 deletions orchestrator/terraform/modules/heimdall/api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ resource "aws_api_gateway_usage_plan" "org_queue_usage" {
api_id = aws_api_gateway_rest_api.on_demand_api.id
stage = var.api_stage
}

depends_on = [aws_api_gateway_stage.on_demand_api]
}

resource "aws_api_gateway_usage_plan_key" "org-queue-plan-key" {
Expand Down Expand Up @@ -163,4 +165,6 @@ resource "aws_api_gateway_base_path_mapping" "on_demand" {
stage_name = var.api_stage
domain_name = aws_api_gateway_domain_name.heimdall.domain_name
base_path = "on_demand"

depends_on = [aws_api_gateway_stage.on_demand_api]
}

0 comments on commit 172a70b

Please sign in to comment.