diff --git a/lambdas/indexer/.chalice/config.json.template.py b/lambdas/indexer/.chalice/config.json.template.py index 6751ef223..dd77ae946 100644 --- a/lambdas/indexer/.chalice/config.json.template.py +++ b/lambdas/indexer/.chalice/config.json.template.py @@ -25,7 +25,6 @@ "manage_iam_role": False, "iam_role_arn": "${aws_iam_role.%s.arn}" % app_name, "environment_variables": config.lambda_env, - "minimum_compression_size": config.minimum_compression_size, "lambda_timeout": config.api_gateway_lambda_timeout, "lambda_memory_size": 128, **chalice.vpc_lambda_config(app_name), diff --git a/lambdas/service/.chalice/config.json.template.py b/lambdas/service/.chalice/config.json.template.py index 46747fb3d..c40dff944 100644 --- a/lambdas/service/.chalice/config.json.template.py +++ b/lambdas/service/.chalice/config.json.template.py @@ -25,7 +25,6 @@ "manage_iam_role": False, "iam_role_arn": "${aws_iam_role.%s.arn}" % app_name, "environment_variables": config.lambda_env, - "minimum_compression_size": config.minimum_compression_size, "lambda_timeout": config.api_gateway_lambda_timeout, "lambda_memory_size": 2048, **chalice.vpc_lambda_config(app_name), diff --git a/src/azul/terraform.py b/src/azul/terraform.py index 84b5fffad..3912acc10 100644 --- a/src/azul/terraform.py +++ b/src/azul/terraform.py @@ -793,6 +793,17 @@ def tf_config(self, app_name): del deployment['lifecycle'] deployment['triggers'] = {'redeployment': deployment.pop('stage_description')} + # Using these AWS API Gateway extensions to the OpenAPI specification + # avoids maintaining a complicated `replace_triggered_by` and `triggers` + # dependency between Terraform resources in order to ensure that the API + # gateway is deployed when these properties are modified. + # + swagger_doc = json.loads(locals[app_name]) + swagger_doc.update({ + 'x-amazon-apigateway-minimum-compression-size': config.minimum_compression_size + }) + locals[app_name] = json.dumps(swagger_doc) + return { 'resource': resources, 'data': data,