Skip to content

Commit

Permalink
Merge pull request #1542 from alphagov/samsimpson1/remove-shared-redis
Browse files Browse the repository at this point in the history
Remove shared redis instances
  • Loading branch information
samsimpson1 authored Dec 3, 2024
2 parents a936ef8 + 1a29825 commit 700ce24
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 106 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
output "shared_redis_cluster_host" {
value = aws_route53_record.shared_redis_cluster.fqdn
}

output "eks_ingress_www_origin_security_group_name" {
value = aws_security_group.eks_ingress_www_origin.name
}
24 changes: 0 additions & 24 deletions terraform/deployments/govuk-publishing-infrastructure/security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,6 @@ data "aws_ec2_managed_prefix_list" "cloudfront" {
name = "com.amazonaws.global.cloudfront.origin-facing"
}

#
# Redis
#

resource "aws_security_group_rule" "shared_redis_cluster_to_any_any" {
description = "Redis cluster sends requests to anywhere over any protocol"
type = "egress"
from_port = 0
to_port = 0
protocol = -1
cidr_blocks = ["0.0.0.0/0"]
security_group_id = aws_security_group.shared_redis_cluster.id
}

resource "aws_security_group_rule" "shared_redis_cluster_from_any" {
description = "Shared Redis cluster for EKS accepts requests from EKS nodes"
type = "ingress"
from_port = 6379
to_port = 6379
protocol = "tcp"
security_group_id = aws_security_group.shared_redis_cluster.id
source_security_group_id = data.tfe_outputs.cluster_infrastructure.nonsensitive_values.node_security_group_id
}

#
# Frontend memcached
#
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ variable "frontend_memcached_node_type" {
description = "Instance type for the Frontend memcached."
}

variable "shared_redis_cluster_node_type" {
type = string
description = "Instance type for the shared Redis cluster. t1 and t2 instances are not supported."
}

variable "licensify_documentdb_instance_count" {
type = number
default = 3
Expand Down
4 changes: 2 additions & 2 deletions terraform/deployments/tfc-configuration/cdn-analytics.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module "cdn-analytics-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
4 changes: 2 additions & 2 deletions terraform/deployments/tfc-configuration/chat.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module "chat-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module "cluster-infrastructure-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
4 changes: 2 additions & 2 deletions terraform/deployments/tfc-configuration/cluster-services.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module "cluster-services-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module "datagovuk-infrastructure-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
2 changes: 1 addition & 1 deletion terraform/deployments/tfc-configuration/gcp-projects.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "gcp-ga4-analytics" {
team_access = {
"GOV.UK Production" = "write"
"Google Cloud Data Production" = "write"
"GOV.UK Non-Production" = "read"
"GOV.UK Non-Production (r/o)" = "read"
}

variable_set_names = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module "govuk-publishing-infrastructure-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
4 changes: 2 additions & 2 deletions terraform/deployments/tfc-configuration/mobile-backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ module "mobile-backend-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
4 changes: 2 additions & 2 deletions terraform/deployments/tfc-configuration/opensearch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module "opensearch-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
4 changes: 2 additions & 2 deletions terraform/deployments/tfc-configuration/rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module "rds-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ module "variable-set-integration" {

publishing_service_domain = "integration.publishing.service.gov.uk"

frontend_memcached_node_type = "cache.t4g.micro"
shared_redis_cluster_node_type = "cache.m6g.large"
frontend_memcached_node_type = "cache.t4g.micro"

# Non-production-only access is sufficient to access tools in this cluster.
github_read_write_team = "alphagov:gov-uk"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ module "variable-set-production" {

publishing_service_domain = "publishing.service.gov.uk"

workers_instance_types = ["m6i.8xlarge", "m6a.8xlarge"]
frontend_memcached_node_type = "cache.r6g.large"
shared_redis_cluster_node_type = "cache.r6g.xlarge"
workers_instance_types = ["m6i.8xlarge", "m6a.8xlarge"]
frontend_memcached_node_type = "cache.r6g.large"

ckan_s3_organogram_bucket = "datagovuk-production-ckan-organogram"
}
Expand Down
3 changes: 1 addition & 2 deletions terraform/deployments/tfc-configuration/variables-staging.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ module "variable-set-staging" {

publishing_service_domain = "staging.publishing.service.gov.uk"

frontend_memcached_node_type = "cache.t4g.medium"
shared_redis_cluster_node_type = "cache.r6g.large"
frontend_memcached_node_type = "cache.t4g.medium"

desired_ha_replicas = 2
rds_backup_retention_period = 1
Expand Down
4 changes: 2 additions & 2 deletions terraform/deployments/tfc-configuration/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module "vpc-integration" {
}

team_access = {
"GOV.UK Non-Production" = "write"
"GOV.UK Production" = "write"
"GOV.UK Non-Production (r/o)" = "write"
"GOV.UK Production" = "write"
}

variable_set_names = [
Expand Down

0 comments on commit 700ce24

Please sign in to comment.