Removing sample infra

This commit is contained in:
shockrah 2023-01-09 18:21:26 -08:00
parent d71c4780d9
commit 99bc6be5c9
3 changed files with 0 additions and 96 deletions

View File

@ -2,9 +2,6 @@
# Essentially it is a cluster with services that we # Essentially it is a cluster with services that we
# choose to expose to the internet in one form or another # choose to expose to the internet in one form or another
# Alpha cluster definition # Alpha cluster definition
########################### ###########################
resource "aws_ecs_cluster" "alpha" { resource "aws_ecs_cluster" "alpha" {
@ -19,71 +16,3 @@ resource "aws_ecs_cluster" "alpha" {
} }
} }
# Lewdlad Task Definition
# This is what the service will launch to actually provide the lewdlad service
##############################################################################
resource "aws_ecs_task_definition" "sample" {
family = "${var.athens_prefix}-sample"
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
execution_role_arn = aws_iam_role.alpha_iam_role.arn
cpu = 256
memory = 512
container_definitions = jsonencode([
{
name = "${var.athens_prefix}-sample-container"
image = "nginx"
cpu = 256
memory = 512
essential = true
portMappings = [
{
containerPort = 80
hostPort = 80
}
]
logConfiguration = {
logDriver = "awslogs"
options = {
awslogs-group = aws_cloudwatch_log_group.alpha.name
awslogs-region = "us-west-1"
awslogs-stream-prefix = "sample-container"
}
}
}
])
tags = {
Name = "${var.athens_prefix}-sample-task-def-container"
}
}
# Service level definition
##########################
resource "aws_ecs_service" "sample" {
name = "${var.athens_prefix}-sample-service"
cluster = aws_ecs_cluster.alpha.id
task_definition = aws_ecs_task_definition.sample.arn
desired_count = 1
launch_type = "FARGATE"
load_balancer {
target_group_arn = aws_lb_target_group.alpha_cluster.arn
container_name = "${var.athens_prefix}-sample-container"
container_port = 80
}
network_configuration {
assign_public_ip = true
subnets = [
aws_subnet.delphi.id,
aws_subnet.crete_subnet.id
]
security_groups = [
aws_security_group.ecs_web_ingress.id,
aws_security_group.base_ecs.id
]
}
}

View File

@ -1,15 +0,0 @@
# Here is the TLS cert that we create for the alpha cluster
resource "aws_acm_certificate" "sample" {
domain_name = "*.project-athens.xyz"
validation_method = "DNS"
lifecycle {
create_before_destroy = true
}
}
resource "aws_acm_certificate_validation" "sample" {
certificate_arn = aws_acm_certificate.sample.arn
validation_record_fqdns = [ aws_route53_record.project-athens-record["2"].fqdn ]
}

View File

@ -31,16 +31,6 @@ locals {
records = [ records = [
"ns-806.awsdns-36.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400" "ns-806.awsdns-36.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"
] ]
},
{
name = tolist(aws_acm_certificate.sample.domain_validation_options)[0].resource_record_name
type = tolist(aws_acm_certificate.sample.domain_validation_options)[0].resource_record_type
records = [ tolist(aws_acm_certificate.sample.domain_validation_options)[0].resource_record_value ]
},
{
name = "sample.project-athens.xyz"
type = "CNAME"
records = [ aws_lb.alpha.dns_name ]
} }
] ]
} }