security

Reconcile cloud inventory with deployment records

Join live cloud resources with the deployment records that created them. Identify unmanaged items and verify that stale records are safe to close.

TrustIvan · · 10 min read

A deployment record says the old billing queue was replaced at 08:15. The cloud inventory still lists a queue with the old display name. The application environment contains a new queue plus one created by a service operator to isolate test messages. Neither discrepancy can be resolved by comparing names. The evidence has to establish which resource each record refers to, whether the provider observed it, and which system is responsible for the next decision.

Use deployment records to establish intended ownership and change history. Use cloud observations to determine what exists within a confirmed inventory scope. Join on provider-issued identity and time bounds. Preserve missing observations until their cause is verified. A deployment record can be stale, and an inventory can be incomplete while both systems are working as configured.

Choose a comparison window you can reproduce

Write down the accounts and projects, regions or global scopes, resource types and environment labels you are reconciling. Set a snapshot time and a permitted collection delay for each source. Note when collectors fetched data, whether an underlying export carries metadata observation time, and whether the records were generated at the same point in the change lifecycle.

Choose an authoritative provider-side source for immediate confirmation when required. A cached inventory can be ideal for search and periodic analysis and still lag behind a newly applied change. Google Cloud, for example, distinguishes its metadata inventory from live queries to resource service APIs. AWS Config can show history for configured recorders and supported resource types. Test the actual provider and collection settings within the approved account rather than attributing the same behavior to all platforms. Google Cloud Asset Inventory overview, AWS Config overview.

Preserve unknown scope explicitly. If the collector cannot read a resource type in one project, record that projection as unavailable. The source can continue to reconcile other projects. Doing so should not cause the overall result to claim all resources in the unreadable project were removed. Record the collection error and owner, then repeat against approved permissions.

Normalize the expected and observed identities

Capture the provider resource ID required to identify each object in its associated scope. Record account or project, region, service and current class where relevant. Keep the fully qualified name and a normal form only if the mapping is documented. Some identifiers carry an account or project already, while others only make sense with those fields alongside them. Preserve the original value so a reviewer can validate the normalization.

On the deployment side, capture the environment or stack, infrastructure revision, last confirmed apply, owner and managed mapping. Terraform state associates configuration addresses with real remote objects. A resource's module address and a cloud-side ID can tell you different things. Do not mistake configuration text, planned values or an address reused in another workspace for an applied provider identity. If the state is sensitive, request an approved projection of identifiers and timestamps. Avoid exporting credential or secret values. Terraform state purpose.

Capture enough event history to recognize replacement. A new bucket or queue can have the same display name as a deleted resource while using a different provider ID. A region migration can also leave old and new active temporarily. Both outcomes matter to security coverage. If no stable identity survives across an organizational move, preserve the authorized old-to-new relation and its evidence as a separate row. The cloud account transfer guide describes related ownership checks.

Look at both directions of the comparison

Join the expected records to observed resources, then inspect unmatched rows from both sides. A live resource with no deployment mapping may be manually provisioned, service-managed, recently created or deliberately managed through another system. A deployment record with no visible resource can reflect a planned apply, confirmed retirement, replacement, stale state, unsupported type or missing collection permissions. Give each unmatched row a classification and a reason. The absence of a join is an observation, and the cause comes from verification.

For matched rows, compare the active provider identity and latest expected lifecycle event. A successful identity match does not prove all configured properties match. If drift is part of the review, define the relevant fields and the source that decides expected and realized values. Use the latest observed deployment state and do not infer a successful update from a plan. Track configuration comparison independently where it has a different owner.

A deployment can manage several provider resources along with service-managed child objects. Decide whether these children require their own inventory records, expected exceptions or a verified relation to the managed parent. Maintain that mapping for analysts who receive raw inventory data. Avoid reporting every child as unmanaged if the source can show intentionally provider-managed ownership.

Reconcile six synthetic observations

In a test account, record a working schedule and deliberately select six different observations from a test environment. The deploy pipeline has two real applied changes and one recorded teardown. The provider inventory includes a known observation delay. A hosted service also creates one child resource automatically.

Candidate scopeDeployment evidenceProvider evidenceVerification decision
Queue Q19Successful apply in billing stage at 08:15Matching ID at the approved provider endpointVerified present and managed
Queue Q12Recorded teardown at 08:16Inventory export still lists it from 08:12Check live provider state and let the next snapshot resolve lag
Queue Q21No entry in the stackService operator confirms an approved isolated test resourceRecord authorized separate ownership and cleanup date
Bucket B61Applied storage workspace claims the ID existsSnapshot lacks read access to the projectCollection unavailable, ownership preserved
Function F08Plan lists it; application has not completedNo resource is visiblePending deploy, no confirmed resource state
Child interface N17No standalone change recordProvider confirms relation to managed parent S17Service-managed child within confirmed scope

Add a case where display names match even though account and region differ. Ask the reviewer to reject the candidate join using the retained original identity. Then replace Q19 with Q22 under a controlled deployment where the display name stays the same. The expected record contains a new matched row and a separate documented retirement or pending verification for the old identity. Preserve both change timestamps.

Give another operator the same snapshot and the mapping without your status decisions. Ask them to classify each candidate and capture what was still unknown at the time. For B61, repair the authorized collection path and run the same lookup. Confirm the returned result belongs to the intended account, resource type and observed interval. A successful query under a different scope cannot close the original coverage gap.

Confirm stale deployment records before closing them

Compare the deployment log, provider events and relevant live view using approved tools. Distinguish an explicit delete that completed from a scheduled destroy or a replacement still serving traffic. If the provider or inventory exposes soft-deleted resources, record the lifecycle stage and which reviews still apply. Check how the associated storage, network and identity objects are handled. A retired parent can leave assigned child resources behind even when the main change is complete.

Track which output a system claims to have removed. A Terraform resource can leave the managed mapping while the remote object remains depending on the operation and workflow. A change request marked completed should link to appropriate verification, not only the updated state reference. Align with the team that owns the approved process and avoid making direct state or cloud changes as part of the audit. The review needs evidence about what happened, with remediation carried out separately by authorized owners.

Decide whether a temporary object is within intended scope. A manually approved item might be scheduled for cleanup, while an unmanaged active resource needs a provisioner or service owner. Assign the current owner and a deadline or evidence request. If the technical state is unknown, give the resolution to someone who can query the accepted source. Avoid closing open issues based on assumptions about a matching name in another account.

See what changes when inventory coverage expands

After collecting the baseline, enable the known test connector for a previously excluded sandbox within the approved fixture. Reconcile using the original scope and the expanded scope separately. The additional inventory can increase the number of unmatched or newly detected records even if nothing was deployed during the week. Preserve the intake date, coverage difference and source evidence. Give any newly included resources their own owner review instead of counting all of them as newly created.

When old deployment rows are retired, keep their prior ownership history. A cloud audit can need to show which stack controlled an object at a particular time. Record when the relationship became historical and verify the far side if the resource was moved into a new account or workspace. On dashboards, distinguish verified retirement from missing collection and from confirmed replacement. Each can remove a row from a current managed view for a different reason.

Check that each input is complete enough for the requested comparison

Inspect collection metadata before trusting a large export. A connector can read one page of results and fail on the next, or return only regions where its credentials have access. Retain pagination status, API errors and any documented service filters. In a safe test, use a fixture that deliberately omits half the provider results and compare the outer join to the complete snapshot. The reconciliation should show where collection was incomplete instead of marking all unseen managed resources as retired. Keep each check tied to the original query window.

Repeat the review after the expected settling interval and identify changes made between runs. An object created and deleted during that interval may exist in event history while appearing in neither active snapshot. Decide whether your control also needs to account for short-lived resources and identify the appropriate event source. The active inventory and historical deployment views each have a useful purpose. Choose which one supports the precise question being reviewed.

Test commercial coverage with the same expected inventory

Give each reviewer the same expected deployments and provider-scope inventory, including the delayed export, denied collection case and separately managed child. Ask how the tool identifies the source, records permissions and refreshes after a deployment. Check which records can be exported as evidence and which require triangulation with another system. Try one intentionally unsupported resource type and note whether the result is observable as a gap.

Use the Orca Security comparison for related cloud inventory criteria. The guide to distinguishing unknown ownership and missing scans covers another distinction that can change remediation assignments. Separate observations about inventory breadth, scan coverage and deployment ownership so a purchase decision can identify where extra integration work remains.

The finished record should show which expected resources were observed, which separate active objects need an owner, which former records are retired and what can only be resolved after collection recovers. Preserve the run's time bounds, scope and expected change history so a second person can repeat it.