У меня есть два окружения, одно - uat-01.domain.com, а другое - prod-01.domain.com, у меня есть следующие .ebextensions / loadBalancer.config
Мне нужно по одному для каждого окружение, есть ли способ указать окружение в конфигурации;
Это в формате yaml.
имя окружения prod-01- www-domain, и это, очевидно, живой сайт
Resources:
URLRedirectRule:
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Properties:
Actions:
- Type: redirect
RedirectConfig:
StatusCode: HTTP_301
Protocol: HTTPS
Port: 443
Host: 'www.domain.com'
Priority: 1
Conditions:
- Field: host-header
Values:
- 'www.domain.com'
ListenerArn:
Ref: AWSEBV2LoadBalancerListener
и для uat-01.domain.com, который имеет имя среды uat-01- www-domain
Resources:
URLRedirectRule:
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Properties:
Actions:
- Type: redirect
RedirectConfig:
StatusCode: HTTP_301
Protocol: HTTPS
Port: 443
Host: 'uat-01.domain.com'
Priority: 1
Conditions:
- Field: host-header
Values:
- 'uat-01.domain.com'
ListenerArn:
Ref: AWSEBV2LoadBalancerListener