chore(cloudformation): reuse the launch configuration replacement decision (#8664)

Use the shared replacement decision for launch configurations, removing the duplicate ADDED guard now that #8471 makes an added create-only value require replacement for every resource type. The unit fixture derives that decision instead of forcing the obsolete false result.

Also make the negative card-validation fixture deterministic: it generates the valid value and changes its first digit, instead of a fixed 999 that could match the CVV for the randomly generated key.
This commit is contained in:
Jackson Price authored and GitHub committed 2026-11-16 19:48:37 -04:00
1 parent 47466ca6a8
commit bab6428f78
3 files changed
+20 -27

No files matched your search

@@ -452,9 +452,7 @@ class AutoScalingGroupCfnProvisionerTest {
void launchConfigurationRejectsAddedCreateOnlyInputBeforeMutation() {
ObjectNode previous = instanceProperties();
ObjectNode current = previous.deepCopy().put("UserData", "IyEvYmluL3NoCmVjaG8gcmVhZHkK");
PropertyChanges changes = PropertyChanges.between(LAUNCH_CONFIGURATION, true, previous, current,
null, null, false);
provisionExistingInstance(current, previous, changes, true);
provisionExistingInstance(current, previous, null, true);
}
@ParameterizedTest