Skip to content

Commit cf7bfc1

Browse files
authored
Merge pull request #35 from ministryofjustice/IN-654
IN-654 up elasticache clusters to be inline with sirius availability …
2 parents 5f256c2 + a7e55bd commit cf7bfc1

File tree

6 files changed

+13
-20
lines changed

6 files changed

+13
-20
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ orbs:
123123
TF_CLI_ARGS_destroy: -input=false -auto-approve
124124
TF_CLI_ARGS_init: -input=false -upgrade=true -reconfigure
125125
TF_VAR_default_role: sirius-ci
126-
TF_VERSION: 0.12.26
127-
TF_SHA256SUM: 607bc802b1c6c2a5e62cc48640f38aaa64bef1501b46f0ae4829feb51594b257
126+
TF_VERSION: 0.13.5
127+
TF_SHA256SUM: f7b7a7b1bfbf5d78151cfe3d1d463140b5fd6a354e71a7de2b5644e652ca5147 # pragma: allowlist secret
128128
python:
129129
docker:
130130
- image: circleci/python:3.8.1

.secrets.baseline

+1-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": null,
44
"lines": null
55
},
6-
"generated_at": "2020-12-08T13:12:21Z",
6+
"generated_at": "2021-04-06T15:56:57Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -46,14 +46,6 @@
4646
}
4747
],
4848
"results": {
49-
".circleci/config.yml": [
50-
{
51-
"hashed_secret": "9471c0494b91aec2cb3db5be98b1a210cb001966",
52-
"is_verified": false,
53-
"line_number": 127,
54-
"type": "Hex High Entropy String"
55-
}
56-
],
5749
"docker-compose.yml": [
5850
{
5951
"hashed_secret": "dc724af18fbdd4e59189f5fe768a5f8311527050",

docs/support_scripts/load_testing/load_testing.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ func getFilePath(urlSuffix string) string {
9090
}
9191

9292
func main() {
93-
baseUrl := flag.String("base_url", "api.dev.sirius.opg.digital/v1", "a string")
93+
baseUrl := flag.String("base_url", "dev.lpa.api.opg.service.justice.gov.uk/v1", "a string")
9494
urlSuffix := flag.String("url_suffix", "lpa-online-tool/lpas", "a string")
95-
batchSize := flag.Int("batch_size", 5, "an int")
95+
batchSize := flag.Int("batch_size", 1, "an int")
9696
numberOfBatches := flag.Int("number_of_batches", 2, "an int")
9797
waitBetweenBatches := flag.Int("wait_between_batches", 2, "an int")
9898
flag.Parse()

docs/support_scripts/requests/api_request.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func main() {
2626

2727
flag.Parse()
2828

29-
roleToAssume := "arn:aws:iam::" + *account + ":role/" + *role
29+
roleToAssume := "arn:aws:iam::" + *account + ":role/" + *role
3030

3131
var url string = ""
3232

terraform/environment/elasticache.tf

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1+
data "aws_availability_zones" "available" {
2+
}
3+
14
resource "aws_elasticache_replication_group" "lpa_redis" {
25
automatic_failover_enabled = local.account.elasticache_count == 1 ? false : true
36
engine = "redis"
47
engine_version = "5.0.6"
58
replication_group_id = "lpa-data-redis-${local.environment}"
69
replication_group_description = "Replication Group for LPA Data"
710
node_type = "cache.t2.small"
11+
multi_az_enabled = local.account.elasticache_count == 1 ? false : true
12+
availability_zones = local.account.elasticache_count == 1 ? ["eu-west-1a"] : data.aws_availability_zones.available.names
813
number_cache_clusters = local.account.elasticache_count
914
parameter_group_name = "default.redis5.0"
1015
port = 6379
1116
subnet_group_name = "private-redis"
1217
security_group_ids = [aws_security_group.lpa_redis_sg.id]
1318
tags = local.default_tags
1419
apply_immediately = true
15-
16-
lifecycle {
17-
ignore_changes = [number_cache_clusters]
18-
}
1920
}
2021

2122
resource "aws_security_group" "lpa_redis_sg" {

terraform/environment/terraform.tfvars.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"vpc_id": "vpc-037acd53d9ce813b4",
3333
"logger_level": "INFO",
3434
"threshold": 10,
35-
"elasticache_count": 1
35+
"elasticache_count": 3
3636
},
3737
"production": {
3838
"account_id": "649098267436",
@@ -48,7 +48,7 @@
4848
"vpc_id": "vpc-6809cc0f",
4949
"logger_level": "INFO",
5050
"threshold": 1,
51-
"elasticache_count": 2
51+
"elasticache_count": 3
5252
}
5353
}
5454
}

0 commit comments

Comments
 (0)