diff --git a/cloudwatch_exporter/main.tf b/cloudwatch_exporter/main.tf index ce025e62..37ef08c5 100644 --- a/cloudwatch_exporter/main.tf +++ b/cloudwatch_exporter/main.tf @@ -55,20 +55,7 @@ data "terraform_remote_state" "rds" { config = { bucket = var.remote_state_bucket_name - key = "alfresco/rds/terraform.tfstate" - region = var.region - } -} - -#------------------------------------------------------------- -### Getting the elk-migration details -#------------------------------------------------------------- -data "terraform_remote_state" "elk-migration" { - backend = "s3" - - config = { - bucket = var.remote_state_bucket_name - key = "alfresco/elk-migration/terraform.tfstate" + key = "alfresco/database/terraform.tfstate" region = var.region } } diff --git a/content_refresh/main.tf b/content_refresh/main.tf index 25f0a59b..41e40e11 100644 --- a/content_refresh/main.tf +++ b/content_refresh/main.tf @@ -21,19 +21,6 @@ data "terraform_remote_state" "common" { } } -#------------------------------------------------------------- -### Getting the certs details -#------------------------------------------------------------- -data "terraform_remote_state" "certs" { - backend = "s3" - - config = { - bucket = var.remote_state_bucket_name - key = "alfresco/certs/terraform.tfstate" - region = var.region - } -} - #------------------------------------------------------------- ### Getting the s3 details #------------------------------------------------------------- @@ -60,19 +47,6 @@ data "terraform_remote_state" "iam" { } } -#------------------------------------------------------------- -### Getting the shared monitoring details -#------------------------------------------------------------- -data "terraform_remote_state" "monitoring" { - backend = "s3" - - config = { - bucket = var.remote_state_bucket_name - key = "shared-monitoring/terraform.tfstate" - region = var.region - } -} - #------------------------------------------------------------- ### Getting the security groups details #------------------------------------------------------------- @@ -220,11 +194,7 @@ locals { certificate_arn = data.aws_acm_certificate.cert.arn public_subnet_ids = [data.terraform_remote_state.common.outputs.public_subnet_ids] private_subnet_ids = [data.terraform_remote_state.common.outputs.private_subnet_ids] - ssm_tls_private_key = data.terraform_remote_state.certs.outputs.self_signed_server_ssm_private_key_name - ssm_tls_cert = data.terraform_remote_state.certs.outputs.self_signed_server_ssm_cert_pem_name - ssm_tls_ca_cert = data.terraform_remote_state.certs.outputs.self_signed_ca_ssm_cert_pem_name elk_bucket_name = data.terraform_remote_state.s3bucket.outputs.elk_backups_bucket_name - elk_lb_dns = data.terraform_remote_state.monitoring.outputs.monitoring_server_internal_url asg_prefix = data.terraform_remote_state.asg.outputs.asg_autoscale_name storage_s3bucket = data.terraform_remote_state.s3bucket.outputs.s3bucket backups_bucket = data.terraform_remote_state.s3bucket.outputs.alf_backups_bucket_name diff --git a/elk-service/output.tf b/elk-service/output.tf index 12f5292d..91355e11 100644 --- a/elk-service/output.tf +++ b/elk-service/output.tf @@ -5,6 +5,7 @@ output "elk_service" { domain_name = aws_elasticsearch_domain.es.domain_name arn = aws_elasticsearch_domain.es.arn kibana_endpoint = local.kibana_host_url + kibana_asg_name = aws_autoscaling_group.kibana.name access_sg = aws_security_group.access_es.id es_url = local.es_url snapshot_role = aws_iam_role.elasticsearch.name diff --git a/es_admin/ec2.tf b/es_admin/ec2.tf index 240b4c7e..50c4b98f 100644 --- a/es_admin/ec2.tf +++ b/es_admin/ec2.tf @@ -36,9 +36,6 @@ data "template_file" "instance_userdata" { private_domain = local.internal_domain region = var.region short_env_identifier = local.short_environment_identifier - ssm_tls_ca_cert = local.ssm_tls_ca_cert - ssm_tls_cert = local.ssm_tls_cert - ssm_tls_private_key = local.ssm_tls_private_key docker_host = "${local.application}.${local.external_domain}" mount_point = "/opt/eslocal" esadmin_version = var.source_code_versions["esadmin"] diff --git a/es_admin/main.tf b/es_admin/main.tf index 200b62d6..8eefb8c7 100644 --- a/es_admin/main.tf +++ b/es_admin/main.tf @@ -21,19 +21,6 @@ data "terraform_remote_state" "common" { } } -#------------------------------------------------------------- -### Getting the certs details -#------------------------------------------------------------- -data "terraform_remote_state" "certs" { - backend = "s3" - - config = { - bucket = var.remote_state_bucket_name - key = "alfresco/certs/terraform.tfstate" - region = var.region - } -} - #------------------------------------------------------------- ### Getting the s3 details #------------------------------------------------------------- @@ -60,19 +47,6 @@ data "terraform_remote_state" "iam" { } } -#------------------------------------------------------------- -### Getting the shared monitoring details -#------------------------------------------------------------- -data "terraform_remote_state" "monitoring" { - backend = "s3" - - config = { - bucket = var.remote_state_bucket_name - key = "shared-monitoring/terraform.tfstate" - region = var.region - } -} - #------------------------------------------------------------- ### Getting the security groups details #------------------------------------------------------------- @@ -218,11 +192,7 @@ locals { certificate_arn = data.aws_acm_certificate.cert.arn public_subnet_ids = [data.terraform_remote_state.common.outputs.public_subnet_ids] private_subnet_ids = [data.terraform_remote_state.common.outputs.private_subnet_ids] - ssm_tls_private_key = data.terraform_remote_state.certs.outputs.self_signed_server_ssm_private_key_name - ssm_tls_cert = data.terraform_remote_state.certs.outputs.self_signed_server_ssm_cert_pem_name - ssm_tls_ca_cert = data.terraform_remote_state.certs.outputs.self_signed_ca_ssm_cert_pem_name elk_bucket_name = data.terraform_remote_state.s3bucket.outputs.elk_backups_bucket_name - elk_lb_dns = data.terraform_remote_state.monitoring.outputs.monitoring_server_internal_url asg_prefix = data.terraform_remote_state.asg.outputs.asg_autoscale_name storage_s3bucket = data.terraform_remote_state.s3bucket.outputs.s3bucket backups_bucket = data.terraform_remote_state.s3bucket.outputs.alf_backups_bucket_name diff --git a/es_admin/output.tf b/es_admin/output.tf index 81effc7d..921e529b 100644 --- a/es_admin/output.tf +++ b/es_admin/output.tf @@ -30,11 +30,6 @@ output "internal_domain" { value = local.internal_domain } -# elk elb -output "elk_lb_dns" { - value = local.elk_lb_dns -} - output "es_snapshot_name" { value = var.es_snapshot_name } diff --git a/monitoring/dashboard.tf b/monitoring/dashboard.tf index 4b5d8936..4c392431 100644 --- a/monitoring/dashboard.tf +++ b/monitoring/dashboard.tf @@ -18,7 +18,7 @@ data "template_file" "dashboard" { vars = { region = var.region asg_autoscale_name = data.terraform_remote_state.asg.outputs.asg_autoscale_name - elk_prefix = data.terraform_remote_state.elk.outputs.loggroup_prefix + elk_prefix = data.terraform_remote_state.elk-service.outputs.elk_service["kibana_asg_name"] common_prefix = data.terraform_remote_state.common.outputs.common_name lb_arn_suffix = data.aws_lb.alb.arn_suffix target_group_arn_suffix = data.aws_lb_target_group.target_group.arn_suffix diff --git a/monitoring/files/dashboard.json b/monitoring/files/dashboard.json index c92c426c..dbf83afb 100644 --- a/monitoring/files/dashboard.json +++ b/monitoring/files/dashboard.json @@ -51,7 +51,7 @@ ] ], "region": "${region}", - "title": "ElasticSearch" + "title": "KibanaASG" } }, { diff --git a/monitoring/main.tf b/monitoring/main.tf index 93e9bd2e..ee1d6673 100644 --- a/monitoring/main.tf +++ b/monitoring/main.tf @@ -34,19 +34,6 @@ data "terraform_remote_state" "asg" { } } -#------------------------------------------------------------- -### Getting the elk details -#------------------------------------------------------------- -data "terraform_remote_state" "elk" { - backend = "s3" - - config = { - bucket = var.remote_state_bucket_name - key = "alfresco/elk-migration/terraform.tfstate" - region = var.region - } -} - data "terraform_remote_state" "elk-service" { backend = "s3"