At least two subnets in two different Availability Zones must be specified #639
Unanswered
VarinderSandhu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Guidance Question
At least two subnets in two different Availability Zones must be specified
The Question
Error while creating ALB using cloud formation template as below .i aleady have multi az subnets .
error : At least two subnets in two different Availability Zones must be specified (Service: AmazonElasticLoadBalancing
AWSTemplateFormatVersion: 2010-09-09
Description: CloudFormation template for creating a task definition
Resources:
FargateAlb:
Type: 'AWS::ElasticLoadBalancingV2::LoadBalancer'
Properties:
Name: FargateAlb
Subnets:
- subnet-xxxxx
- subnet-xxxx
- subnet-xxxxxx
Type: application
MyFargateTargetGroup:
Type: 'AWS::ElasticLoadBalancingV2::TargetGroup'
Properties:
Name: MyFargateTargetGroup
VpcId: vpc-xxxxxxxxx
Protocol: HTTP
Port: 8000
HealthCheckPath: /actuator/
TargetType: ip
Listener:
Type: 'AWS::ElasticLoadBalancingV2::Listener'
Properties:
DefaultActions:
- TargetGroupArn: !Ref MyFargateTargetGroup
Type: forward
LoadBalancerArn: !Ref FargateAlb
Port: 80
Protocol: HTTP
FargateAlbSG:
Type: 'AWS::EC2::SecurityGroup'
Properties:
GroupDescription: SG for the Fargate ALB
GroupName: FargateAlbSG
SecurityGroupIngress:
- CidrIpv6: ::/0
FromPort: 80
ToPort: 80
IpProtocol: TCP
Description: 'Inbound rule for IPv6 traffic'
- CidrIp: 0.0.0.0/0
FromPort: 80
ToPort: 80
IpProtocol: TCP
Description: 'Inbound rule for IPv4 traffic'
FargateAlb:
Type: 'AWS::ElasticLoadBalancingV2::LoadBalancer'
Properties:
SecurityGroups:
- !GetAtt FargateAlbSG.GroupId
CDK CLI Version
At least two subnets in two different Availability Zones must be specified (Service: AmazonElasticLoadBalancing
Example
No response
Example Version
No response
OS
No response
Language
Typescript, Python
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions