Skip to content

technologies-rules

Variable Service Template

The variability of the following variable service template shall be resolved.

tosca_definitions_version: tosca_variability_1_0
topology_template:
  variability:
    options:
      mode: semantic-loose
      optimization_technologies: true
      optimization_technologies_unique: true
      technology_pruning: true
      technology_constraint: true
    technology_assignment_rules:
      terraform:
        - component: application
          host: terraform_host
        - component: application
          host: ansible_terraform_host
        - component: another
          host: another_terraform_host
      ansible:
        - component: application
          host: ansible_host
        - component: application
          host: ansible_terraform_host
      helm:
        - component: application
          host: helm_host
  node_templates:
    application:
      type: application
      persistent: true
      requirements:
        - host:
            node: ansible_host
            conditions: false
        - host:
            node: terraform_host
            conditions: false
        - host:
            node: ansible_terraform_host
        - database:
            node: database
    ansible_host:
      type: ansible_host
    terraform_host:
      type: terraform_host
    ansible_terraform_host:
      type: ansible_terraform_host
    database:
      type: database
      technology: terraform
      requirements:
        - host:
            node: dbms
    dbms:
      type: dbms
      technology: terraform

Variability-Resolved Service Template

The following variability-resolved service template is expected.

tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
  node_templates:
    application:
      type: application.terraform.ansible_terraform_host
      requirements:
        - host: ansible_terraform_host
        - database: database
    ansible_terraform_host:
      type: ansible_terraform_host
    database:
      type: database.terraform.dbms
      requirements:
        - host: dbms
    dbms:
      type: dbms.terraform.dbms

Last update: April 28, 2024