aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::AutoScaling::AutoScalingGroup - EstimateTemplateCost issue on validating Autoscaling group
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::AutoScaling::AutoScalingGroup
### Resource Name
AWS::AutoScaling::AutoScalingGroup
### Issue Description
EstimateTemplateCost via aws-cli validates that LaunchConfigurationName is required in AWS::AutoScaling::AutoScalingGroup
However, Cloudformation documentation shows that it's requirement is only Conditional, given that other properties needed to create the AutoscalingGroup Exists
> LaunchConfigurationName
> The name of the launch configuration to use to launch instances.
> If you specify LaunchTemplate, MixedInstancesPolicy, or InstanceId, don't specify LaunchConfigurationName.
> Required: Conditional
The template used for cost estimation uses LaunchTemplate property instead.
### Expected Behavior
EstimateTemplateCost should show the AWS calculator link from command
### Observed Behavior
Received error as shown:
```
An error occurred (ValidationError) when calling the EstimateTemplateCost operation: LaunchConfigurationName missing. It is a mandatory property of AutoScaling Group
```
### Test Cases
Ran the following aws-cli command
```
aws cloudformation estimate-template-cost \
--template-url "https://cf-templates-.s3.eu-west-2.amazonaws.com/.yaml" \
--parameters '[{"ParameterKey":"Environment","ParameterValue":"production","UsePreviousValue":false},{"ParameterKey":"Net1VpcId","ParameterValue":"vpc-xxxxxxxxxxx","UsePreviousValue":false},{"ParameterKey":"Net1TgwId","ParameterValue":"tgw-xxxxxxxxxxx","UsePreviousValue":false},{"ParameterKey":"VPCFlowLogBucket","ParameterValue":"arn:aws:s3:::xxxxxxxxxxxxxxx","UsePreviousValue":false}]'
```
### Other Details
_No response_
Contributor guide
Research direction
Start by reproducing the aws cloudformation estimate-template-cost command described in the issue with a template using LaunchTemplate instead of LaunchConfigurationName. Compare the validation result with the CloudFormation documentation's conditional requirement, and consider the issue complete when valid AutoScalingGroup templates no longer fail and the calculator link is returned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100