Skip to content

Commit

Permalink
Removed monitoring code
Browse files Browse the repository at this point in the history
  • Loading branch information
pasipa2 committed Oct 15, 2020
1 parent 8367d5e commit 23653d2
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 97 deletions.
15 changes: 1 addition & 14 deletions cloudwatch_exporter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
30 changes: 0 additions & 30 deletions content_refresh/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
#-------------------------------------------------------------
Expand All @@ -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
#-------------------------------------------------------------
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions elk-service/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions es_admin/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
30 changes: 0 additions & 30 deletions es_admin/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
#-------------------------------------------------------------
Expand All @@ -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
#-------------------------------------------------------------
Expand Down Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions es_admin/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion monitoring/dashboard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion monitoring/files/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
]
],
"region": "${region}",
"title": "ElasticSearch"
"title": "KibanaASG"
}
},
{
Expand Down
13 changes: 0 additions & 13 deletions monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 23653d2

Please sign in to comment.