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

[AWS::Batch::ComputeEnvironment] - [BUG] - Tag changes triggers compute environment replacement

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

Description

### Name of the resource

AWS::Batch::ComputeEnvironment

### Resource Name

_No response_

### Issue Description

Making any changes to tags on the top level compute environment resource triggers a replacement. This is highly problematic for us and tagging should never affect the ability to update the resource in place. I'm linking this other MSK [issue](https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1715) that was finally resolved last year due to the same behavior. Can CloudFormation service team invest in getting to the point that it's a requirement for service teams to support tag changes. This is very dangerous behavior for resource replacement to get triggered in an unexpected way when something like stack level tags change. And can put developers in a bind in being able to keep their resources properly tagged when new tagging requirements come in after initially shipping and the resource starts getting used. Developers then start having to build hacky work arounds to make sure new tags don't get applied to the existing resources in their code.

Also just to be clear this is the top level ComputeEnvironment. The ReplaceComputeEnvironment flag only lets you update the tags within the ComputeResources which are the tags that get applied to the EC2 instances created by the environment, the top level ComputeEnvironment will still replace if you set this field to true.

This is properly documented in the [API](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html), but still going to file this as a bug given the issue with the behavior.

### Expected Behavior

Tag changes on AWS::Batch::ComputeEnvironment should not trigger replacement

### Observed Behavior

Tag changes replace the resource

### Test Cases

n/a

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

No repository file, test, or implementation entry point is provided; start by reviewing the AWS::Batch::ComputeEnvironment API documentation and the linked MSK issue for comparison. Done means confirming that changing top-level ComputeEnvironment tags updates the resource in place rather than replacing it, while distinguishing these tags from ComputeResources tags.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.