Skip to content

Commit

Permalink
fix: disable private subnet custommization based on IaC tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Rey authored and clementrey-dev committed Oct 9, 2023
1 parent 8ec93dc commit 9383ce4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions examples/configurations/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ BUCKET_NAME=$(shell aws cloudformation describe-stacks --stack-name $(TAG) --reg


generated-c++: grid_config.json.tpl
mkdir -p $(GENERATED) && cat grid_config.json.tpl | sed "s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/;s/{{enable_private_subnet}}/${ENABLE_PRIVATE_SUBNET}/" > $(GENERATED)/grid_config.json
mkdir -p $(GENERATED) && cat full_run_grid_config.json.tpl | sed "s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/;s/{{enable_private_subnet}}/${ENABLE_PRIVATE_SUBNET}/" > $(GENERATED)/full_run_grid_config.json
mkdir -p $(GENERATED) && cat grid_config.json.tpl | sed "s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/" > $(GENERATED)/grid_config.json
mkdir -p $(GENERATED) && cat full_run_grid_config.json.tpl | sed "s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/" > $(GENERATED)/full_run_grid_config.json

generated-s3-c++: custom_runtime_s3_grid_config.json.tpl
mkdir -p $(GENERATED) && cat custom_runtime_s3_grid_config.json.tpl | sed "s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/;s/{{enable_private_subnet}}/${ENABLE_PRIVATE_SUBNET}/" > $(GENERATED)/custom_runtime_s3_grid_config.json
mkdir -p $(GENERATED) && cat custom_runtime_s3_grid_config.json.tpl | sed "s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/" > $(GENERATED)/custom_runtime_s3_grid_config.json

generated-python: python_runtime_grid_config.json.tpl
mkdir -p $(GENERATED) && cat python_runtime_grid_config.json.tpl | sed "s/{{python_file_handler}}/$(FILE_HANDLER)/;s/{{python_function_handler}}/$(FUNCTION_HANDLER)/;s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/;s/{{enable_private_subnet}}/${ENABLE_PRIVATE_SUBNET}/" > $(GENERATED)/python_runtime_grid_config.json
mkdir -p $(GENERATED) && cat python_runtime_grid_config.json.tpl | sed "s/{{python_file_handler}}/$(FILE_HANDLER)/;s/{{python_function_handler}}/$(FUNCTION_HANDLER)/;s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/" > $(GENERATED)/python_runtime_grid_config.json

generated-java: java_runtime_grid_config.json.tpl
mkdir -p $(GENERATED) && cat java_runtime_grid_config.json.tpl | sed "s/{{java_file_handler}}/$(FILE_HANDLER)/;s/{{java_function_handler}}/$(FUNCTION_HANDLER)/;s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/;s/{{enable_private_subnet}}/${ENABLE_PRIVATE_SUBNET}/" > $(GENERATED)/java_runtime_grid_config.json
mkdir -p $(GENERATED) && cat java_runtime_grid_config.json.tpl | sed "s/{{java_file_handler}}/$(FILE_HANDLER)/;s/{{java_function_handler}}/$(FUNCTION_HANDLER)/;s/{{region}}/$(REGION)/;s/{{workload_bucket_name}}/$(BUCKET_NAME)/;s/{{image_tag}}/$(TAG)/;s/{{account_id}}/${ACCOUNT_ID}/" > $(GENERATED)/java_runtime_grid_config.json

clean:
rm -rf $(GENERATED)
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"runtime" : "provided"
}
},
"enable_private_subnet" : {{enable_private_subnet}},
"enable_private_subnet" : true,
"vpc_cidr_block_public" : 24,
"vpc_cidr_block_private": 18,
"input_role": [
Expand Down
2 changes: 1 addition & 1 deletion examples/configurations/full_run_grid_config.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"runtime" : "provided"
}
},
"enable_private_subnet" : {{enable_private_subnet}},
"enable_private_subnet" : true,
"vpc_cidr_block_public" : 24,
"vpc_cidr_block_private": 18,
"input_role": [
Expand Down
2 changes: 1 addition & 1 deletion examples/configurations/grid_config.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"runtime" : "provided"
}
},
"enable_private_subnet" : {{enable_private_subnet}},
"enable_private_subnet" : true,
"vpc_cidr_block_public" : 24,
"vpc_cidr_block_private": 18,
"input_role": [
Expand Down
2 changes: 1 addition & 1 deletion examples/configurations/java_runtime_grid_config.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"lambda_handler_function_name": "{{java_function_handler}}"
}
},
"enable_private_subnet" : {{enable_private_subnet}},
"enable_private_subnet" : true,
"vpc_cidr_block_public" : 24,
"vpc_cidr_block_private": 18,
"input_role": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"lambda_handler_function_name": "{{python_function_handler}}"
}
},
"enable_private_subnet" : {{enable_private_subnet}},
"enable_private_subnet" : true,
"vpc_cidr_block_public" : 24,
"vpc_cidr_block_private": 18,
"input_role": [
Expand Down

0 comments on commit 9383ce4

Please sign in to comment.