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

[AWS::NetworkManager:ConnectPeer] - [BUG] - ConnectAttachmentId

Open
#2,266 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::NetworkManager::ConnectPeer

### Resource Name

_No response_

### Issue Description

TransitGateway ConnectPeer is searching for ConnectAttachmentId pattern of `^attachment-([0-9a-f]{8,17})$` which is the old prefix format of TransitGateway Attachment Ids. An update is required for the current pattern of `^tgw-attach-([0-9a-f]{8,17})$`

### Expected Behavior

AWS::NetworkManager::ConnectPeer Properties ConnectAttachmentId pattern will required updated for the current pattern `^tgw-attach-([0-9a-f]{8,17})$`

### Observed Behavior

Behavior observed via LZA config deployment of customizations cloudformation templates while referencing both `!Ref TransitGatewayConnect` and `!GetAtt TransitGatewayConnect.TransitGatewayAttachmentId`

```
❌ Transit-Gateway-Connect-****-us-east-1 (Transit-Gateway-Connect) failed: Error: The stack named Transit-Gateway-Connect failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "1 validation error detected: Value at 'connectAttachmentId' failed to satisfy constraint: Member must satisfy regular expression pattern: ^attachment-([0-9a-f]{8,17})$ (Service: NetworkManager, Status Code: 400, Request ID: **********)" (RequestToken: *****************, HandlerErrorCode: InvalidRequest), Resource handler returned message: "1 validation error detected: Value at 'connectAttachmentId' failed to satisfy constraint: Member must satisfy regular expression pattern: ^attachment-([0-9a-f]{8,17})$ (Service: NetworkManager, Status Code: 400, Request ID: *******)" (RequestToken: ***** HandlerErrorCode: InvalidRequest)
at FullCloudFormationDeployment.monitorDeployment (/codebuild/output/src1839/src/s3/00/source/node_modules/aws-cdk/lib/api/deploy-stack.ts:523:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.deployStack (/codebuild/output/src1839/src/s3/00/source/node_modules/aws-cdk/lib/cdk-toolkit.ts:332:24)
at async /codebuild/output/src1839/src/s3/00/source/node_modules/aws-cdk/lib/util/work-graph.ts:105:11

❌ Deployment failed: Error: The stack named Transit-Gateway-Connect failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "1 validation error detected: Value at 'connectAttachmentId' failed to satisfy constraint: Member must satisfy regular expression pattern: ^attachment-([0-9a-f]{8,17})$ (Service: NetworkManager, Status Code: 400, Request ID: *********)" (RequestToken: ******, HandlerErrorCode: InvalidRequest), Resource handler returned message: "1 validation error detected: Value at 'connectAttachmentId' failed to satisfy constraint: Member must satisfy regular expression pattern: ^attachment-([0-9a-f]{8,17})$ (Service: NetworkManager, Status Code: 400, Request ID: *********)" (RequestToken: ********, HandlerErrorCode: InvalidRequest)
at FullCloudFormationDeployment.monitorDeployment (/codebuild/output/src1839/src/s3/00/source/node_modules/aws-cdk/lib/api/deploy-stack.ts:523:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.deployStack (/codebuild/output/src1839/src/s3/00/source/node_modules/aws-cdk/lib/cdk-toolkit.ts:332:24)
at async /codebuild/output/src1839/src/s3/00/source/node_modules/aws-cdk/lib/util/work-graph.ts:105:11
2025-02-21 16:11:10.756 | error | toolkit | The stack named Transit-Gateway-Connect failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "1 validation error detected: Value at 'connectAttachmentId' failed to satisfy constraint: Member must satisfy regular expression pattern: ^attachment-([0-9a-f]{8,17})$ (Service: NetworkManager, Status Code: 400, Request ID: ***************)" (RequestToken: ************, HandlerErrorCode: InvalidRequest), Resource handler returned message: "1 validation error detected: Value at 'connectAttachmentId' failed to satisfy constraint: Member must satisfy regular expression pattern: ^attachment-([0-9a-f]{8,17})$ (Service: NetworkManager, Status Code: 400, Request ID: ***************)" (RequestToken: **********, HandlerErrorCode: InvalidRequest)
Deployment failed
```

### Test Cases

Attempt to deploy any form of `AWS::NetworkManager::ConnectPeer` while referencing a `ConnectAttachmentId`

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the AWS::NetworkManager::ConnectPeer resource and its ConnectAttachmentId property, using the reported deployment failure and the Test Cases section as the reproduction. Verify the accepted identifier pattern against current Transit Gateway attachment IDs; done means deployments referencing ConnectAttachmentId no longer fail validation for the current tgw-attach- format.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.