Skip to content

Commit f0ab5ae

Browse files
authored
[NDR-204] Enable GET document reference in all environments (#394)
* [NDR-204] enable get doc ref by id in all env
1 parent 300922d commit f0ab5ae

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

infrastructure/gateway-document-reference.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "fhir_document_reference_gateway" {
2-
count = local.is_production ? 0 : 1
2+
count = 1
33
source = "./modules/gateway"
44
api_gateway_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
55
parent_id = aws_api_gateway_rest_api.ndr_doc_store_api.root_resource_id

infrastructure/iam.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ resource "aws_iam_policy" "s3_document_data_policy_for_get_doc_ref_lambda" {
135135
}
136136

137137
data "aws_iam_policy_document" "assume_role_policy_for_get_doc_ref_lambda" {
138-
count = local.is_production ? 0 : 1
138+
count = 1
139139
statement {
140140
actions = ["sts:AssumeRole"]
141141

@@ -147,14 +147,14 @@ data "aws_iam_policy_document" "assume_role_policy_for_get_doc_ref_lambda" {
147147
}
148148

149149
resource "aws_iam_role" "get_fhir_doc_presign_url_role" {
150-
count = local.is_production ? 0 : 1
150+
count = 1
151151
name = "${terraform.workspace}_get_fhir_doc_presign_url_role"
152152
assume_role_policy = data.aws_iam_policy_document.assume_role_policy_for_get_doc_ref_lambda[0].json
153153
}
154154

155155

156156
resource "aws_iam_role_policy_attachment" "get_doc_presign_url" {
157-
count = local.is_production ? 0 : 1
157+
count = 1
158158
role = aws_iam_role.get_fhir_doc_presign_url_role[0].name
159159
policy_arn = aws_iam_policy.s3_document_data_policy_for_get_doc_ref_lambda.arn
160160
}

infrastructure/lambda-get-document-fhir.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
resource "aws_api_gateway_resource" "get_document_reference" {
2-
count = local.is_production ? 0 : 1
2+
count = 1
33
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
44
parent_id = module.fhir_document_reference_gateway[0].gateway_resource_id
55
path_part = "{id}"
66
}
77

88
resource "aws_api_gateway_method" "get_document_reference" {
9-
count = local.is_production ? 0 : 1
9+
count = 1
1010
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
1111
resource_id = aws_api_gateway_resource.get_document_reference[0].id
1212
http_method = "GET"
@@ -19,7 +19,7 @@ resource "aws_api_gateway_method" "get_document_reference" {
1919

2020

2121
module "get-doc-fhir-lambda" {
22-
count = local.is_production ? 0 : 1
22+
count = 1
2323
source = "./modules/lambda"
2424
name = "GetDocumentReference"
2525
handler = "handlers.get_fhir_document_reference_handler.lambda_handler"

0 commit comments

Comments
 (0)