Skip to content

Commit 4df778f

Browse files
authored
Merge pull request #9 from hopservices/pr_feedback_rob
pr feedback
2 parents a19f9c8 + b50b3f2 commit 4df778f

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

aws/terraform/modules/metaflow/iam.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ resource "aws_iam_role_policy" "grant_iam_pass_role" {
245245
}
246246

247247
resource "aws_iam_role_policy" "grant_dynamodb" {
248+
count = var.enable_step_functions ? 1 : 0
248249
name = "dynamodb"
249250
role = aws_iam_role.batch_s3_task_role.name
250251
policy = data.aws_iam_policy_document.dynamodb.json

aws/terraform/modules/metaflow/modules/metadata-service/api-gateway.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ resource "aws_api_gateway_method_response" "db" {
134134

135135
resource "aws_api_gateway_deployment" "this" {
136136
rest_api_id = aws_api_gateway_rest_api.this.id
137-
stage_name = local.api_gateway_stage_name
137+
138138
# explicit depends_on required to ensure module stands up on first `apply`
139139
# otherwise a second followup `apply` would be required
140140
# can read more here: https://stackoverflow.com/a/42783769
@@ -146,9 +146,19 @@ resource "aws_api_gateway_deployment" "this" {
146146
}
147147
}
148148

149+
resource "aws_api_gateway_stage" "this" {
150+
deployment_id = aws_api_gateway_deployment.this.id
151+
rest_api_id = aws_api_gateway_rest_api.this.id
152+
stage_name = local.api_gateway_stage_name
153+
154+
tags = var.standard_tags
155+
}
156+
149157
resource "aws_api_gateway_api_key" "this" {
150158
count = var.api_basic_auth ? 1 : 0
151159
name = local.api_gateway_key_name
160+
161+
tags = var.standard_tags
152162
}
153163

154164
resource "aws_api_gateway_usage_plan" "this" {
@@ -157,8 +167,10 @@ resource "aws_api_gateway_usage_plan" "this" {
157167

158168
api_stages {
159169
api_id = aws_api_gateway_rest_api.this.id
160-
stage = local.api_gateway_stage_name
170+
stage = aws_api_gateway_deployment.this.stage_name
161171
}
172+
173+
tags = var.standard_tags
162174
}
163175

164176
resource "aws_api_gateway_usage_plan_key" "this" {

0 commit comments

Comments
 (0)