aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::Route53::HostedZone - ::Id - Better behavior if not selected in Parameters

Open
#792 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

## 1. Title

#### AWS::Route53::HostedZone::Id - Better behavior if not selected in Parameters:

## 2. Scope of request

If a CloudFormation template has this Parameter:

```yaml
Parameters:
Route53HostedZoneId:
Default: ''
Type: AWS::Route53::HostedZone::Id
```

and the User does not select a Hosted Zone or if there is no Hosted Zone, there should be a way for the Cloudformation to detect this and use `Condition` to avoid using the Hosted Zone.

Specifically, if a user chooses a Hosted Zone, then the Cloudformation can create an HTTPS-based solution. If a Hosted Zone is not chosen, the Cloudformation can create an HTTP-based solution. For instance:

```yaml
ListenerSwaggerHttps:
Condition: IfRoute53HostedZoneId
Properties:
Certificates:
- CertificateArn: !GetAtt LambdaRunnerFindDomainName.CertificateArn
DefaultActions:
- TargetGroupArn: !Ref TargetGroupSwagger
Type: forward
LoadBalancerArn: !Ref LoadBalancerPublic
Port: 443
Protocol: HTTPS
Type: AWS::ElasticLoadBalancingV2::Listener
```

## 6. Category (required) - Will help with tagging and be easier to find by other users to +1

Use the categories as displayed in the AWS Management Console (simplified):

4. Networking & Content (VPC, Route53, API GW,...)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.