Skip to content

Commit

Permalink
first steps to remove CF stack
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocicerchia committed Dec 26, 2024
1 parent ea322ad commit 601b136
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
19 changes: 0 additions & 19 deletions sys/cloudformation/parameters.prod.json

This file was deleted.

Binary file removed sys/cloudformation/stack.png
Binary file not shown.
20 changes: 19 additions & 1 deletion sys/cloudformation/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ Resources:

# SECURITY GROUP
sgelb:
DeletionPolicy: Retain
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: !Sub '${ServiceName}-elb'
Expand All @@ -210,6 +211,7 @@ Resources:
- Key: env
Value: !Ref ServiceName
sgecs:
DeletionPolicy: Retain
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: !Sub '${ServiceName}-ecs'
Expand All @@ -233,6 +235,7 @@ Resources:
- Key: env
Value: !Ref ServiceName
sgredis:
DeletionPolicy: Retain
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: !Sub '${ServiceName}-redis'
Expand All @@ -254,13 +257,15 @@ Resources:

# CLOUDWATCH LOGS
cloudwatchloggroup:
DeletionPolicy: Retain
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub '${ServiceName}-logs'
RetentionInDays: 30

# ELB
elb:
DeletionPolicy: Retain
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Name: !Sub '${ServiceName}-elb'
Expand All @@ -273,6 +278,7 @@ Resources:

# ELB LISTENER
elblistener80:
DeletionPolicy: Retain
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
Expand All @@ -286,6 +292,7 @@ Resources:
Protocol: HTTP

elblistener443:
DeletionPolicy: Retain
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
Expand All @@ -303,6 +310,7 @@ Resources:

# ECS CLUSTER
ecscluster:
DeletionPolicy: Retain
Type: AWS::ECS::Cluster
Properties:
ClusterName: !Sub '${ServiceName}-cluster-${Environment}'
Expand All @@ -318,6 +326,7 @@ Resources:

# ECS SERVICE
ecsservice:
DeletionPolicy: Retain
Type: AWS::ECS::Service
Properties:
Cluster: !Ref ecscluster
Expand All @@ -342,8 +351,8 @@ Resources:

# ECS TASK DEFINITION
ecstask:
Type: AWS::ECS::TaskDefinition
DeletionPolicy: Retain
Type: AWS::ECS::TaskDefinition
UpdateReplacePolicy: Retain
Properties:
ExecutionRoleArn: !Ref ExecRoleArn
Expand Down Expand Up @@ -430,6 +439,7 @@ Resources:

# AUTO SCALING
asscalabletarget:
DeletionPolicy: Retain
Type: AWS::ApplicationAutoScaling::ScalableTarget
DependsOn:
- ecsservice
Expand All @@ -443,6 +453,7 @@ Resources:

# ELB TARGET GROUP
elbtargetgroup:
DeletionPolicy: Retain
Type: AWS::ElasticLoadBalancingV2::TargetGroup
DependsOn:
- elb
Expand All @@ -468,6 +479,7 @@ Resources:

# ELB LISTENER RULE
elblistenerrule80:
DeletionPolicy: Retain
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Properties:
Actions:
Expand All @@ -485,6 +497,7 @@ Resources:
ListenerArn: !Ref elblistener80
Priority: 1
elblistenerrule443:
DeletionPolicy: Retain
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Properties:
Actions:
Expand All @@ -501,6 +514,7 @@ Resources:

# SCHEDULED TASK
eventrulecontributorsupdate:
DeletionPolicy: Retain
Type: AWS::Events::Rule
Properties:
Name: 'app-contributors-update'
Expand All @@ -522,6 +536,7 @@ Resources:

# IAM USER
iamusergithubactions:
DeletionPolicy: Retain
Type: AWS::IAM::User
Properties:
Policies:
Expand Down Expand Up @@ -576,12 +591,14 @@ Resources:

# IAM ACCESS-KEY
iamkey:
DeletionPolicy: Retain
Type: AWS::IAM::AccessKey
Properties:
UserName: !Ref iamusergithubactions

# REDIS
rediscluster:
DeletionPolicy: Retain
Type: AWS::ElastiCache::ReplicationGroup
Properties:
AtRestEncryptionEnabled: False
Expand All @@ -599,6 +616,7 @@ Resources:
SnapshotRetentionLimit: 1
TransitEncryptionEnabled: False
redissubnet:
DeletionPolicy: Retain
Type: AWS::ElastiCache::SubnetGroup
Properties:
CacheSubnetGroupName: poser-subnet
Expand Down

0 comments on commit 601b136

Please sign in to comment.