mirror of
https://github.com/Sea-Haven-Industries/procurement-ingest.git
synced 2026-10-03 04:33:13 +00:00
fix(infra): hash live API GW attrs for redeploy triggers
This commit is contained in:
parent
21e939e8e1
commit
6ac10f125e
1 changed files with 19 additions and 5 deletions
|
|
@ -269,13 +269,27 @@ resource "aws_lambda_permission" "api_gateway" {
|
||||||
resource "aws_api_gateway_deployment" "procurement" {
|
resource "aws_api_gateway_deployment" "procurement" {
|
||||||
rest_api_id = aws_api_gateway_rest_api.procurement.id
|
rest_api_id = aws_api_gateway_rest_api.procurement.id
|
||||||
|
|
||||||
|
# Hash live method/integration/resource attributes (not just static locals)
|
||||||
|
# so path, auth, or proxy URI edits force a new stage deployment.
|
||||||
triggers = {
|
triggers = {
|
||||||
redeployment = sha1(jsonencode({
|
redeployment = sha1(jsonencode({
|
||||||
resources = local.api_resources
|
resources = {
|
||||||
iam = local.api_iam_methods
|
work_orders = aws_api_gateway_resource.work_orders
|
||||||
none = local.api_none_methods
|
work_order_id = aws_api_gateway_resource.work_order_id
|
||||||
policy = local.api_policy
|
work_order_comments = aws_api_gateway_resource.work_order_comments
|
||||||
lambda_hash = data.archive_file.lambda["procurement_api"].output_base64sha256
|
purchase_orders = aws_api_gateway_resource.purchase_orders
|
||||||
|
po_number = aws_api_gateway_resource.po_number
|
||||||
|
verified_sites = aws_api_gateway_resource.verified_sites
|
||||||
|
site_code = aws_api_gateway_resource.site_code
|
||||||
|
docs = aws_api_gateway_resource.docs
|
||||||
|
openapi_json = aws_api_gateway_resource.openapi_json
|
||||||
|
}
|
||||||
|
methods_iam = aws_api_gateway_method.iam
|
||||||
|
methods_none = aws_api_gateway_method.none
|
||||||
|
integrations_iam = aws_api_gateway_integration.iam
|
||||||
|
integrations_none = aws_api_gateway_integration.none
|
||||||
|
policy = local.api_policy
|
||||||
|
lambda_hash = data.archive_file.lambda["procurement_api"].output_base64sha256
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue