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

[AWS::DynamoDB::GlobalTable] - [BUG] - resources don't receive the aws:cloudformation built-in tags / default service-managed auto-tags

Open
#2,066 0 comments 1 reaction 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::DynamoDB::GlobalTable

### Resource Name

_No response_

### Issue Description

To find the right CloudFormation Stack, where a AWS resource is defined/maintained aws:cloudformation:* built-in tags are needed. This is an important function in day-to-day business.

### Expected Behavior

Resources with type `AWS::DynamoDB::GlobalTable`, which are managed as CloudFormations Stacks, should automatically receive the `aws:cloudformation:*` built-in tags / automatic default CFN AutoTags.

Furthermore those aws:cloudformation:* built-in tags must be handled by CloudFormation Drift-Detection correctly (hence, aws:cloudformation:* tags are _not_ a drift)

### Observed Behavior

When you have an `AWS::DynamoDB::GlobalTable` resource in your stack, it does not get the built-in tags assigned: `aws:cloudformation:stack-name`, `aws:cloudformation:logical-id` and `aws:cloudformation:stack-id`

### Test Cases

Deploy a CloudFormation stack containing this resource named above (e.g. using the example stack below) and check the tags on the console. You can't see aws:cloudformation:* built-in tags.

```yaml
---
AWSTemplateFormatVersion: '2010-09-09'
Description: CFN - create a new DynamoDB and check aws cloudformation tags

Parameters:
DBTableName:
Type: String
Default: CfnTestPrices
Description: Should be the table name to test
PrimaryRegion:
Type: String
Default: us-east-1
Description: Region Primary Table is located

Resources:
CfnTestPrices:
Type: AWS::DynamoDB::GlobalTable
DeletionPolicy: Retain
Properties:
TableName: !Ref DBTableName
BillingMode: "PROVISIONED"
AttributeDefinitions:
- AttributeName: priceId
AttributeType: S
- AttributeName: date
AttributeType: S
KeySchema:
- AttributeName: priceId
KeyType: HASH
- AttributeName: date
KeyType: RANGE
StreamSpecification:
StreamViewType: "KEYS_ONLY"
WriteProvisionedThroughputSettings:
WriteCapacityAutoScalingSettings:
MaxCapacity: 20
MinCapacity: 10
TargetTrackingScalingPolicyConfiguration:
TargetValue: 70.0
ScaleInCooldown: 61
ScaleOutCooldown: 61
DisableScaleIn: false
Replicas:
-
Region: !Ref PrimaryRegion
DeletionProtectionEnabled: true
ReadProvisionedThroughputSettings:
ReadCapacityAutoScalingSettings:
MaxCapacity: 20
MinCapacity: 10
TargetTrackingScalingPolicyConfiguration:
ScaleInCooldown: 50
ScaleOutCooldown: 50
TargetValue: 70.0
DisableScaleIn: false
```
I've re-tested it right now in eu-central-1 region. No tags `aws:cloudformation:*` are added to the resource. Below the screenshot of the deployed resource of DynamoDB:

![image](https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/assets/16392819/77564c84-120e-4835-86f8-373419291877)

### Other Details

It's the same issue for `AWS::DynamoDB::Table`, please see #2065

Contributor guide

Open the contributing guide

Research direction

Deploy the YAML example from the issue as a CloudFormation stack and inspect the AWS::DynamoDB::GlobalTable tags in the AWS console. Compare the result with the expected aws:cloudformation:stack-name, aws:cloudformation:logical-id, and aws:cloudformation:stack-id tags, including their treatment by drift detection. Done means the tags are assigned automatically and are not reported as drift; the related AWS::DynamoDB::Table issue is #2065.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.