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

Drift detection for IPv6CidrBlock doesn't process correctly for AWS::EC2::Subnet

Open
#938 4 comments 8 reactions 0 assignees View on GitHub
bug NeedTriage
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::EC2::Subnet

### Resource Name

AWS::EC2::Subnet

### Issue Description

When processing drift detection for the IPv6CidrBlock attribute on a `AWS::EC2::Subnet` resource, IPv6 shorthand addressing used in the cloudformation templates (say through the use of a string or the `Fn::Cidr` intrinsic) is not properly compared to the full IPv6 notation on the resource.

For example, the following are not treated as equal.

### Expected Behavior

IPv6 addresses that mean the same thing (i.e. equivalent) to be treated as equal

### Observed Behavior

Expected
```json
{
"AssignIpv6AddressOnCreation": true,
"AvailabilityZone": "ap-southeast-2a",
"CidrBlock": "10.0.0.0/24",
"Ipv6CidrBlock": "2406:da1c:a1e:1234:0:0:0:0/64",
"Tags": [
{
"Key": "Name",
"Value": "MySubnet-A"
}
],
"VpcId": "vpc-aaaaaaaa"
}
```

Actual
```json
{
"AssignIpv6AddressOnCreation": true,
"AvailabilityZone": "ap-southeast-2a",
"CidrBlock": "10.0.0.0/24",
"Ipv6CidrBlock": "2406:da1c:a1e:1234::/64",
"Tags": [
{
"Key": "Name",
"Value": "MySubnet-A"
}
],
"VpcId": "vpc-aaaaaaaa"
}
```

### Test Cases

Specify IPv6 shorthand addresses in a cloudformation template, deploy the subnet and run drift detection. All subnets should drift.

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

No repository files, tests, or code entry points are named. Reproduce drift detection for AWS::EC2::Subnet with the shorthand and expanded IPv6CidrBlock values shown, then trace how those values are compared; done means equivalent IPv6 addresses are treated as equal and no longer report drift.

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
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.