Cfn-python-lint: Mismatch between lint definitions and Cloudformation for AWS::ECS::Service.NetworkConfiguration.AwsvpcConfiguration

Created on 21 Sep 2020  路  8Comments  路  Source: aws-cloudformation/cfn-python-lint

cfn-lint version: (cfn-lint --version)
0.36.0

Description of issue.
The linter gives an error, while Cloudformation disagrees. For the resource type AWS::ECS::Service there is a property NetworkConfiguration. According to the Cloudformation documentation the property AwsvpcConfiguration has a lower case v (I confirmed this is actually the case by deploying a Cloudformation stack). The cfn-lint with version 0.36.0 expects AwsVpcConfiguration with an upper case v. With earlier versions this didn't give any errors. Cloudformation will not accept an upper case v.

spec bug

Most helpful comment

@p4k03n4t0r this is caused by the ongoing migration of AWS::ECS::Service to the CloudFormation Registry

Can workaround with resource-level ignores:

  Resource:
    Type: AWS::ECS::Service
    Metadata:
      cfn-lint:
        config:
          ignore_checks:
          - E3002

All 8 comments

Resource Specification 18.4.0 seems to have uppercased the v in AwsVpcConfiguration a few days ago:

    "AWS::ECS::Service.NetworkConfiguration": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-networkconfiguration.html",
      "Properties": {
        "AwsVpcConfiguration": {
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-networkconfiguration.html#cfn-ecs-service-networkconfiguration-awsvpcconfiguration",
          "UpdateType": "Mutable",
          "Required": false,
          "Type": "AwsVpcConfiguration"
        }
      }
    },


another similar ECS property we should double check as well:

    "AWS::ECS::TaskSet.NetworkConfiguration": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskset-networkconfiguration.html",
      "Properties": {
        "AwsVpcConfiguration": {
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskset-networkconfiguration.html#cfn-ecs-taskset-networkconfiguration-awsvpcconfiguration",
          "UpdateType": "Immutable",
          "Required": false,
          "Type": "AwsVpcConfiguration"
        }
      }
    },

@p4k03n4t0r this is caused by the ongoing migration of AWS::ECS::Service to the CloudFormation Registry

Can workaround with resource-level ignores:

  Resource:
    Type: AWS::ECS::Service
    Metadata:
      cfn-lint:
        config:
          ignore_checks:
          - E3002

I'm also affected by this and have used @PatMyron 's work around (thanks!). I assume we need to wait for AWS to release a fixed version of the resource specifications?

Or we patch the spec until this is fixed.

Or use 0.35.1 which is what we did.

Or we patch the spec until this is fixed.

I'm not even sure which way we'd want to patch this:

Code generation tools built on the Resource Specification like CDK/Troposphere/GoFormation/IDE extensions/Designer console/etc. would start generating templates with the new property casing while existing templates will have the old casing, and the old casing (lowercase v) is still required in regions that have not completed migration to the CloudFormation Registry since properties in previous frameworks are case sensitive

Property casing simply should not be changed during CloudFormation Registry migrations, so I've asked ECS to revert this property capitalization change

Almost sounds like we should patch in both options. What happens in a region that has done the migration? Does the old way no longer work?

What happens in a region that has done the migration? Does the old way no longer work?

Been told CloudFormation Registry property types are case insensitive, unlike previous frameworks, so the old casing should still deploy

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shawnsi picture shawnsi  路  3Comments

LukasMusebrink picture LukasMusebrink  路  3Comments

adamchainz picture adamchainz  路  4Comments

matthelgen picture matthelgen  路  4Comments

ashemedai picture ashemedai  路  4Comments