Skip to content

W4001 reversed #4115

@michaelwittig

Description

@michaelwittig

Is this feature request related to a new rule or cfn-lint capabilities?

No response

Describe the feature you'd like to request

Hi,

W4001 checks if all parameters referenced in tMetadata.AWS::CloudFormation::Interface exist. I was wondering if there is a check that does the opposite. Check if all parameters are listed in Metadata.AWS::CloudFormation::Interface.

Describe the solution you'd like

The following template should fail because SubnetId is not listed in the Metadata.AWS::CloudFormation::Interface:

AWSTemplateFormatVersion: 2010-09-09

Metadata:
  AWS::CloudFormation::Interface:
    ParameterGroups:
      - Label:
          default: 'Vpc Parameters'
        Parameters:
          - VpcId
Parameters:
  # Vpc Parameters
  VpcId:
    Description: VPC To Create Stack In
    Type: String
  SubnetId:
    Description: Subnet To Create Stack In
    Type: String

Resources:
  Test:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Ref VpcId

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request

Would this feature include a breaking change?

  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions