Files
floci/src/main/java
Allen Sanborn 0ebcf84653 fix(config): store PutConfigRule tags and drop them on DeleteConfigRule (#6080)
* fix(config): store PutConfigRule tags and drop them on DeleteConfigRule

PutConfigRule accepted a top-level Tags list but never stored it, so
ListTagsForResource on the new rule's ARN returned an empty list and a
tagged aws_config_config_rule drifted on every plan. DeleteConfigRule
also left any tags behind under the removed rule's ARN.

Tags are now applied when PutConfigRule creates the rule, and ignored
when it updates an existing one, as the PutConfigRule model documents
("Tags are added at creation and cannot be updated with this
operation"). The get-then-put now runs under the lock DeleteConfigRule
takes, and DeleteConfigRule removes the rule's tags inside that lock,
matching conformance packs and aggregation authorizations.

* fix(config): validate creation tags and write them before the rule

PutConfigRule and PutAggregationAuthorization now check their TagsList
against the config/2014-11-12 model (at most 50 tags, Key 1-128
characters, optional Value of at most 256) and reject with the modelled
InvalidParameterValueException before anything is stored. A tag with no
Value stays accepted, as the model makes Value optional.

PutConfigRule writes the creation tags before the rule. Tags are applied
only when the Put creates the rule, so a rule stored ahead of a failed
tag write could never get its tags back from a retry; now the failed
write leaves no rule and the retry creates both.
2026-10-20 11:43:26 -04:00
..