Skip to content

Commit

Permalink
Change trigger to resource policy variable (#21)
Browse files Browse the repository at this point in the history
* Change trigger to resource policy variable

* add checkov skip

---------

Co-authored-by: Jazeel <[email protected]>
  • Loading branch information
jaezeu and Jazeel authored Jul 21, 2023
1 parent 4bade02 commit 9103d19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/apigw_with_usage_plan/templates/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ x-amazon-apigateway-cors:
components:
schemas:
Pets:
#checkov:skip=CKV_OPENAPI_21:Ensure that arrays have a maximum number of items
type: array
items:
$ref: '#/components/schemas/Pet'
Expand Down
4 changes: 1 addition & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ resource "aws_api_gateway_deployment" "deployment" {
triggers = {
redeployment = sha1(jsonencode([
aws_api_gateway_rest_api.api.body,
var.enable_resource_policy ? aws_api_gateway_rest_api_policy.policy_attachment : null
var.enable_resource_policy ? var.resource_policy_json : null
]
))
}

depends_on = [aws_api_gateway_rest_api_policy.policy_attachment]

lifecycle {
create_before_destroy = true
}
Expand Down

0 comments on commit 9103d19

Please sign in to comment.