File tree Expand file tree Collapse file tree 11 files changed +682
-258
lines changed
Expand file tree Collapse file tree 11 files changed +682
-258
lines changed Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 22
33# Core Configuration
44environment = " dev"
5- aws_region = " us-east-1 "
5+ aws_region = " us-east-2 "
66
77# Networking Configuration (using existing VPC)
88# Replace these with your actual VPC and subnet IDs
9- vpc_id = " vpc-xxxxxxxxx" # Replace with your VPC ID
10- public_subnet_ids = [
11- " subnet-xxxxxxxxx" , # Replace with your public subnet IDs
12- " subnet-yyyyyyyyy"
13- ]
14- private_subnet_ids = [
15- " subnet-zzzzzzzzz" , # Replace with your private subnet IDs
16- " subnet-aaaaaaaaa"
17- ]
9+ vpc_id = " vpc-088d5d306dd51edda" # Replace with your VPC ID
1810
1911# ECR Configuration
20- ecr_repository_name = " ticketmaster-app"
21- ecr_image_tag_mutability = " MUTABLE"
12+ ecr_repository_url = " 311141562939.dkr.ecr.us-east-2.amazonaws.com/ticketmaster-dev"
2213
2314# ECS Configuration
2415ecs_cluster_name = " ticketmaster-dev-cluster"
Original file line number Diff line number Diff line change @@ -62,17 +62,6 @@ module "networking" {
6262 db_port = var. db_port
6363}
6464
65- # ECR Module
66- # module "ecr" {
67- # source = "./modules/ecr"
68-
69- # name_prefix = local.name_prefix
70- # common_tags = local.common_tags
71- # repository_name = var.ecr_repository_name
72- # image_tag_mutability = var.ecr_image_tag_mutability
73- # lifecycle_policy = var.ecr_lifecycle_policy
74- # aws_account_id = data.aws_caller_identity.current.account_id
75- # }
7665
7766# RDS Module
7867module "rds" {
@@ -113,7 +102,7 @@ module "ecs" {
113102 task_memory = var. ecs_task_memory
114103 desired_count = var. ecs_desired_count
115104 container_port = var. container_port
116- ecr_repository_url = module . ecr . repository_url
105+ ecr_repository_url = var . ecr_repository_url
117106 db_endpoint = module. rds . endpoint
118107 db_name = var. db_name
119108 db_username = var. db_username
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,30 +5,6 @@ data "aws_vpc" "existing" {
55 id = var. vpc_id
66}
77
8- data "aws_subnets" "public" {
9- filter {
10- name = " vpc-id"
11- values = [var . vpc_id ]
12- }
13-
14- filter {
15- name = " subnet-id"
16- values = var. public_subnet_ids
17- }
18- }
19-
20- data "aws_subnets" "private" {
21- filter {
22- name = " vpc-id"
23- values = [var . vpc_id ]
24- }
25-
26- filter {
27- name = " subnet-id"
28- values = var. private_subnet_ids
29- }
30- }
31-
328# Security Group for Application Load Balancer
339resource "aws_security_group" "alb" {
3410 name_prefix = " ${ var . name_prefix } -alb-"
Original file line number Diff line number Diff line change @@ -16,16 +16,6 @@ variable "vpc_id" {
1616 type = string
1717}
1818
19- variable "public_subnet_ids" {
20- description = " List of existing public subnet IDs"
21- type = list (string )
22- }
23-
24- variable "private_subnet_ids" {
25- description = " List of existing private subnet IDs"
26- type = list (string )
27- }
28-
2919variable "allowed_cidr_blocks" {
3020 description = " CIDR blocks allowed to access the load balancer"
3121 type = list (string )
Original file line number Diff line number Diff line change @@ -23,58 +23,12 @@ variable "aws_region" {
2323}
2424
2525# ECR Configuration
26- variable "ecr_repository_name " {
27- description = " Name of the ECR repository"
26+ variable "ecr_repository_url " {
27+ description = " URL of the ECR repository"
2828 type = string
2929 default = " ticketmaster-app"
3030}
3131
32- variable "ecr_image_tag_mutability" {
33- description = " Image tag mutability setting for ECR repository"
34- type = string
35- default = " MUTABLE"
36- validation {
37- condition = contains ([" MUTABLE" , " IMMUTABLE" ], var. ecr_image_tag_mutability )
38- error_message = " ECR image tag mutability must be either 'MUTABLE' or 'IMMUTABLE'."
39- }
40- }
41-
42- variable "ecr_lifecycle_policy" {
43- description = " Lifecycle policy for ECR repository"
44- type = string
45- default = << EOF
46- {
47- "rules": [
48- {
49- "rulePriority": 1,
50- "description": "Keep last 10 images",
51- "selection": {
52- "tagStatus": "tagged",
53- "countType": "imageCountMoreThan",
54- "countNumber": 10
55- },
56- "action": {
57- "type": "expire"
58- }
59- },
60- {
61- "rulePriority": 2,
62- "description": "Delete untagged images older than 1 day",
63- "selection": {
64- "tagStatus": "untagged",
65- "countType": "sinceImagePushed",
66- "countUnit": "days",
67- "countNumber": 1
68- },
69- "action": {
70- "type": "expire"
71- }
72- }
73- ]
74- }
75- EOF
76- }
77-
7832# ECS Configuration
7933variable "ecs_cluster_name" {
8034 description = " Name of the ECS cluster"
You can’t perform that action at this time.
0 commit comments