aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

[AWS::AutoScaling::AutoScalingGroup] Inconsistency between schema and api #1908

Open Iced-Sun opened 6 months ago

Iced-Sun commented 6 months ago

Name of the resource

AWS::AutoScaling::AutoScalingGroup

Resource Name

No response

Issue Description

$.Schema.definitions.LaunchTemplateSpecification is advertised as

{
  additionalProperties: false,
  type: 'object',
  properties: {
    LaunchTemplateName: { type: 'string' },
    Version: { type: 'string' },
    LaunchTemplateId: { type: 'string' }
  },
  required: [ 'Version' ]
}

While the doc states that LaunchTemplateName and LaunchTemplateId are conditionally required (and they are).

Cilents (pulumi/pulumi-aws-native#1282) may not include LaunchTemplateName or LaunchTemplateId if there is no drift when updating, causing CloudControl complains operation UPDATE failed with "InvalidRequest": A launch template specification in the overrides isn't valid. Either a LaunchTemplateId or a LaunchTemplateName must be specified.

Expected Behavior

  1. specify that one of LaunchTemplateName and LaunchTemplateId is required in the schema; or
  2. make LaunchTemplateName and LaunchTemplateId optional when updating with cloudcontrol

Observed Behavior

LaunchTemplateName and LaunchTemplateId is not specified as required in CloudFormation schema, hence clients can freely omit them if no drift is detected. But cloudformation requires one of them when updating.

Test Cases

n.a.

Other Details

No response