Skip to content
Merged
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ Every service links to its own page with a coverage breakdown — audited operat
| [Google Cloud Pub/Sub](services/gcppubsub/README.md) | B | 38 | 3 gaps |
| [Google Cloud Resource Manager and Service Usage](services/gcpresourcemanager/README.md) | B | 39 | 3 gaps |
| [Google Cloud Storage](services/gcpstorage/README.md) | B | 39 | 4 gaps |
| [Google Secret Manager](services/gcpsecretmanager/README.md) | B | 18 | 1 gap |
| [Google Secret Manager](services/gcpsecretmanager/README.md) | B | 18 | clean |
| [Identity Platform](services/gcpidentitytoolkit/README.md) | B | 1 | clean |
| [Kubernetes Engine](services/gcpcontainer/README.md) | B | — | 5 families; 4 gaps |
| [Memorystore for Redis](services/gcpredis/README.md) | B | 14 | 3 gaps |
Expand Down Expand Up @@ -1028,7 +1028,7 @@ Every service links to its own page with a coverage breakdown — audited operat
| [Cloudfrontkeyvaluestore](services/cloudfrontkeyvaluestore/README.md) | A | 6 | 2 structural gaps |
| [Cloudhsmv2](services/cloudhsmv2/README.md) | B | 18 | 3 structural gaps |
| [Codegurureviewer](services/codegurureviewer/README.md) | B | 14 | 2 structural gaps |
| [Connect](services/connect/README.md) | B | 397 | 9 gaps; 2 structural gaps |
| [Connect](services/connect/README.md) | B | 397 | 8 gaps; 2 structural gaps |
| [Cur](services/cur/README.md) | B | 7 | clean |
| [Directconnect](services/directconnect/README.md) | A | 73 | 8 structural gaps; 1 deferred |
| [Dsql](services/dsql/README.md) | A | 16 | 7 gaps; 2 structural gaps |
Expand Down
56 changes: 55 additions & 1 deletion pkgs/persistence/testdata/snapshot_inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -7482,6 +7482,39 @@
"StackSetOperationResult.StatusReason string `xml:\"StatusReason,omitempty\"`",
"Tag.Key string `xml:\"Key\" json:\"key\"`",
"Tag.Value string `xml:\"Value\" json:\"value\"`",
"Template.AWSTemplateFormatVersion string `json:\"AWSTemplateFormatVersion\" yaml:\"AWSTemplateFormatVersion\"`",
"Template.Conditions map[string]any `json:\"Conditions\" yaml:\"Conditions\"`",
"Template.Description string `json:\"Description\" yaml:\"Description\"`",
"Template.Mappings map[string]any `json:\"Mappings\" yaml:\"Mappings\"`",
"Template.Outputs map[string]TemplateOutput `json:\"Outputs\" yaml:\"Outputs\"`",
"Template.Parameters map[string]TemplateParameter `json:\"Parameters\" yaml:\"Parameters\"`",
"Template.Resources map[string]TemplateResource `json:\"Resources\" yaml:\"Resources\"`",
"Template.Rules map[string]any `json:\"Rules\" yaml:\"Rules\"`",
"Template.Transform []string `json:\"Transform\" yaml:\"Transform\"`",
"Template.{UnmarshalJSON}",
"TemplateOutput.Condition string `json:\"Condition\" yaml:\"Condition\"`",
"TemplateOutput.Description string `json:\"Description\" yaml:\"Description\"`",
"TemplateOutput.Export *TemplateOutputExport `json:\"Export\" yaml:\"Export\"`",
"TemplateOutput.Value any `json:\"Value\" yaml:\"Value\"`",
"TemplateOutputExport.Name any `json:\"Name\" yaml:\"Name\"`",
"TemplateParameter.AllowedPattern string `json:\"AllowedPattern\" yaml:\"AllowedPattern\"`",
"TemplateParameter.AllowedValues []string `json:\"AllowedValues\" yaml:\"AllowedValues\"`",
"TemplateParameter.ConstraintDescription string `json:\"ConstraintDescription\" yaml:\"ConstraintDescription\"`",
"TemplateParameter.Default any `json:\"Default\" yaml:\"Default\"`",
"TemplateParameter.Description string `json:\"Description\" yaml:\"Description\"`",
"TemplateParameter.MaxLength *int `json:\"MaxLength\" yaml:\"MaxLength\"`",
"TemplateParameter.MaxValue *float64 `json:\"MaxValue\" yaml:\"MaxValue\"`",
"TemplateParameter.MinLength *int `json:\"MinLength\" yaml:\"MinLength\"`",
"TemplateParameter.MinValue *float64 `json:\"MinValue\" yaml:\"MinValue\"`",
"TemplateParameter.NoEcho bool `json:\"NoEcho\" yaml:\"NoEcho\"`",
"TemplateParameter.Type string `json:\"Type\" yaml:\"Type\"`",
"TemplateResource.Condition string `json:\"-\" yaml:\"-\"`",
"TemplateResource.DeletionPolicy string `json:\"DeletionPolicy\" yaml:\"DeletionPolicy\"`",
"TemplateResource.DependsOn []string `json:\"-\" yaml:\"-\"`",
"TemplateResource.Properties map[string]any `json:\"Properties\" yaml:\"Properties\"`",
"TemplateResource.Type string `json:\"Type\" yaml:\"Type\"`",
"TemplateResource.UpdateReplacePolicy string `json:\"UpdateReplacePolicy\" yaml:\"UpdateReplacePolicy\"`",
"TemplateResource.{UnmarshalJSON}",
"TypeRegistrationRecord.Status string",
"TypeRegistrationRecord.Token string",
"TypeRegistrationRecord.TypeArn string",
Expand All @@ -7490,6 +7523,7 @@
"backendSnapshot.AccountID string `json:\"accountID\"`",
"backendSnapshot.ChangeSets map[string]map[string]*ChangeSet `json:\"changeSets\"`",
"backendSnapshot.Events map[string][]StackEvent `json:\"events\"`",
"backendSnapshot.FailedRollbacks map[string]*pendingStackOp `json:\"failedRollbacks,omitempty\"`",
"backendSnapshot.HandlerProgress map[string]string `json:\"handlerProgress\"`",
"backendSnapshot.PendingStackOps map[string]*pendingStackOp `json:\"pendingStackOps,omitempty\"`",
"backendSnapshot.Region string `json:\"region\"`",
Expand All @@ -7508,15 +7542,35 @@
"pendingStackOp.Announced []string `json:\"announced,omitempty\"`",
"pendingStackOp.Created []string `json:\"created,omitempty\"`",
"pendingStackOp.DisableValidation bool `json:\"disableValidation,omitempty\"`",
"pendingStackOp.Done []string `json:\"done,omitempty\"`",
"pendingStackOp.FailedReasons map[string]string `json:\"failedReasons,omitempty\"`",
"pendingStackOp.ForceDelete bool `json:\"forceDelete,omitempty\"`",
"pendingStackOp.InFlight map[string]string `json:\"inFlight,omitempty\"`",
"pendingStackOp.Kind string `json:\"kind\"`",
"pendingStackOp.OldParams []Parameter `json:\"oldParams,omitempty\"`",
"pendingStackOp.OldTemplateBody string `json:\"oldTemplateBody,omitempty\"`",
"pendingStackOp.OnFailure string `json:\"onFailure,omitempty\"`",
"pendingStackOp.Phase string `json:\"phase,omitempty\"`",
"pendingStackOp.PhysicalIDs map[string]string `json:\"physicalIds,omitempty\"`",
"pendingStackOp.PrevResources map[string]*StackResource `json:\"prevResources,omitempty\"`",
"pendingStackOp.Remaining []string `json:\"remaining,omitempty\"`",
"pendingStackOp.Replaced []replacedRecord `json:\"replaced,omitempty\"`",
"pendingStackOp.ResourceTypes []string `json:\"resourceTypes,omitempty\"`",
"pendingStackOp.RetainExceptOnCreate bool `json:\"retainExceptOnCreate,omitempty\"`",
"pendingStackOp.RetainResources []string `json:\"retainResources,omitempty\"`"
"pendingStackOp.RetainResources []string `json:\"retainResources,omitempty\"`",
"pendingStackOp.SettleLater bool `json:\"settleLater,omitempty\"`",
"pendingStackOp.TemplateBody string `json:\"templateBody,omitempty\"`",
"pendingStackOp.Updated []string `json:\"updated,omitempty\"`",
"pendingStackOp.rt *walkRuntime",
"replacedRecord.Old StackResource `json:\"old\"`",
"replacedRecord.Policy string `json:\"policy,omitempty\"`",
"updateContext.oldParams map[string]string",
"updateContext.oldPhys map[string]string",
"updateContext.oldTmpl *Template",
"updateContext.retainExceptOnCreate bool",
"walkRuntime.params map[string]string",
"walkRuntime.tmpl *Template",
"walkRuntime.uc *updateContext"
],
"version": 1
},
Expand Down
25 changes: 24 additions & 1 deletion services/cloudformation/PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ structural_gaps:
- "ListResourceScanRelatedResources always returns an empty list: no cross-resource relationship graph is computed for a scan, so MaxResults/Resources have nothing to page or seed from."
items_still_open:
- "Resource-type strictness is by service namespace only: an AWS::Svc::Res whose Svc is unknown to the spec fixture and the provisioner fails with \"Template format error: Unrecognized resource types: [X]\" (cfn_resource_services.json, generated by cmd/cfnattrgen), but an unmodelled resource of a known service still falls through to the stub path because the committed spec fixture lists types with attributes only. Property schemas are checked only at the primitive level (nested property types are not walked) and the resource spec marks required keys per legacy spec, so registry-only conditional requirements are not modeled; Rules AWS-specific parameter types resolve only for AWS::EC2::VPC/Subnet/SecurityGroup::Id (Fn::RefAll/ValueOf/ValueOfAll attributes per the Rule functions page: DefaultNetworkAcl, DefaultSecurityGroup, AvailabilityZone, VpcId, Tags.<key>); other AWS-specific types yield empty lists. The Parameter-constraint, Rules-assertion and Unrecognized-parameter-type wordings are best-effort recollections of CloudFormation text, not SDK-verifiable."
- "Async stack provisioning (default 300ms per step; --cloudformation-provisioning-delay / GOPHERSTACK_CFN_PROVISIONING_DELAY, 0 = instant; a bare NewInMemoryBackend stays synchronous) models whole-stack transitions, not per-resource timing: inside a step every resource is created (or deleted) at once, so only the first wave of CREATE/UPDATE/DELETE_IN_PROGRESS events is visible during the window, replaced resources are cleaned up in the first UPDATE step rather than during UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, nested stacks are provisioned eagerly and merely settle on later steps, and StackSet instance child stacks are provisioned inside the unit (their StackInstanceStatus window is per batch). Update rollback does not model UPDATE_ROLLBACK_FAILED retry through ContinueUpdateRollback, and the RetainResources/DeletionMode validation wording is a best-effort recollection."
- "Async provisioning of nested stacks and StackSet instances is not per resource: a nested AWS::CloudFormation::Stack is provisioned and deleted at once inside the parent's step and only settles on later steps (the parent resource fails with \"Embedded stack <id> was not successfully created\" from that eager run), and StackSet instance child stacks are provisioned inside the unit (their StackInstanceStatus window is per batch). ContinueUpdateRollback accepts the NestedStackName.ResourceLogicalID skip form only for an embedded stack of the target stack that is itself UPDATE_ROLLBACK_FAILED; nested-stack updates are not modelled, so no embedded stack can reach that state. The RetainResources/DeletionMode validation wording is a best-effort recollection."
- "Stack policy: Replacement Conditionally is treated as Update:Replace (deliberate, not an AWS-documented rule), and AWS's separate logical-ID/resource-type default-deny note is not modeled; NotAction/NotResource follow plain inversion (gopherstack-cqy3)."
- "No nested-stack change-set or public-extension version machinery exists, so these stay unmodeled: CreateChangeSet IncludeNestedStacks (no nested-stack diff machinery) and the effect of ActivateType MajorVersion/VersionBump (validated for range, enum and exclusivity, but there is no public extension version catalog to select or bump a version in) (gopherstack-xhu2t)."
- "SAM transform (AWS::Serverless-2016-10-31) still unexpanded: AWS::Serverless::CapacityProvider, NetworkConnector, MicrovmImage and WebFunction (their AWS::Lambda::* target types are not modelled by the stack engine); Application with a Serverless Application Repository Location (ApplicationId + SemanticVersion; use CreateCloudFormationTemplate and a URL Location); the translator's opt-in passthrough_metadata mode; HttpApi events that target an AWS::Serverless::Api; a user resource named ServerlessRestApi being replaced by the implicit API. Expanded but not provisioned by the stack engine: AWS::ApiGateway::DomainNameV2, BasePathMappingV2 and DomainNameAccessAssociation (PRIVATE REST custom domains) and AWS::AppSync::ApiCache and DomainNameApiAssociation (GraphQLApi Cache and DomainName) fail the stack as unsupported resource types. Unsupported SAM resources fail the stack/change set with an explicit reason, never silently dropped."
Expand Down Expand Up @@ -2720,3 +2720,26 @@ StateMachine now matches the translator fixtures: DefinitionString as a Fn::Join
## 2026-11-13 extension and rollback options

UpdateStack RetainExceptOnCreate (api_op_UpdateStack.go: newly created resources are deleted on rollback, including DeletionPolicy Retain ones, only when true) now governs update rollback; by default a newly created Retain/Snapshot resource survives UPDATE_ROLLBACK. RollbackStack RoleARN is validated and recorded on the stack. ActivateType TypeNameAlias registers the extension under the alias (DescribeType reports OriginalTypeName and OriginalTypeArn), alias reuse answers CFNRegistryException; MajorVersion 1-100000, VersionBump MAJOR|MINOR and their exclusivity are validated (API_ActivateType.html). RegisteredType gains OriginalTypeName and OriginalTypeArn.

## 2026-11-21: per-resource async provisioning and ContinueUpdateRollback

With a provisioning delay (or scheduler) every stack operation advances one dependency wave per step (`stack_walk.go`, `stack_create_walk.go`, `stack_update_walk.go`, `stack_update_rollback.go`); resources with no dependency between them share a wave. Each step finishes the wave announced by the previous one (`*_IN_PROGRESS` event with a physical id once created, then the `_COMPLETE`/`_FAILED` event) and announces the next, so DescribeStackResources, DescribeStackResource, ListStackResources and DescribeStackEvents show per-resource state while the stack is still in progress; announced resources appear with their in-progress status and no physical id (create) or the status overlaid on the live record (update, delete). The first wave is announced when CreateStack/UpdateStack/DeleteStack returns. A bare backend without a delay runs the same waves inline, so synchronous event order equals the async order (`TestAsyncWalk_SyncEventOrderMatchesAsync`).

- Create: a failed resource emits `CREATE_FAILED`, the stack enters `ROLLBACK_IN_PROGRESS` and only the resources already created are deleted, newest dependents first, one wave per step; DisableRollback, OnFailure DO_NOTHING/DELETE/ROLLBACK and RetainExceptOnCreate keep their previous semantics.
- Update: changed and added resources go in dependency waves (unchanged ones take no step). `UPDATE_COMPLETE_CLEANUP_IN_PROGRESS` now covers the deletion of replaced physical resources (UpdateReplacePolicy honoured) and then of resources dropped from the template, one wave per step; outputs and exports are resolved after cleanup. A failed update rolls back newly created and replaced resources (deleted) and modified resources (reverted through the same in-place updater/extensibility update with the previous properties), and the stack template and parameters are restored. CancelUpdateStack takes effect between waves: announced-but-unstarted resources get `CREATE_FAILED`/`UPDATE_FAILED` "Resource creation/update cancelled" and the applied ones roll back.
- A failed wave cancels the members that had not started: they get `CREATE_FAILED`/`UPDATE_FAILED` "Resource creation/update cancelled" and are never created; siblings that completed earlier in the wave are rolled back with the rest.
- DeleteStack during an update (or its rollback / UPDATE_ROLLBACK_FAILED) also deletes the old physical resources of replacements that were not yet cleaned up or rolled back to; a failure there leaves the stack DELETE_FAILED, and a retry cannot retry that old resource.
- Delete: reverse dependency waves; Retain gives `DELETE_SKIPPED`, failures leave `DELETE_FAILED` resources and stack for a retry.
- UPDATE_ROLLBACK_FAILED: a resource that cannot be rolled back (restore or delete) ends `UPDATE_FAILED` with an `UPDATE_FAILED` event; the stack ends `UPDATE_ROLLBACK_FAILED` after the remaining resources were attempted. The rollback is kept in the additive `failedRollbacks` snapshot field.
- ContinueUpdateRollback is valid only from `UPDATE_ROLLBACK_FAILED` (otherwise a ValidationError `Stack:<id> is in <STATUS> state and can not be continue rolled back.`); ResourcesToSkip (only resources that failed to roll back; `NestedStackName.ResourceLogicalID` handled for embedded stacks, see items_still_open) and ForceRollback (all failed resources, mutually exclusive with ResourcesToSkip) mark resources `UPDATE_COMPLETE`, the rest is retried through `UPDATE_ROLLBACK_IN_PROGRESS` -> `UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS` -> `UPDATE_ROLLBACK_COMPLETE` or back to `UPDATE_ROLLBACK_FAILED`. RoleARN is validated and recorded like RollbackStack; ClientRequestToken is accepted and ignored like the sibling operations.
- Persistence: in-flight operations carry `physicalIds`, `inFlight`, `done`, `remaining`, `created`, `updated`, `replaced`, `failedReasons` and `phase` (additive fields). Restoring a snapshot taken mid-flight with no scheduler settles the operation inline to its final status; with a scheduler it resumes step by step from the persisted state. An in-flight operation written before wave tracking (`announced` keys, no `remaining`/`templateBody`) is upgraded on resume: its delete/rollback work list is rebuilt from the stack's records (`TestWalk_RestoresSnapshotWrittenBeforeWaveTracking`).
- Lifecycle: `Reset` clears every stack and cancels scheduled steps, `Close`/`Shutdown` cancels them (stacks stay in their in-progress status); the handler implements Resettable and Shutdowner including regional siblings.

Tests: `stack_walk_test.go` (manual scheduler, `testing/synctest` for Close/Reset), `stack_transitions_test.go`.

## Emulator choices where the vendor is silent

- Event order inside a wave: every resource of a wave gets its in-progress event first, then each completes in logical-ID order; api_op_DescribeStackEvents.go and types.StackEvent only fix the fields and statuses, not the interleaving of parallel resources.
- Cancelled in-flight resources use the reasons "Resource creation cancelled" and "Resource update cancelled" (CloudFormation User Guide wording recalled from the console; not in the SDK).
- ContinueUpdateRollback: types/errors.go and api_op_ContinueUpdateRollback.go define no stack-state error, so the invalid-state error is a ValidationError with the text recalled from the service; the texts for skipping resources that did not fail a rollback ("... cannot be skipped ...") and for ForceRollback with ResourcesToSkip ("... mutually exclusive.") are emulator wording (the doc comment only says the combination returns a validation error). A skipped resource keeps its current record with status UPDATE_COMPLETE and the event reason "Resource update skipped by ContinueUpdateRollback".
- A resource whose delete fails during an update rollback is reported `UPDATE_FAILED` (not `DELETE_FAILED`), following the ContinueUpdateRollback doc comment that skippable resources are "in the UPDATE_FAILED state because a rollback failed".
Loading
Loading