Skip to content

Commit 00d68e1

Browse files
SRAlexanderScott Alexander
andauthored
Dev and Prod instances of app configurations added to reduce manual modifications (#150)
Co-authored-by: Scott Alexander <[email protected]>
1 parent e78c8ce commit 00d68e1

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"flags": {
3+
"nemsEnabled": {
4+
"name": "nemsEnabled"
5+
},
6+
"uploadLloydGeorgeWorkflowEnabled": {
7+
"name": "uploadLloydGeorgeWorkflowEnabled"
8+
},
9+
"uploadLambdaEnabled": {
10+
"name": "uploadLambdaEnabled"
11+
},
12+
"uploadArfWorkflowEnabled": {
13+
"name": "uploadArfWorkflowEnabled"
14+
}
15+
},
16+
"values": {
17+
"nemsEnabled": {
18+
"enabled": "true"
19+
},
20+
"uploadLloydGeorgeWorkflowEnabled": {
21+
"enabled": "true"
22+
},
23+
"uploadLambdaEnabled": {
24+
"enabled": "true"
25+
},
26+
"uploadArfWorkflowEnabled": {
27+
"enabled": "true"
28+
}
29+
},
30+
"version": "1"
31+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Important!
2+
3+
If any app configurations are modified manually e.g. new flag version, terraform will not be able to delete the App Config instances as it does not own the Feature Flag versions.
4+
Therefore we have two instances of the configuration per deployment.
5+
6+
{date}.json
7+
{date}-dev.json
8+
9+
It is recomended that all feature flags are enabled for the dev version to reduce manual app config actions.
10+
The non dev version should be set to what we expect our prod instances to represent.

infrastructure/modules/app_config/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
locals {
2-
current_config_path = "${path.module}/configurations/2024-02-21.json"
2+
is_sandbox_or_test = contains(["ndra", "ndrb", "ndrc", "ndrd", "ndr-test"], terraform.workspace)
3+
current_config_path = (local.is_sandbox_or_test ? "${path.module}/configurations/2024-02-21-dev.json" :
4+
"${path.module}/configurations/2024-02-21.json")
35
}
46

57
resource "aws_appconfig_application" "ndr-app-config-application" {

0 commit comments

Comments
 (0)