Skip to content

Commit

Permalink
check http status code when fetching the function checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Oct 29, 2024
1 parent 88a55f5 commit 13ae21d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions terraform/041-id-broker-search-lambda/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
data "http" "function-checksum" {
url = "https://${var.function_bucket_name}.s3.amazonaws.com/${var.function_zip_name}.sum"


lifecycle {
postcondition {
condition = contains([201, 204], self.status_code)
error_message = "Status code invalid"
}
}
}

resource "aws_iam_role" "functionRole" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/041-id-broker-search-lambda/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ terraform {
}
http = {
source = "hashicorp/http"
version = ">=2.0.0, < 4.0.0"
version = ">=3.0.0, < 4.0.0"
}
}
}

0 comments on commit 13ae21d

Please sign in to comment.