Configuration Bootstrap

Overview

The Socotra Insurance Suite configurations generally contain settings and definitions for various components, such as account and policy structures, data extensions, and other behaviors and structures that are defined within the platform.

While resources such as data tables and documents are defined in the main configuration, the management of those resources—including deploying actual resource instances and creating resource groups—occurs at the tenant level, after deployment is complete.

To facilitate a more streamlined tenant creation experience, configuration bootstrap — an optional component of the config structure — allows for the inclusion of both resource instance files and resource group definitions within a tenant configuration, as well as their automatic deployment as part of the tenant creation process.

Notes

Bootstrap Directory

To support this streamlined deployment approach, the bootstrap directory enables the inclusion of necessary resource files and metadata. The directory structure within the configuration is as follows:

└── bootstrap
    └── resources
        ├── config.json
        └── resourceFiles
            ├── tables               // only .csv files
            ├── constraintTables     // only .csv files
            ├── documentTemplates    // only .liquid or .velocity files
            ├── staticDocuments      // only .pdf or .html files
            └── secrets
                └── config.json

The config.json file defines the resource instances and groups used for deployment.

Validations

The Bootstrap process is triggered only if the following conditions are met:

  • The bootstrap directory is present in the config.

  • There is at least one valid combination of a ResourceInstanceRef defined in the resources/config.json file and a corresponding file in the resourceFiles directory.

    • i.e. There must be a file in one of the resource specific directories within the resourceFiles folder that matches the name of one of the entires in the resourceInstances.

  • The file type (and its directory within resourceFiles) aligns with the type defined by the main ConfigurationRef resource declaration, matched by the staticName.

  • All names specified in the ResourceInstanceRef must be unique.

  • All names specified in the ResourceGroupRef must be unique.

  • Any staticName specified in the ResourceInstanceRef must correspond to a valid resource declaration in the main ConfigurationRef.

  • All names in the ResourceGroupRef must have been declared in the ResourceInstanceRef.

Example

Below is an example structure for the bootstrap directory:

└── bootstrap
    └── resources
        ├── config.json
        └── resourceFiles
            ├── tables
            │   ├── VehicleDamageRates01.csv
            │   └── VehicleRegistrationStateRates01.csv
            └── documentTemplates
                └── Declarations01.velocity

Contents of the config.json file:

{
    "resourceInstances": {
        "VehicleDamageRates01": {
            "staticName": "VehicleDamage"
        },
        "VehicleRegistrationStateRates01": {
            "staticName": "VehicleRegistrationState"
        },
        "Declarations01": {
            "staticName": "Declarations"
        }
    },
    "resourceGroups": {
        "initialGroup": {
            "selectionStartTime": "1970-01-01T00:00:00-05:00",
            "resourceNames": [
                "VehicleDamageRates01",
                "VehicleRegistrationStateRates01",
                "Declarations01"
            ]
        }
    }
}