# US 12,001,837 B2 · Two-way synchronization of infrastructure-as-code templates and instances

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,001,837 B2
- Document ID: US12001837B2
- Status: Granted
- Kind: B2
- Application number: 17/698,131
- Filed: 2022-03-18
- Published: 2023-09-21
- Granted: 2024-06-04
- Earliest claimed: 2022-03-18
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Joseph Paul Wigglesworth; Miguel Angel Jimenez Achinte; Gabriel Tamura; Hans Albert Muller; Ian Fraser Watts; Hugh Edward Hockett
- Web page: https://patentgrep.com/patent/US12001837B2

## CPC

- G06F 8/70: Software maintenance or management
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 8/35: model driven
- G06F 8/355: {Round-trip engineering}
- G06F 8/36: Software reuse
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed are techniques for two-way synchronization of infrastructure-as-code templates and instances, including a method comprising detecting changes to a run-time state of a system and, in response to detecting a change, triggering an update of a current run-time state model. The method may further comprise, in response to updating the run-time state model, comparing the updated model to a current model using a template in a local repository instantiated as the current model. The method may further comprise, in response to the comparison determining a structural difference between the updated model and the current model, merging the updated model and the current model into a new model; and updating a local clone of a repository of the template with the new model. The method may further comprise, in response to the comparison determining no structural difference between the updated model and the current model, pushing changes to a remote repository.

## Claims

### Claim 1

A computer-implemented method for two-way synchronization of infrastructure-as-code (IaC) templates, comprising:
instantiating a current local run-time state model in a local repository using a template of a current global model;
detecting, by a run-time monitor of a local computing system, a change event to a run-time state of the local computing system;
in response to detecting the change event, triggering an update of the current local run-time state model, including transforming the change event into a form suitable for the local run-time state model;
in response to updating the local run-time state model, comparing the updated local model to the current global model;
in response to the comparison determining a structural difference between the updated local model and the current global model:
merging the updated local model and the current global model into a new model;
converting the new model into a textual representation conforming to a notation model;
mapping concepts of the converted model and the notation model to create a result file; and
updating a local clone of the template of the current global model using the result file;
in response to the comparison determining no structural difference between the updated local model and the current global model, pushing changes to the global model to a remote repository.

### Claim 2 (depends on 1)

The method of claim 1, wherein the run-time monitoring is performed during run-time state synchronization (RTSS) phase.

### Claim 3 (depends on 1)

The method of claim 1, wherein the change event comprises information to identify a resource and a type of modification.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
in response to a determination the change event did not provide sufficient information to perform the update, receiving additional information resulting from a request to an underlying cloud; and
mapping the information and the additional information to one or more transformation actions.

### Claim 5 (depends on 1)

The method of claim 1, further comprising in response to a determination of no structural difference between models:
converting the updated local model into a set of input parameters containing current values; and
performing an operation using the current values of a local template instance and creating a new version in a template management software.

### Claim 6 (depends on 1)

The method of claim 1, wherein the update of the current local run-time state model comprises mapping the change event to one or more transformation actions from a catalog of supported transformations associated with model-at-runtime (MART) instance updates.

### Claim 7

A system for two-way synchronization of infrastructure-as-code (IaC) templates, the system comprising:
one or more processors; and
a memory communicatively coupled to the one or more processors;
wherein the memory comprises instructions which, when executed by the one or more processors, cause the one or more processors to perform a method comprising:
instantiating a current local run-time state model in a local repository using a template of a current global model;
detecting, by a run-time monitor of a local computing system, a change event to a run-time state of the local computing system;
in response to detecting the change event, triggering an update of the current local run-time state model, including transforming the change event into a form suitable for the local run-time state model;
in response to updating the local run-time state model, comparing the updated local model to the current global model;
in response to the comparison determining a structural difference between the updated local model and the current global model:
merging the updated local model and the current global model into a new model;
converting the new model into a textual representation conforming to a notation model;
mapping concepts of the converted model and the notation model to create a result file; and
updating a local clone of the template of the current global model using the result file;
in response to the comparison determining no structural difference between the updated local model and the current global model, pushing changes to the global model to a remote repository.

### Claim 8 (depends on 7)

The system of claim 7, wherein the run-time monitoring is performed during run-time state synchronization (RTSS) phase.

### Claim 9 (depends on 7)

The system of claim 7, wherein the change event comprises information to identify a resource and a type of modification.

### Claim 10 (depends on 7)

The system of claim 7, wherein the method further comprises:
in response to a determination the event did not provide sufficient information to perform the update, receiving additional information resulting from a request to an underlying cloud; and
mapping the information and the additional information to one or more transformation actions.

### Claim 11 (depends on 7)

The system of claim 7, wherein the method further comprises in response to a determination of no structural difference between models:
converting the updated local model into a set of input parameters containing current values; and
performing an operation using the current values of a local template instance and creating a new version in a template management software.

### Claim 12 (depends on 7)

The system of claim 7, wherein the update of the current local run-time state model comprises mapping the change event to one or more transformation actions from a catalog of supported transformations associated with model-at-runtime (MART) instance updates.

### Claim 13

A computer program product for two-way synchronization of infrastructure-as-code (IaC) templates, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computer to perform a method comprising:
instantiating a current local run-time state model in a local repository using a template of a current global model;
detecting, by a run-time monitor of a local computing system, a change event to a run-time state of the local computing system;
in response to detecting the change event, triggering an update of the current local run-time state model, including transforming the change event into a form suitable for the local run-time state model;
in response to updating the local run-time state model, comparing the updated local model to the current global model;
in response to the comparison determining a structural difference between the updated local model and the current global model:
merging the updated local model and the current global model into a new model;
converting the new model into a textual representation conforming to a notation model;
mapping concepts of the converted model and the notation model to create a result file; and
updating a local clone of the template of the current global model using the result file;
in response to the comparison determining no structural difference between the updated local model and the current global model, pushing changes to the global model to a remote repository.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the run-time monitoring is performed during run-time state synchronization (RTSS) phase.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the method further comprises:
in response to a determination the change event did not provide sufficient information to perform the update, receiving additional information resulting from a request to an underlying cloud; and
mapping the information and the additional information to one or more transformation actions.

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein the method further comprises in response to a determination of no structural difference between models:
converting the updated local model into a set of input parameters containing current values; and
performing an operation using the current values of a local template instance and creating a new version in a template management software.

### Claim 17 (depends on 13)

The computer program product of claim 13, wherein the update of the current local run-time state model comprises mapping the change event to one or more transformation actions from a catalog of supported transformations associated with model-at-runtime (MART) instance updates.
