AWSTemplateFormatVersion: "2010-09-09" Resources: EFSMountTarget0: UpdateReplacePolicy: "Delete" Type: "AWS::EFS::MountTarget" DeletionPolicy: "Delete" Properties: SecurityGroups: - "sg-0201d595f634128ba" FileSystemId: !ImportValue forgejo-efs-EFSFileSystemId SubnetId: "subnet-004fa7ef9de2dfb34" EFSMountTarget1: UpdateReplacePolicy: "Delete" Type: "AWS::EFS::MountTarget" DeletionPolicy: "Delete" Properties: SecurityGroups: - "sg-0201d595f634128ba" FileSystemId: !ImportValue forgejo-efs-EFSFileSystemId SubnetId: "subnet-064c8fcfd627077ef" ElasticLoadBalancingV2TargetGroupForgejo: UpdateReplacePolicy: "Delete" Type: "AWS::ElasticLoadBalancingV2::TargetGroup" DeletionPolicy: "Delete" Properties: IpAddressType: "ipv4" HealthCheckIntervalSeconds: 30 Matcher: HttpCode: "200" HealthCheckPath: "/" Port: 3000 HealthCheckEnabled: true ProtocolVersion: "HTTP1" UnhealthyThresholdCount: 2 HealthCheckTimeoutSeconds: 5 Name: "forgejo-tg" VpcId: "vpc-0b056d88428fb2a6a" HealthyThresholdCount: 5 HealthCheckProtocol: "HTTP" TargetType: "ip" HealthCheckPort: "traffic-port" Protocol: "HTTP" Tags: - Value: "Git-server" Key: "Project" ElasticLoadBalancingV2ListenerRuleForgejo: UpdateReplacePolicy: "Delete" Type: "AWS::ElasticLoadBalancingV2::ListenerRule" DeletionPolicy: "Delete" Properties: Actions: - Order: 1 TargetGroupArn: Ref: "ElasticLoadBalancingV2TargetGroupForgejo" Type: "forward" ForwardConfig: TargetGroupStickinessConfig: Enabled: false DurationSeconds: 3600 TargetGroups: - TargetGroupArn: Ref: "ElasticLoadBalancingV2TargetGroupForgejo" Weight: 1 Priority: 1 Conditions: - HostHeaderConfig: Values: - "git.n-daisuke897.com" Field: "host-header" Transforms: [] Outputs: TargetGroupArn: Description: ARN of the Forgejo blue target group Value: !Ref ElasticLoadBalancingV2TargetGroupForgejo Export: Name: !Sub "${AWS::StackName}-TargetGroupArn" ListenerRuleForgejoArn: Description: ARN of the Forgejo listener rule Value: !GetAtt ElasticLoadBalancingV2ListenerRuleForgejo.RuleArn Export: Name: !Sub "${AWS::StackName}-ListenerRuleForgejoArn"