Skip to content

Commit 872faba

Browse files
NRL-512 Fix methods for producer and auto deploy
1 parent 81a286e commit 872faba

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

terraform/infrastructure/api_gateway.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module "producer__gateway" {
4141
}
4242
endpoint_allowed_methods = {
4343
"/DocumentReference" = "GET,POST",
44-
"/DocumentReference/{id}" = "GET,DELETE"
44+
"/DocumentReference/{id}" = "GET,PUT,DELETE"
4545
}
4646
kms_key_id = module.kms__cloudwatch.kms_arn
4747
domain = local.apis.domain

terraform/infrastructure/modules/api_gateway/api_gateway.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ resource "aws_api_gateway_deployment" "api_gateway_deployment" {
5050
rest_api_id = aws_api_gateway_rest_api.api_gateway_rest_api.id
5151

5252
triggers = {
53-
redeployment = sha1(jsonencode(aws_api_gateway_rest_api.api_gateway_rest_api.body))
54-
resource_change = "${md5(file("${path.module}/api_gateway.tf"))}"
55-
capabilities = sha1(var.capability_statement_content)
53+
redeployment = sha1(jsonencode(aws_api_gateway_rest_api.api_gateway_rest_api.body))
54+
resource_change = "${md5(file("${path.module}/api_gateway.tf"))}"
55+
capabilities = sha1(var.capability_statement_content)
56+
method_responses_change = md5(file("${path.module}/method_responses.tf"))
57+
parent_api_gateway_change = md5(file("${path.module}/../../api_gateway.tf"))
5658
}
5759

5860
lifecycle {
File renamed without changes.

tests/features/producer/headOnAnyEndpoint.feature renamed to tests/features/producer/headOnGetEndpoint.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Feature: Producer - HEAD Requests
1212
When producer 'RX898' sends HEAD request to 'DocumentReference/random-id' endpoint
1313
Then the response status code is 405
1414
And the response has an empty body
15-
And the Allow header is 'GET,DELETE'
15+
And the Allow header is 'GET,PUT,DELETE'

0 commit comments

Comments
 (0)