Skip to main content

Resource types

Deployable resources

System and component instances are deployable resources: they become part of a project descriptor that can be provisioned on the target infrastructure, published on marketplaces and data catalogs, and tested by the Computational Governance Platform.

The kind property in the descriptor of a system or component represents its resource type and reflects the value of the spec.resourceTypeId property of its type (system type or component type). More on this in the descriptor section.

warning

Deployable resources and resource instances are distinct concepts. Deployable resources refer to system and component instances that make up a project. In contrast, resource instances are Witboost entities with kind Resource, used to track external systems that are not managed within Witboost.

Computational Governance Platform

As reported in the Computational Governance Platform (CGP) documentation, policies and metrics are bound to a specific resource type. The evaluation of a descriptor (a resource) on CGP always requires the information on the resource type, used to select the related set of governance entities.

There are different ways to manually register a new resource type on CGP, however the Practice Shaper, if properly configured (i.e., configuration practiceShaper.resourceTypesProcessor.enabled is true), will automatically take care of this.

Automatic resource type registration

When a system type is created or updated, the Practice Shaper registers (or updates) its related resource type on CGP by sending an HTTP request to the /v1/computational-governance/resource-types CGP endpoint (refer to the API reference section of the documentation).

The system type properties used to register its resource type are:

  • spec.resourceTypeId - unique resource type identifier
  • spec.resourceTypeConfig - optional resource type configuration. If not provided, the default settings under configuration practiceShaper.resourceTypesProcessor.resourceTypeConfiguration will be used instead

Properties of spec.resourceTypeConfig:

PropertyTypeRequiredDescriptionExample
displayNamestringNoResource type display name.

If not provided, it will default to the display name of the system type; if this is also not provided, spec.resourceTypeId will be used
Data Product
descriptorConfigurationobjectNoInformation about the shape of descriptors of this resource type.

If not provided, the default configuration under practiceShaper.resourceTypesProcessor.resourceTypeConfiguration.descriptorConfiguration will be used instead.

More about the structure of this object in the Practice Shaper configuration section
resolverConfigurationobjectNoDetails about the perimeter resolver of this resource type.

If not provided, the default configuration under practiceShaper.resourceTypesProcessor.resourceTypeConfiguration.resolverConfiguration will be used instead.

More about the structure of this object in the Practice Shaper configuration section
cuePreprocessScriptstringNoPreprocessing script in CUE language to modify the resource descriptor before it gets evaluatedScript { env: _data.environment } generates a descriptor by extracting only the environment field from the original one