test(cloudformation): record and ratchet what a dropped property does (#7599)

This commit is contained in:
Oleksandr Nikolaichuk authored and GitHub committed 2026-11-05 16:21:36 -04:00
1 parent a884257311
commit fd29b4aa32
8 files changed
+367 -19

No files matched your search

+2 -1
View File
@@ -377,7 +377,8 @@ the registry and stubs what nothing serves; never add type-specific code to it.
`CfnSchemaCoverageTest` requires every unset attribute to be fixed or recorded.
A new type also needs its row in `schema-surface.tsv` (same directory): run
`make cfn-schema-surface-sync`. A writable property the provisioner never reads goes in
`writable-property-gaps.tsv`.
`writable-property-gaps.tsv`. A provisioner arm that calls `droppedProperties` records, for each
writable property it reads, what a drop does in `drop-policy.tsv` (same directory).
References: `SqsCfnProvisioner` (smallest), `Ec2LaunchTemplateCfnProvisioner`
(update-in-place and replacement), `LogsCfnProvisioner` (reconcile-vs-replace update).
+2 -1
View File
@@ -250,7 +250,8 @@ service you need already has a `*CfnProvisioner`, add your type there; otherwise
"not emulated" stays distinguishable from "forgotten".
A new type also needs its row in `schema-surface.tsv` (same directory): run
`make cfn-schema-surface-sync`. A writable property the provisioner never reads goes in
`writable-property-gaps.tsv`.
`writable-property-gaps.tsv`. A provisioner arm that calls `droppedProperties` records, for each
writable property it reads, what a drop does in `drop-policy.tsv` (same directory).
`SqsCfnProvisioner` is the smallest reference implementation; `Ec2LaunchTemplateCfnProvisioner`
shows update-in-place and replacement handling; `LogsCfnProvisioner` shows a full reconcile-vs-replace
+16 -13
View File
@@ -729,25 +729,28 @@ writable property is neither read nor listed, and when a listed property has sta
closing a gap deletes its row. A new type needs a row in that file: `make cfn-schema-surface-sync`
regenerates it from AWS's published schemas, and `cfn-schema-drift.yml` compares it weekly.
On AppSync resources, a property the previous template declared and the new template drops is cleared
on `UpdateStack`; one the stack never declared keeps the value set outside it. A few members go back to
their create default (`XrayEnabled`, `AdditionalAuthenticationProviders`, a function's `FunctionVersion`,
a resolver's `Kind`). Not cleared: the identifiers, `Tags` and `EnvironmentVariables`, which the
provisioner already drives to the template, required members (`AuthenticationType`, `Type`, a function's
`DataSourceName`), create-only members, an API key's `Expires`, a GraphQL API's `ApiType` and
`Visibility`, and a UNIT resolver's `DataSourceName`. When a later resource fails the update, the
rollback puts each AppSync API, data source, function, resolver and API key that the update changed in
A property the previous template declared and the new template drops is cleared on `UpdateStack`,
goes back to its create default, or is kept, on the AppSync resources and the EC2 networking types
(`Subnet`, `InternetGateway`, `RouteTable`, `NatGateway`, `EIP`, `PrefixList`). Kept: required members
(`AuthenticationType`, `Type`, a function's `DataSourceName`), a data source's and a function's `Name`,
an API key's `Expires`, a GraphQL API's `ApiType` and `Visibility`, a UNIT resolver's `DataSourceName`,
a `NatGateway`'s `PrivateIpAddress` and a `PrefixList`'s `MaxEntries`. An update that drops a
`PrefixList`'s `AddressFamily` or `PrefixListName` fails. Create-only members are not cleared either.
A property the stack never declared keeps the value set outside it, with two exceptions that an update
clears even then: a GraphQL API's `Tags` and `EnvironmentVariables`, which every update drives to the
template, and the `NatGateway` secondary address properties. The table says so on each of those rows.
`src/test/resources/cloudformation/drop-policy.tsv` lists what a drop does to each property, and
`CfnSchemaCoverageTest` keeps the list complete. Other services follow
[#6606](https://github.com/floci-io/floci/issues/6606).
When a later resource fails the update, the rollback puts each AppSync API, data source, function, resolver and API key that the update changed in
place back to the members it had, including the ones the update cleared. An API that had no
`AdditionalAuthenticationProviders` gets an empty list back, and an API key's `Expires` is sent again
only when the update changed it, so one now less than a day away fails the rollback and the key stays as the update left it. A `GraphQLSchema`
and a replaced AppSync resource (a changed `ApiId`, name, `TypeName` or `FieldName`) are not rolled back
and end the stack in `UPDATE_ROLLBACK_FAILED`.
On the EC2 networking types (`Subnet`, `InternetGateway`, `RouteTable`, `NatGateway`, `EIP`, `PrefixList`),
a `Tags` property the previous template declared and the new one drops is cleared on `UpdateStack`, and
`Subnet`'s `MapPublicIpOnLaunch` goes back to `false`. A resource whose templates never declared `Tags` keeps the ones set outside the stack. Other services follow
[#6606](https://github.com/floci-io/floci/issues/6606).
## Template URLs
A `TemplateURL` names an object in Floci's S3, virtual-hosted or path-style. As on AWS, one whose
@@ -668,17 +668,43 @@ public class AppSyncCfnProvisioner implements CfnResourceProvisioner {
*/
private void clearDropped(Map<String, Object> req, JsonNode props, ProvisionContext ctx,
String resourceType) {
Set<String> kept = KEPT_ON_DROP.getOrDefault(resourceType, Set.of());
Map<String, Object> defaults = DEFAULT_ON_DROP.getOrDefault(resourceType, Map.of());
for (String name : ctx.droppedProperties(props)) {
if (NEVER_CLEARED.contains(name) || kept.contains(name)
|| CfnCreateOnlyProperties.isCreateOnly(resourceType, name)) {
if (NEVER_CLEARED.contains(name)) {
continue;
}
req.put(apiMemberName(name), defaults.get(name));
String policy = dropPolicy(resourceType, name);
if ("clear".equals(policy) || policy.startsWith("default:")) {
req.put(apiMemberName(name), defaults.get(name));
}
}
}
/**
* What an update does with a property of {@code resourceType} that the previous template declared
* and the new one drops: {@code clear}, {@code default:<value>}, {@code keep} or
* {@code create-only} (a create-only property: skipped or refused, never cleared).
* {@link #clearDropped} acts on it, and {@code drop-policy.tsv} is checked against it. For a
* {@link #NEVER_CLEARED} name it gives what the provisioner's own handling of that name does,
* which is why {@link #clearDropped} skips those names before asking.
*/
static String dropPolicy(String resourceType, String property) {
if ("Name".equals(property)) {
return GRAPHQL_API.equals(resourceType) ? "default:generated name" : "keep";
}
if ("Tags".equals(property) || "EnvironmentVariables".equals(property)) {
return "clear";
}
if (KEPT_ON_DROP.getOrDefault(resourceType, Set.of()).contains(property)) {
return "keep";
}
if (CfnCreateOnlyProperties.isCreateOnly(resourceType, property)) {
return "create-only";
}
Object fallback = DEFAULT_ON_DROP.getOrDefault(resourceType, Map.of()).get(property);
return fallback == null ? "clear" : "default:" + fallback;
}
private boolean isPipeline(Map<String, Object> req, String apiId, String typeName,
String fieldName) {
Object kind = req.get("kind");
@@ -0,0 +1,80 @@
package io.github.hectorvent.floci.services.cloudformation;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
/**
* The committed {@code drop-policy.tsv}: what an update does with a property the previous template
* declared and the new one drops, one row per writable property that a provisioner arm calling
* {@code ProvisionContext.droppedProperties} reads. Shared by {@link CfnSchemaCoverageTest}, which
* checks the rows against the sources, and by the AppSync provisioner test, which checks them
* against {@code AppSyncCfnProvisioner.dropPolicy}.
*
* <p>Columns, tab separated, no header: type, property, policy, and an optional reason. A policy is
* {@code clear}, {@code default:<value>}, {@code keep:<reason>} or {@code create-only}. {@code create-only}
* marks a create-only property: a drop is skipped or refused, never cleared.
*/
public final class CfnDropPolicyTable {
public static final Path FILE = Path.of("src/test/resources/cloudformation/drop-policy.tsv");
/** One row: the policy as written, and the optional fourth column. */
public record Row(String policy, String reason) {
/** {@code clear}, {@code default}, {@code keep} or {@code create-only}. */
public String kind() {
int colon = policy.indexOf(':');
return colon < 0 ? policy : policy.substring(0, colon);
}
/** The text after the colon of {@code default:} and {@code keep:}, empty otherwise. */
public String detail() {
int colon = policy.indexOf(':');
return colon < 0 ? "" : policy.substring(colon + 1);
}
}
private CfnDropPolicyTable() {
}
/** "type&lt;TAB&gt;property" to its row. */
public static Map<String, Row> load() {
try {
return parse(Files.readAllLines(FILE, StandardCharsets.UTF_8));
} catch (IOException e) {
throw new UncheckedIOException("Cannot read " + FILE, e);
}
}
/** A repeated key, a wrong field count or an unknown policy is refused with the line named. */
public static Map<String, Row> parse(List<String> lines) {
Map<String, Row> rows = new TreeMap<>();
for (String line : lines) {
if (line.isBlank()) {
continue;
}
String[] parts = line.split("\t", -1);
if (parts.length < 3 || parts.length > 4) {
throw new AssertionError("Expected 'type<TAB>property<TAB>policy[<TAB>reason]' in " + FILE
+ " but found: " + line);
}
Row row = new Row(parts[2], parts.length == 4 ? parts[3] : "");
if (!List.of("clear", "default", "keep", "create-only").contains(row.kind())) {
throw new AssertionError("Unknown policy '" + parts[2] + "' in " + FILE + ": " + line
+ ". Use clear, default:<value>, keep:<reason> or create-only.");
}
String key = parts[0] + "\t" + parts[1];
if (rows.put(key, row) != null) {
throw new AssertionError("Two rows for " + parts[0] + " " + parts[1] + " in " + FILE
+ "; the later would replace the earlier.");
}
}
return rows;
}
}
@@ -51,6 +51,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
* <p>Known limit: a property counts as read when its name appears as a literal in a read call or in
* a helper's arguments in the type's reachable code, so the scan can credit a property that is not
* applied. It is a ratchet on what the sources mention, not proof that a value takes effect.
*
* <p>The same scan pins {@code drop-policy.tsv}: one row for each writable property that an arm
* calling {@code droppedProperties} reads, saying what an update that drops it does. Only the
* presence of a row and the {@code create-only} rows are checked here; the AppSync values
* are checked against {@code AppSyncCfnProvisioner.dropPolicy} in {@code AppSyncCfnProvisionerTest},
* and the EC2 values are not checked against the code.
*/
class CfnSchemaCoverageTest {
@@ -141,6 +147,8 @@ class CfnSchemaCoverageTest {
"requestBody(props, ctx)",
"request(props, ctx)");
private static final String ALL_PROPERTIES = "*";
/** A call that makes an arm decide what a dropped property means, see {@code drop-policy.tsv}. */
private static final String DROPPED_PROPERTIES_CALL = "droppedProperties(";
/** What the registry schemas declare for one resource type, see {@link #schemaSurface}. */
private record SchemaSurface(Set<String> readOnly, Set<String> writable) { }
@@ -253,6 +261,84 @@ class CfnSchemaCoverageTest {
}
}
/**
* The drop-policy rows are the writable properties that the arms calling {@code droppedProperties}
* read, one row each, no more and no fewer. Same scan as the property gaps, so a provisioner that
* starts reading a property in such an arm, or a new arm that calls it, needs a row.
*/
@Test
void dropPolicyRowsMatchTheArmsThatCallDroppedProperties() {
assertSameLines(render(recordedDropPolicyKeys()), render(actualDropPolicyKeys()),
"The set of properties with a recorded drop policy changed.",
"(an arm that calls droppedProperties reads a property, or a new such arm arrived): "
+ "add a row with its policy to " + CfnDropPolicyTable.FILE,
"(no longer read in an arm that calls droppedProperties): delete their rows from "
+ CfnDropPolicyTable.FILE);
}
@Test
void everyDropPolicyRowIsStillReal() {
Map<String, String> actual = actualDropPolicyKeys();
List<String> stale = CfnDropPolicyTable.load().keySet().stream()
.filter(key -> !actual.containsKey(key))
.sorted()
.toList();
if (!stale.isEmpty()) {
throw new AssertionError("These properties are no longer read by an arm that calls "
+ "droppedProperties, so their rows in " + CfnDropPolicyTable.FILE
+ " are stale and should be deleted: " + stale);
}
}
@Test
void everyKeepPolicyNamesItsReason() {
List<String> unexplained = CfnDropPolicyTable.load().entrySet().stream()
.filter(e -> "keep".equals(e.getValue().kind())
&& (e.getValue().detail().isBlank() || e.getValue().detail().startsWith("TODO")))
.map(Map.Entry::getKey)
.sorted()
.toList();
if (!unexplained.isEmpty()) {
throw new AssertionError("A 'keep' policy in " + CfnDropPolicyTable.FILE
+ " must say why the value stays, as keep:<reason>: " + unexplained);
}
}
/** {@code create-only} is the class: a drop there is skipped or refused, never cleared. */
@Test
void everyCreateOnlyPolicyIsACreateOnlyProperty() {
List<String> wrong = CfnDropPolicyTable.load().entrySet().stream()
.filter(e -> "create-only".equals(e.getValue().kind()))
.map(Map.Entry::getKey)
.filter(key -> {
String[] parts = key.split("\t");
return !CfnCreateOnlyProperties.isCreateOnly(parts[0], parts[1]);
})
.sorted()
.toList();
if (!wrong.isEmpty()) {
throw new AssertionError("These 'create-only' rows in " + CfnDropPolicyTable.FILE
+ " are not create-only in create-only-properties.json: " + wrong);
}
}
@Test
void aDuplicateDropPolicyRowIsRefused() {
AssertionError e = assertThrows(AssertionError.class, () -> CfnDropPolicyTable.parse(List.of(
"AWS::EC2::Subnet\tTags\tclear", "AWS::EC2::Subnet\tTags\tclear")));
assertTrue(e.getMessage().contains("AWS::EC2::Subnet Tags"), e.getMessage());
}
@Test
void anUnknownDropPolicyIsRefused() {
AssertionError e = assertThrows(AssertionError.class,
() -> CfnDropPolicyTable.parse(List.of("AWS::EC2::Subnet\tTags\tremove")));
assertTrue(e.getMessage().contains("remove"), e.getMessage());
}
/** An entry no provisioner contains credits nothing: a renamed helper must not leave it behind. */
@Test
void everyWholesaleCallAndHelperReadStillOccursInAProvisioner() {
@@ -348,6 +434,36 @@ class CfnSchemaCoverageTest {
return gaps;
}
/** "AWS::EC2::Subnet\tTags" for each row of {@code drop-policy.tsv}. */
private static Map<String, String> recordedDropPolicyKeys() {
Map<String, String> keys = new TreeMap<>();
CfnDropPolicyTable.load().keySet().forEach(key -> keys.put(key, ""));
return keys;
}
/**
* The writable properties read by the arms whose reachable code calls {@code droppedProperties},
* keyed as in {@link CfnDropPolicyTable}.
*/
private static Map<String, String> actualDropPolicyKeys() {
Map<String, ProvisionerScan> scans = scanProvisioners();
Map<String, String> keys = new TreeMap<>();
for (Map.Entry<String, String> entry : inventory().entrySet()) {
String type = entry.getKey();
ProvisionerScan scan = scans.get(entry.getValue());
if (scan == null || !scan.reaches(type, DROPPED_PROPERTIES_CALL)) {
continue;
}
Set<String> read = scan.propertiesReadBy(type);
for (String property : schemaWritableProperties(type)) {
if (read.contains(ALL_PROPERTIES) || read.contains(property)) {
keys.put(type + "\t" + property, "");
}
}
}
return keys;
}
/** The gaps computed from the schemas and the provisioner sources, keyed the same way. */
private static Map<String, String> actualGaps() {
Map<String, ProvisionerScan> scans = scanProvisioners();
@@ -432,6 +548,12 @@ class CfnSchemaCoverageTest {
return read;
}
/** Whether the code reachable from the type's arm contains {@code call}. */
boolean reaches(String resourceType, String call) {
String code = codeByType.isEmpty() ? classCode : codeByType.get(resourceType);
return code != null && code.contains(call);
}
Set<String> attributesFor(String resourceType) {
if (byType.isEmpty()) {
return classWide;
@@ -16,6 +16,7 @@ import io.github.hectorvent.floci.services.appsync.model.Resolver;
import io.github.hectorvent.floci.services.appsync.model.ResolverKind;
import io.github.hectorvent.floci.services.appsync.model.SchemaCreationStatus;
import io.github.hectorvent.floci.services.appsync.model.SchemaCreationStatusType;
import io.github.hectorvent.floci.services.cloudformation.CfnDropPolicyTable;
import io.github.hectorvent.floci.services.cloudformation.CloudFormationTemplateEngine;
import io.github.hectorvent.floci.services.cloudformation.model.StackResource;
import org.junit.jupiter.api.Test;
@@ -26,6 +27,7 @@ import java.time.Clock;
import java.time.Duration;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -1517,4 +1519,30 @@ class AppSyncCfnProvisionerTest {
"AWS::AppSync::Resolver", "AWS::AppSync::ApiKey"),
provisioner.resourceTypes());
}
/**
* The AppSync rows of drop-policy.tsv are what {@code clearDropped} acts on. A {@code keep} row
* carries its reason after the colon, which the accessor does not repeat.
*/
@Test
void appSyncDropPolicyRowsMatchWhatClearDroppedActsOn() {
List<String> mismatched = new ArrayList<>();
int checked = 0;
for (Map.Entry<String, CfnDropPolicyTable.Row> entry : CfnDropPolicyTable.load().entrySet()) {
String[] key = entry.getKey().split("\t");
if (!key[0].startsWith("AWS::AppSync::")) {
continue;
}
checked++;
CfnDropPolicyTable.Row row = entry.getValue();
String expected = AppSyncCfnProvisioner.dropPolicy(key[0], key[1]);
String recorded = "keep".equals(row.kind()) ? "keep" : row.policy();
if (!expected.equals(recorded)) {
mismatched.add(key[0] + " " + key[1] + ": file says " + row.policy() + ", code says " + expected);
}
}
assertTrue(checked > 0, "no AppSync rows in " + CfnDropPolicyTable.FILE);
assertTrue(mismatched.isEmpty(), "Rows in " + CfnDropPolicyTable.FILE
+ " that differ from AppSyncCfnProvisioner.dropPolicy: " + mismatched);
}
}
@@ -0,0 +1,87 @@
AWS::AppSync::ApiKey ApiId create-only
AWS::AppSync::ApiKey Description clear
AWS::AppSync::ApiKey Expires keep:the update parses a date, null is refused
AWS::AppSync::DataSource ApiId create-only
AWS::AppSync::DataSource Description clear
AWS::AppSync::DataSource DynamoDBConfig clear
AWS::AppSync::DataSource EventBridgeConfig clear
AWS::AppSync::DataSource HttpConfig clear
AWS::AppSync::DataSource LambdaConfig clear
AWS::AppSync::DataSource MetricsConfig clear not stored by the service
AWS::AppSync::DataSource Name keep:prior name is reused
AWS::AppSync::DataSource OpenSearchServiceConfig clear
AWS::AppSync::DataSource RelationalDatabaseConfig clear
AWS::AppSync::DataSource ServiceRoleArn clear
AWS::AppSync::DataSource Type keep:required
AWS::AppSync::FunctionConfiguration ApiId create-only
AWS::AppSync::FunctionConfiguration Code clear
AWS::AppSync::FunctionConfiguration CodeS3Location clear not stored by the service; the provisioner refuses a value
AWS::AppSync::FunctionConfiguration DataSourceName keep:required
AWS::AppSync::FunctionConfiguration Description clear
AWS::AppSync::FunctionConfiguration FunctionVersion default:2018-05-29
AWS::AppSync::FunctionConfiguration MaxBatchSize clear
AWS::AppSync::FunctionConfiguration Name keep:prior name is reused
AWS::AppSync::FunctionConfiguration RequestMappingTemplate clear
AWS::AppSync::FunctionConfiguration RequestMappingTemplateS3Location clear not stored by the service
AWS::AppSync::FunctionConfiguration ResponseMappingTemplate clear
AWS::AppSync::FunctionConfiguration ResponseMappingTemplateS3Location clear not stored by the service
AWS::AppSync::FunctionConfiguration Runtime clear
AWS::AppSync::FunctionConfiguration SyncConfig clear not stored by the service
AWS::AppSync::GraphQLApi AdditionalAuthenticationProviders default:[]
AWS::AppSync::GraphQLApi ApiType keep:the provisioner leaves it out of the update, so the stored value stays
AWS::AppSync::GraphQLApi AuthenticationType keep:required
AWS::AppSync::GraphQLApi EnhancedMetricsConfig clear
AWS::AppSync::GraphQLApi EnvironmentVariables clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
AWS::AppSync::GraphQLApi IntrospectionConfig clear
AWS::AppSync::GraphQLApi LambdaAuthorizerConfig clear
AWS::AppSync::GraphQLApi LogConfig clear
AWS::AppSync::GraphQLApi MergedApiExecutionRoleArn clear
AWS::AppSync::GraphQLApi Name default:generated name
AWS::AppSync::GraphQLApi OpenIDConnectConfig clear
AWS::AppSync::GraphQLApi OwnerContact clear
AWS::AppSync::GraphQLApi QueryDepthLimit clear
AWS::AppSync::GraphQLApi ResolverCountLimit clear
AWS::AppSync::GraphQLApi Tags clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
AWS::AppSync::GraphQLApi UserPoolConfig clear
AWS::AppSync::GraphQLApi Visibility keep:the provisioner leaves it out of the update, so the stored value stays
AWS::AppSync::GraphQLApi XrayEnabled default:false
AWS::AppSync::Resolver ApiId create-only
AWS::AppSync::Resolver CachingConfig clear
AWS::AppSync::Resolver Code clear
AWS::AppSync::Resolver CodeS3Location clear not stored by the service; the provisioner refuses a value
AWS::AppSync::Resolver DataSourceName keep:required for a UNIT resolver, cleared only for a PIPELINE resolver
AWS::AppSync::Resolver FieldName create-only
AWS::AppSync::Resolver Kind default:UNIT
AWS::AppSync::Resolver MaxBatchSize clear
AWS::AppSync::Resolver MetricsConfig clear
AWS::AppSync::Resolver PipelineConfig clear
AWS::AppSync::Resolver RequestMappingTemplate clear
AWS::AppSync::Resolver RequestMappingTemplateS3Location clear not stored by the service
AWS::AppSync::Resolver ResponseMappingTemplate clear
AWS::AppSync::Resolver ResponseMappingTemplateS3Location clear not stored by the service
AWS::AppSync::Resolver Runtime clear
AWS::AppSync::Resolver SyncConfig clear
AWS::AppSync::Resolver TypeName create-only
AWS::EC2::EIP Tags clear
AWS::EC2::InternetGateway Tags clear
AWS::EC2::NatGateway AllocationId create-only a drop is refused for a public gateway
AWS::EC2::NatGateway AvailabilityMode create-only a drop is accepted and skipped
AWS::EC2::NatGateway ConnectivityType create-only a drop reads as public, so a private gateway is replaced
AWS::EC2::NatGateway PrivateIpAddress keep:a drop keeps the address the gateway holds
AWS::EC2::NatGateway SecondaryAllocationIds clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
AWS::EC2::NatGateway SecondaryPrivateIpAddressCount clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
AWS::EC2::NatGateway SecondaryPrivateIpAddresses clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
AWS::EC2::NatGateway SubnetId create-only a drop is refused
AWS::EC2::NatGateway Tags clear
AWS::EC2::PrefixList AddressFamily keep:required, a drop is refused
AWS::EC2::PrefixList Entries clear
AWS::EC2::PrefixList MaxEntries keep:an update that leaves it out keeps the list capacity
AWS::EC2::PrefixList PrefixListName keep:required, a drop is refused
AWS::EC2::PrefixList Tags clear
AWS::EC2::RouteTable Tags clear
AWS::EC2::RouteTable VpcId create-only a drop is refused
AWS::EC2::Subnet AvailabilityZone create-only a drop is read as no preference and the subnet is kept
AWS::EC2::Subnet CidrBlock create-only a drop never matches the stored block, so the subnet is replaced
AWS::EC2::Subnet MapPublicIpOnLaunch default:false
AWS::EC2::Subnet Tags clear
AWS::EC2::Subnet VpcId create-only a drop is refused
1 AWS::AppSync::ApiKey ApiId create-only
2 AWS::AppSync::ApiKey Description clear
3 AWS::AppSync::ApiKey Expires keep:the update parses a date, null is refused
4 AWS::AppSync::DataSource ApiId create-only
5 AWS::AppSync::DataSource Description clear
6 AWS::AppSync::DataSource DynamoDBConfig clear
7 AWS::AppSync::DataSource EventBridgeConfig clear
8 AWS::AppSync::DataSource HttpConfig clear
9 AWS::AppSync::DataSource LambdaConfig clear
10 AWS::AppSync::DataSource MetricsConfig clear not stored by the service
11 AWS::AppSync::DataSource Name keep:prior name is reused
12 AWS::AppSync::DataSource OpenSearchServiceConfig clear
13 AWS::AppSync::DataSource RelationalDatabaseConfig clear
14 AWS::AppSync::DataSource ServiceRoleArn clear
15 AWS::AppSync::DataSource Type keep:required
16 AWS::AppSync::FunctionConfiguration ApiId create-only
17 AWS::AppSync::FunctionConfiguration Code clear
18 AWS::AppSync::FunctionConfiguration CodeS3Location clear not stored by the service; the provisioner refuses a value
19 AWS::AppSync::FunctionConfiguration DataSourceName keep:required
20 AWS::AppSync::FunctionConfiguration Description clear
21 AWS::AppSync::FunctionConfiguration FunctionVersion default:2018-05-29
22 AWS::AppSync::FunctionConfiguration MaxBatchSize clear
23 AWS::AppSync::FunctionConfiguration Name keep:prior name is reused
24 AWS::AppSync::FunctionConfiguration RequestMappingTemplate clear
25 AWS::AppSync::FunctionConfiguration RequestMappingTemplateS3Location clear not stored by the service
26 AWS::AppSync::FunctionConfiguration ResponseMappingTemplate clear
27 AWS::AppSync::FunctionConfiguration ResponseMappingTemplateS3Location clear not stored by the service
28 AWS::AppSync::FunctionConfiguration Runtime clear
29 AWS::AppSync::FunctionConfiguration SyncConfig clear not stored by the service
30 AWS::AppSync::GraphQLApi AdditionalAuthenticationProviders default:[]
31 AWS::AppSync::GraphQLApi ApiType keep:the provisioner leaves it out of the update, so the stored value stays
32 AWS::AppSync::GraphQLApi AuthenticationType keep:required
33 AWS::AppSync::GraphQLApi EnhancedMetricsConfig clear
34 AWS::AppSync::GraphQLApi EnvironmentVariables clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
35 AWS::AppSync::GraphQLApi IntrospectionConfig clear
36 AWS::AppSync::GraphQLApi LambdaAuthorizerConfig clear
37 AWS::AppSync::GraphQLApi LogConfig clear
38 AWS::AppSync::GraphQLApi MergedApiExecutionRoleArn clear
39 AWS::AppSync::GraphQLApi Name default:generated name
40 AWS::AppSync::GraphQLApi OpenIDConnectConfig clear
41 AWS::AppSync::GraphQLApi OwnerContact clear
42 AWS::AppSync::GraphQLApi QueryDepthLimit clear
43 AWS::AppSync::GraphQLApi ResolverCountLimit clear
44 AWS::AppSync::GraphQLApi Tags clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
45 AWS::AppSync::GraphQLApi UserPoolConfig clear
46 AWS::AppSync::GraphQLApi Visibility keep:the provisioner leaves it out of the update, so the stored value stays
47 AWS::AppSync::GraphQLApi XrayEnabled default:false
48 AWS::AppSync::Resolver ApiId create-only
49 AWS::AppSync::Resolver CachingConfig clear
50 AWS::AppSync::Resolver Code clear
51 AWS::AppSync::Resolver CodeS3Location clear not stored by the service; the provisioner refuses a value
52 AWS::AppSync::Resolver DataSourceName keep:required for a UNIT resolver, cleared only for a PIPELINE resolver
53 AWS::AppSync::Resolver FieldName create-only
54 AWS::AppSync::Resolver Kind default:UNIT
55 AWS::AppSync::Resolver MaxBatchSize clear
56 AWS::AppSync::Resolver MetricsConfig clear
57 AWS::AppSync::Resolver PipelineConfig clear
58 AWS::AppSync::Resolver RequestMappingTemplate clear
59 AWS::AppSync::Resolver RequestMappingTemplateS3Location clear not stored by the service
60 AWS::AppSync::Resolver ResponseMappingTemplate clear
61 AWS::AppSync::Resolver ResponseMappingTemplateS3Location clear not stored by the service
62 AWS::AppSync::Resolver Runtime clear
63 AWS::AppSync::Resolver SyncConfig clear
64 AWS::AppSync::Resolver TypeName create-only
65 AWS::EC2::EIP Tags clear
66 AWS::EC2::InternetGateway Tags clear
67 AWS::EC2::NatGateway AllocationId create-only a drop is refused for a public gateway
68 AWS::EC2::NatGateway AvailabilityMode create-only a drop is accepted and skipped
69 AWS::EC2::NatGateway ConnectivityType create-only a drop reads as public, so a private gateway is replaced
70 AWS::EC2::NatGateway PrivateIpAddress keep:a drop keeps the address the gateway holds
71 AWS::EC2::NatGateway SecondaryAllocationIds clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
72 AWS::EC2::NatGateway SecondaryPrivateIpAddressCount clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
73 AWS::EC2::NatGateway SecondaryPrivateIpAddresses clear an update also clears it when the stack never declared it, so a value set outside the stack is lost
74 AWS::EC2::NatGateway SubnetId create-only a drop is refused
75 AWS::EC2::NatGateway Tags clear
76 AWS::EC2::PrefixList AddressFamily keep:required, a drop is refused
77 AWS::EC2::PrefixList Entries clear
78 AWS::EC2::PrefixList MaxEntries keep:an update that leaves it out keeps the list capacity
79 AWS::EC2::PrefixList PrefixListName keep:required, a drop is refused
80 AWS::EC2::PrefixList Tags clear
81 AWS::EC2::RouteTable Tags clear
82 AWS::EC2::RouteTable VpcId create-only a drop is refused
83 AWS::EC2::Subnet AvailabilityZone create-only a drop is read as no preference and the subnet is kept
84 AWS::EC2::Subnet CidrBlock create-only a drop never matches the stored block, so the subnet is replaced
85 AWS::EC2::Subnet MapPublicIpOnLaunch default:false
86 AWS::EC2::Subnet Tags clear
87 AWS::EC2::Subnet VpcId create-only a drop is refused