Estendi pagine console mediante documenti schema

Rivedere i requisiti, i tipi supportati e gli esempi per i documenti di schema utilizzati con le configurazioni Terraform in Resource Manager.

I documenti di schema sono consigliati per le configurazioni Terraform quando si utilizza Resource Manager. L'inclusione di un documento di schema consente di estendere le pagine nella console di Oracle Cloud Infrastructure. Facilita l'inserimento delle variabili nella pagina Crea stack visualizzando i controlli delle chiavi SSH e denominando, raggruppando, prepopolando dinamicamente i valori e altro ancora. Definire il testo nella scheda Informazioni applicazione della pagina Dettagli stack visualizzata per uno stack creato.

Requisiti per i documenti schema

I documenti di schema per Resource Manager hanno i seguenti requisiti:

  • Formato YAML.

  • I tipi di dati devono essere coerenti con la configurazione Terraform associata.

    Si supponga, ad esempio, di dichiarare il tipo number per la variabile availability nello schema. In questa situazione, availability deve avere lo stesso tipo dichiarato (number) nella configurazione Terraform associata. Per impostazione predefinita, le variabili senza tipo dichiarato utilizzano string.

  • Posizionamento nella cartella radice della configurazione Terraform di Resource Manager. Per impostazione predefinita, il documento dello schema presuppone che la cartella radice sia la directory di lavoro.

Tipi supportati (prepopolazione dinamica e controlli)

In questa sezione sono elencati i tipi supportati da Resource Manager per la precompilazione dinamica e i controlli.

La maggior parte dei tipi richiede l'OCID del compartimento (dependsOn: required: compartmentId). Alcuni tipi includono articoli obbligatori o facoltativi aggiuntivi. Per determinare gli elementi obbligatori e facoltativi per un tipo, vedere Schema metadati per la convalida.

È possibile filtrare gli elenchi prepopolati in modo dinamico in base ad altre variabili utilizzando dependsOn. Ad esempio, filtra le subnet in base alla VCN. Per ulteriori informazioni, vedere Popolamento dinamico.

Nota

Le descrizioni nei file schema.yaml sono codificate in HTML nell'output.

Quando vengono definite nella configurazione Terraform, le seguenti variabili vengono prepopolate automaticamente con i valori nelle pagine della console utilizzate per creare e modificare lo stack. I valori dello stack vengono utilizzati quando si selezionano le azioni Terraform Piano, Applica e Elimina.

  • tenancy_ocid (OCID tenancy)
  • compartment_ocid (OCID compartimento)
  • region (regione)
  • current_user_ocid (OCID dell'utente corrente)
Tipo (visualizzato come campo a discesa precompilato dinamicamente, se non diversamente specificato) Identificativo risorsa commenti
file -- Supera un controllo per l'aggiunta di un singolo file eliminando o sfogliando. Quando viene visualizzato questo controllo, un utente può caricare un file di qualsiasi estensione, ad esempio un codice di licenza o un certificato. Per ulteriori informazioni, vedere Controllo file.
oci:apm:domain:id OCID dominio APM (Application Performance Monitoring)
oci:blockstorage:policies:id Criterio di backup del volume
oci:container:cluster:id OCID cluster Kubernetes
oci:core:image:id OCID immagine
oci:core:instanceshape:name Nome forma dell'istanza
oci:core:natgateway:id OCID gateway NAT
oci:core:nsg:id OCID gruppo di sicurezza di rete
oci:core:servicegateway:id OCID gateway del servizio
oci:core:ssh:publickey -- Supera un controllo per l'aggiunta di una o più chiavi SSH pubbliche eliminando i file o incollando i valori delle chiavi. Per ulteriori informazioni, vedere Controllo chiave SSH.
oci:core:subnet:id OCID subnet
oci:core:vcn:id OCID VCN
oci:database:autonomouscontainerdatabase:id OCID Autonomous Container Database
oci:database:autonomousdatabase:id OCID Autonomous Database
oci:database:autonomousdatabaseversion:id Versione di Autonomous Database
oci:database:database:id OCID del database per un database di servizio Base Database o un database Exadata Database Service on Dedicated Infrastructure.
oci:database:dbhome:id OCID home DB (si applica al database di base e a Exadata Database Service on Dedicated Infrastructure)
oci:database:dbsystem:id OCID sistema DB (si applica al database di base)
oci:identity:availabilitydomain:name Nome dominio di disponibilità
oci:identity:compartment:id OCID compartimento
oci:identity:domains:id OCID dominio di Identity

Specificare l'OCID della tenancy come compartmentId. Vedere ListDomains.

oci:identity:dynamicgroups:id OCID gruppo dinamico

Specificare l'OCID della tenancy come compartmentId. Vedere ListDynamicGroups.

oci:identity:faultdomain:name Nome dominio di errore
oci:identity:groups:id OCID gruppo

Specificare l'OCID della tenancy come compartmentId. Vedere ListGroups.

oci:identity:region:name Nome area
oci:identity:tag:value Nome chiave tag dallo spazio di nomi tag; vedere TagSummary Supera un controllo per l'aggiunta di tag definite e in formato libero. Per ulteriori informazioni, vedere Controllo Applicazione tag.
oci:kms:key:id OCID chiave del vault; vedere ListKeys
oci:kms:secret:id OCID segreto dei vault; vedere ListSecrets
oci:kms:vault:id OCID vault
oci:kubernetes:versions:id Vedere GetClusterOptions
oci:loadbalancer:loadbalancer:id OCID load balancer
oci:ods:project:id OCID progetto Data Science
oci:resourcemanager:privateendpoint:id OCID endpoint privato di Resource Manager Specificare un compartimento (compartmentId) e una VCN (vcnId) per elencare gli endpoint privati. Per un esempio, vedere Dichiarazione di esempio per gli endpoint privati in questa pagina.

Metaschema per convalida

Utilizzare il seguente file di meta schema per confermare che il documento di schema utilizza tipi di variabile supportati.

Schema meta
# Meta JSON Schema.
#
# This is used to validate the Schema file when the package is uploaded/loaded into Resource Manager.
# For marketplace, it is also used to validate the package when the package artifact is created in Partner Portal.
#
# NOTE: additionalProperties are set to true explicitly even though this is the default.  It must be set to true in
# cases where we use the allOf. This is a quirk of JSON Schema.  During validation, allOf means it has to match all of
# the individual definitions separately. It doesn't mean it has to match a Union of the individual definitions. This
# is a known issue with JSON Schema.
title: Schema
type: object
required:
  - variables
  - schemaVersion
additionalProperties: true
properties:
  title:
    type: string
  description:
    type: string
  stackDescription:
    type: string
  packageVersion:
    type: string
  version:
    type: string
  schemaVersion:
    type: string
    enum:
      - 1.0.0
      - 1.1.0
  locale:
    $ref: "#/definitions/locale"
  logoUrl:
    $ref: "#/definitions/url"
  source:
    $ref: "#/definitions/source"
  informationalText:
    type: string
  instructions:
    type: string
  troubleshooting:
    type: string
  allowViewState:
    type: boolean
  variables:
    $ref: "#/definitions/variables"
  # Deprecated - use variableGroups instead
  groupings:
    $ref: "#/definitions/variableGroups"
  variableGroups:
    $ref: "#/definitions/variableGroups"
  outputs:
    $ref: "#/definitions/outputs"
  outputGroups:
    $ref: "#/definitions/outputGroups"
  primaryOutputButton:
    type: string
    format: variablereference

definitions:
  source:
    type: object
    properties:
      type:
        enum:
          - marketplace
          - quickstart
          - web
      reference:
        type:
          - string
          - number
    additionalProperties: false

  variableGroups:
    type: array
    items:
      $ref: "#/definitions/variableGroup"

  variableGroup:
    type: object
    required:
      - title
      - variables
    properties:
      title:
        type: string
      variables:
        type: array
        items:
          type: string
          format: variablereference
      visible:
        $ref: "#/definitions/booleanStatement"
    additionalProperties: true

  locale:
    enum:
      - en
    default: en

  url:
    type: string
    pattern: ^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$

  ocid:
    type: string
    pattern: ^ocid1\.([a-z0-9_-]{1,32})\.([a-z0-9_-]{1,15})\.([a-z0-9]{0,24})\.([a-z0-9]{60})$

  variables:
    type: object
    additionalProperties:
      $ref: "#/definitions/variable"

  variable:
    oneOf:
      - $ref: "#/definitions/staticVariable"
      - $ref: "#/definitions/dynamicVariable"
      - $ref: "#/definitions/complexVariable"

  baseVariable:
    type: object
    properties:
      title:
        type: string
        minLength: 1
      description:
        type: string
      required:
        type: boolean
        default: false
      visible:
        $ref: "#/definitions/booleanStatement"

  booleanStatement:
    oneOf:
      - type: boolean
      - type: string
      - $ref: "#/definitions/equality"
      - $ref: "#/definitions/greaterThanOrEqual"
      - $ref: "#/definitions/lessThanOrEqual"
      - $ref: "#/definitions/greaterThan"
      - $ref: "#/definitions/lessThan"
      - $ref: "#/definitions/booleanOr"
      - $ref: "#/definitions/booleanAnd"
      - $ref: "#/definitions/booleanNot"

  equality:
    type: object
    properties:
      eq:
        type: array
        items:
          - type: [string, number]
          - type: [string, number]
        additionalItems: false
    additionalProperties: false

  greaterThanOrEqual:
    type: object
    properties:
      ge:
        type: array
        items:
          - type: [string, number]
          - type: [string, number]
        additionalItems: false
    additionalProperties: false

  lessThanOrEqual:
    type: object
    properties:
      le:
        type: array
        items:
          - type: [string, number]
          - type: [string, number]
        additionalItems: false
    additionalProperties: false

  greaterThan:
    type: object
    properties:
      gt:
        type: array
        items:
          - type: [string, number]
          - type: [string, number]
        additionalItems: false
    additionalProperties: false

  lessThan:
    type: object
    properties:
      lt:
        type: array
        items:
          - type: [string, number]
          - type: [string, number]
        additionalItems: false
    additionalProperties: false

  booleanOr:
    type: object
    properties:
      or:
        type: array
        items:
          - $ref: "#/definitions/booleanStatement"
          - $ref: "#/definitions/booleanStatement"
        additionalItems: false
    additionalProperties: false

  booleanAnd:
    type: object
    properties:
      and:
        type: array
        items:
          - $ref: "#/definitions/booleanStatement"
          - $ref: "#/definitions/booleanStatement"
        additionalItems: false
    additionalProperties: false

  booleanNot:
    type: object
    properties:
      not:
        type: array
        items:
          - $ref: "#/definitions/booleanStatement"
        additionalItems: false
    additionalProperties: false

  dependsOnCompartment:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - dependsOn
        properties:
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  staticVariable:
    oneOf:
      - $ref: "#/definitions/arrayVariable"
      - $ref: "#/definitions/booleanVariable"
      - $ref: "#/definitions/enumVariable"
      - $ref: "#/definitions/integerVariable"
      - $ref: "#/definitions/numberVariable"
      - $ref: "#/definitions/stringVariable"
      - $ref: "#/definitions/multilineVariable"
      - $ref: "#/definitions/fileVariable"

      - $ref: "#/definitions/passwordVariable"
      - $ref: "#/definitions/datetimeVariable"

  dynamicVariable:
    oneOf:
      - $ref: "#/definitions/imageVariable"
      - $ref: "#/definitions/identityDomainVariable"
      - $ref: "#/definitions/instanceShapeVariable"
      - $ref: "#/definitions/subnetVariable"
      - $ref: "#/definitions/vcnVariable"
      - $ref: "#/definitions/availabilityDomainVariable"
      - $ref: "#/definitions/compartmentVariable"
      - $ref: "#/definitions/faultDomainVariable"
      - $ref: "#/definitions/regionVariable"
      - $ref: "#/definitions/dbSystemVariable"
      - $ref: "#/definitions/dbHomeVariable"
      - $ref: "#/definitions/dbHomeVersionVariable"
      - $ref: "#/definitions/databaseVariable"
      - $ref: "#/definitions/autonomousDatabaseVariable"
      - $ref: "#/definitions/autonomousDatabaseVersionVariable"
      - $ref: "#/definitions/autonomousContainerDBVariable"
      - $ref: "#/definitions/kmsVaultVariable"
      - $ref: "#/definitions/containerClusterVariable"
      - $ref: "#/definitions/volumeBackupPoliciesVariable"
      - $ref: "#/definitions/loadBalancerVariable"
      - $ref: "#/definitions/serviceGatewayVariable"
      - $ref: "#/definitions/kubernetesVersionsVariable"
      - $ref: "#/definitions/instanceVariable"
      - $ref: "#/definitions/natGatewayVariable"
      - $ref: "#/definitions/tagVariable"
      - $ref: "#/definitions/nsgVariable"
      - $ref: "#/definitions/mountTargetsVariable"
      - $ref: "#/definitions/kmsKeyVariable"
      - $ref: "#/definitions/kmsSecretVariable"
      - $ref: "#/definitions/odsProjectVariable"
      - $ref: "#/definitions/instanceShapeVariableWithFlex"
      - $ref: "#/definitions/groupsVariable"
      - $ref: "#/definitions/dynamicGroupsVariable"
      - $ref: "#/definitions/logAnalyticsLogGroup"
      - $ref: "#/definitions/logAnalyticsLogEntities"
      - $ref: "#/definitions/logAnalyticsScheduledTasks"
      - $ref: "#/definitions/logAnalyticsEntityTypes"
      - $ref: "#/definitions/managementAgents"
      - $ref: "#/definitions/logAnalyticsSources"
      - $ref: "#/definitions/privateEndpointVariable"
      - $ref: "#/definitions/apmDomainVariable"
  complexVariable:
    oneOf:
      - $ref: "#/definitions/listVariable"
      - $ref: "#/definitions/mapVariable"
      - $ref: "#/definitions/objectVariable"

  mapVariable: 
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type, valueType]
        properties:
          type:
            enum: [map]
          default:
            type: [string]
          valueType:
            type: [string]
        additionalProperties: true

  listVariable: 
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type, valueType]
        properties:
          type:
            enum: [list]
          default:
            type: [string]
          valueType:
            type: [string]
        additionalProperties: true

  objectVariable: 
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type, attributes]
        properties:
          type:
            enum: [object]
          default:
            type: string
          attributes:
            type: [array]
            items:
              type: string
        additionalProperties: true

  nonNegativeInteger:
    type: integer
    minimum: 0

  nonNegativeIntegerDefault0:
    allOf:
      - $ref: "#/definitions/nonNegativeInteger"
      - default: 0

  arrayVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [array]
          items:
            $ref: "#/definitions/variable"
          maxItems:
            $ref: "#/definitions/nonNegativeInteger"
          minItems:
            $ref: "#/definitions/nonNegativeIntegerDefault0"
          uniqueItems:
            type: boolean
            default: false
          contains:
            $ref: "#/definitions/variable"
        additionalProperties: true

  booleanVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [boolean]
          default:
            $ref: "#/definitions/booleanStatement"
            default: false
        additionalProperties: true

  enumVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [enum]
          enum:
            type: array
            items:
              type: string
          default:
            $ref: "#/definitions/booleanStatement"
          allowMultiple:
            type: boolean
            default: false
        additionalProperties: true

  integerVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [integer]
          default:
            type: integer
          multipleOf:
            type: number
            exclusiveMinimum: 0
          minimum:
            type: number
          maximum:
            type: number
          exclusiveMinimum:
            type: number
          exclusiveMaximum:
            type: number
        additionalProperties: true

  numberVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [number]
          default:
            type: number
          multipleOf:
            type: number
            exclusiveMinimum: 0
          minimum:
            type: number
          maximum:
            type: number
          exclusiveMinimum:
            type: number
          exclusiveMaximum:
            type: number
        additionalProperties: true

  stringVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [string]
          default:
            $ref: "#/definitions/booleanStatement"
          pattern:
            type: string
          maxLength:
            $ref: "#/definitions/nonNegativeInteger"
          minLength:
            $ref: "#/definitions/nonNegativeIntegerDefault0"
        additionalProperties: true

  multilineVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [text]
          default:
            $ref: "#/definitions/booleanStatement"
          pattern:
            type: string
          multiline:
            type: boolean
          maxLength:
            $ref: "#/definitions/nonNegativeInteger"
          minLength:
            $ref: "#/definitions/nonNegativeIntegerDefault0"
        additionalProperties: true

  fileVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [file]
        additionalProperties: true

  passwordVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [password]
          default:
            $ref: "#/definitions/booleanStatement"
          confirmation:
            $ref: "#/definitions/booleanStatement"
        additionalProperties: true

  datetimeVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [datetime]
          default:
            $ref: "#/definitions/booleanStatement"
        additionalProperties: true

  identityDomainVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:identity:domains:id]
          pattern:
            type: string
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true
  
  imageVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:image:id]
          pattern:
            type: string
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
              shape:
                type: string
                format: variablereference
              operatingSystem:
                type: string
                format: variablereference
              operatingSystemVersion:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  instanceShapeVariableWithFlex:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:instanceshapewithflex:name]
          pattern:
            type: string
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              imageId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
              availabilityDomain:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  instanceShapeVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:instanceshape:name]
          pattern:
            type: string
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              imageId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
              availabilityDomain:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  natGatewayVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:natgateway:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              vcnId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  instanceVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:instance:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  subnetVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:subnet:id]
          dependsOn:
            type: object
            required:
              - vcnId
              - compartmentId
            properties:
              vcnId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
              hidePublicSubnet:
                $ref: "#/definitions/booleanStatement"
              hidePrivateSubnet:
                $ref: "#/definitions/booleanStatement"
              hideRegionalSubnet:
                $ref: "#/definitions/booleanStatement"
              hideAdSubnet:
                $ref: "#/definitions/booleanStatement"
            additionalProperties: false
        additionalProperties: true

  serviceGatewayVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:servicegateway:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              vcnId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  logAnalyticsLogGroup:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:logan:loggroup:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  logAnalyticsScheduledTasks:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:logan:scheduledtask:id]
          dependsOn:
            type: object
            required:
              - compartmentId
              - taskType
            properties:
              compartmentId:
                type: string
                format: variablereference
              taskType:
                type: string
            additionalProperties: false
        additionalProperties: true

  logAnalyticsLogEntities:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:logan:logentity:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  logAnalyticsEntityTypes:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
        properties:
          type:
            enum: [oci:logan:entitytype:id]
        additionalProperties: true

  managementAgents:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:mgmt:agent:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  logAnalyticsSources:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:logan:source:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  nsgVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:core:nsg:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              vcnId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  vcnVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:core:vcn:id]
        additionalProperties: true

  availabilityDomainVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:identity:availabilitydomain:name]
        additionalProperties: true

  compartmentVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [oci:identity:compartment:id]
          default:
            $ref: "#/definitions/booleanStatement"
        additionalProperties: true

  faultDomainVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:identity:faultdomain:name]
          dependsOn:
            type: object
            required:
              - compartmentId
              - availabilityDomainName
            properties:
              compartmentId:
                type: string
                format: variablereference
              availabilityDomainName:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  regionVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [oci:identity:region:name]
          default:
            $ref: "#/definitions/booleanStatement"
            default: ${session.region}
        additionalProperties: true

  dbSystemVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:database:dbsystem:id]
        additionalProperties: true

  dbHomeVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:database:dbhome:id]
          dependsOn:
            type: object
            required:
              - dbSystemId
              - compartmentId
            properties:
              dbSystemId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  dbHomeVersionVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:database:dbhome:dbversion]
          dependsOn:
            type: object
            required:
              - dbHomeId
            properties:
              dbHomeId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  databaseVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:database:database:id]
          dependsOn:
            type: object
            required:
              - dbHomeId
              - compartmentId
            properties:
              dbHomeId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  autonomousDatabaseVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:database:autonomousdatabase:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
              dbWorkload:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  autonomousDatabaseVersionVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:database:autonomousdatabaseversion:id]
          dependsOn:
            type: object
            properties:
              compartmentId:
                type: string
                format: variablereference
              dbWorkload:
                type: string
                format: variablereference
              additionalProperties: false
        additionalProperties: true

  autonomousContainerDBVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:database:autonomouscontainerdatabase:id]
        additionalProperties: true

  kmsVaultVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:kms:vault:id]
        additionalProperties: true

  kmsKeyVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:kms:key:id]
          dependsOn:
            type: object
            required:
              - compartmentId
              - vaultId
            properties:
              compartmentId:
                type: string
                format: variablereference
              vaultId:
                type: string
                format: variablereference
              protectionMode:
                type: string
                format: variablereference
              algorithm:
                type: string
                format: variablereference
              length:
                type: number
                format: variablereference
              curveId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  kmsSecretVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:kms:secret:id]
          dependsOn:
            type: object
            required:
              - compartmentId
            properties:
              compartmentId:
                type: string
                format: variablereference
              vaultId:
                type: string
                format: variablereference
              name:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  containerClusterVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:container:cluster:id]
        additionalProperties: true

  sshPublicKeyVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [oci:core:ssh:publickey]
        additionalProperties: true

  kubernetesVersionsVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:kubernetes:versions:id]
          dependsOn:
            type: object
            required:
              - clusterOptionId
              - compartmentId
            properties:
              clusterOptionId:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  volumeBackupPoliciesVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [oci:blockstorage:policies:id]
          dependsOn:
            type: object
            properties:
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  groupsVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:identity:groups:id]
        additionalProperties: true

  dynamicGroupsVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:identity:dynamicgroups:id]
        additionalProperties: true

  loadBalancerVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:loadbalancer:loadbalancer:id]
          pattern:
            type: string
        additionalProperties: true

  mountTargetsVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required:
          - type
          - dependsOn
        properties:
          type:
            enum: [oci:mount:target:id]
          dependsOn:
            type: object
            required:
              - compartmentId
              - availabilityDomain
            properties:
              availabilityDomain:
                type: string
                format: variablereference
              compartmentId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  tagVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:identity:tag:value]
        additionalProperties: true

  odsProjectVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:ods:project:id]
        additionalProperties: true

  privateEndpointVariable:
    allOf:
      - $ref: "#/definitions/baseVariable"
      - required: [type]
        properties:
          type:
            enum: [oci:resourcemanager:privateendpoint:id]
          dependsOn:
            type: object
            required:
              - compartmentId
              - vcnId
            properties:
              compartmentId:
                type: string
                format: variablereference
              vcnId:
                type: string
                format: variablereference
            additionalProperties: false
        additionalProperties: true

  apmDomainVariable:
    allOf:
      - $ref: "#/definitions/dependsOnCompartment"
      - required: [type]
        properties:
          type:
            enum: [oci:apm:domain:id]
        additionalProperties: true

  outputs:
    type: object
    additionalProperties:
      $ref: "#/definitions/output"

  output:
    oneOf:
      - $ref: "#/definitions/booleanOutput"
      - $ref: "#/definitions/numberOutput"
      - $ref: "#/definitions/stringOutput"
      - $ref: "#/definitions/copyableStringOutput"
      - $ref: "#/definitions/linkOutput"
      - $ref: "#/definitions/ocidOutput"
      - $ref: "#/definitions/mapOutput"
      - $ref: "#/definitions/jsonOutput"
      - $ref: "#/definitions/listOutput"
      - $ref: "#/definitions/csvOutput"

  outputGroups:
    type: array
    items:
      $ref: "#/definitions/outputGroup"

  outputGroup:
    type: object
    required:
      - title
      - outputs
    properties:
      title:
        type: string
      outputs:
        type: array
        items:
          type: string
    additionalProperties: true

  baseOutput:
    type: object
    properties:
      title:
        type: string
      description:
        type: string
      sensitive:
        type: boolean
        default: false
      format:
        type: string
      visible:
        type: boolean
        default: true
    additionalProperties: true

  booleanOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [boolean]
          value:
            type: boolean
        additionalProperties: true

  numberOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [number]
          value:
            type: number
        additionalProperties: true

  stringOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [string]
          value:
            type: string
        additionalProperties: true

  copyableStringOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [copyableString]
          value:
            type: string
        additionalProperties: true

  mapOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [map]
          value:
            type: object
        additionalProperties: true

  jsonOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [json]
          value:
            type: object
        additionalProperties: true

  listOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [list]
          value:
            type: array
        additionalProperties: true

  csvOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [csv]
          value:
            type: array
        additionalProperties: true

  linkOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [link]
          displayText:
            type: string
            minLength: 3
            maxLength: 45
          value:
            $ref: "#/definitions/url"
        additionalProperties: true

  ocidOutput:
    allOf:
      - $ref: "#/definitions/baseOutput"
      - required: [type]
        properties:
          type:
            enum: [ocid]
          value:
            $ref: "#/definitions/ocid"
        additionalProperties: true

Documento schema di esempio

Di seguito è riportato un documento di schema di esempio.

Esempio
# Title shown in Application Information tab.
title: Sample input variable schema
# Sub Title shown in Application Information tab.
description: Sample description...
informationalText: Sample informational text to display in tab...
schemaVersion: 1.1.0
version: "20190304"

# URL of Logo Icon used on Application Information tab. Logo must be 130x130 pixels.
# (Optional)
logoUrl: https://cloudmarketplace.oracle.com/marketplace/content?contentId=53066708

# Used in Application Information tab to Hyperlink Title and Logo to the Marketplace
# Listing.
# Also used to link to Listing Usage section for "View Instructions".
# (Optional) If it is missing, Application Information uses the
# "marketplace-listing-id" tag for the same purpose.
source:
  type: marketplace
  reference: 16132843

locale: "en"
variableGroups:
  - title: "Node Configuration"
    variables:
      - targetCompartment
      - ${nodeCount}
      - ${nodeShapes}
      - ${availability}
  - title: "Application Details"
    variables:
      - ${username}
      - ${password}
      - ${dnsServers}
  - title: "Subnet"
    variables:
      - ${vcnCompartment}
      - ${myVcn}
      - ${subnetCompartment}
      - ${mySubnet}
      - ${mySubnetWithFilter}
      - ${hide_public_subnet}
      - ${hide_private_subnet}
      - ${hide_regional_subnet}
      - ${hide_ad_subnet}
  - title: "Network Configuration"
    variables:
      - ${service_gateway}
      - ${nat_gateway}
      - ${load_balancer}
      - ${myNsg}
      - ${Kubernetes_version}
      - ${backup_policies}
      - ${mount_target}
  - title: "Existing Groups"
    variables:
      - ${iam_groups_use_existing}
  - title: "Identity"
    variables:
      - ${iam_groups}
      - ${iam_dynamic_groups}
      - ${iam_domains}
  - title: "Database"
    variables:
      - ${dbCompartment}
      - ${myDbSystem}
      - ${myDbHome}
      - ${myDb}
      - ${myAutonomousDB}
      - ${myAutonomousDBVersion}
  - title: "Advanced"
    variables:
      - ${myImageId}
      - ${myInstance}
      - ${myShape}
      - ${myCompatibleShape}
      - ${myCompatibleShapeBasedOnAd}
      - ${multilineText}
    visible: true
  - title: "Complex Variables"
    variables:
      - ${shapesList}
      - ${subnet_ocids}
      - ${compute_instance_config}
    visible: true
  - title: "Hidden"
    variables:
      - ${myRegion}
    visible: false
  - title: "Existing Vcn"
    variables:
      - ${myVcn}
    visible:
      or:
        - ${useExistingVcn}
        - and:
            - and:
                - true
                - true
            - not:
                - false
  - title: "Password can't be 'password'!"
    variables:
      - ${password}
  - title: "Complex Conditional Section"
    variables:
      - ${myVcn}
    visible:
      or:
        - ${useExistingVcn}
        - and:
            - and:
                - true
                - true
            - not:
                - false
  - title: "Equality Conditional Section"
    variables:
      - ${myVcn}
    visible:
      eq:
        - ${objectStorageTier}
        - standard
  - title: "Less than Conditional Section"
    variables:
      - ${myVcn}
    visible:
      lt:
        - ${availability}
        - 5
  - title: "Less than or Equal Conditional Section"
    variables:
      - ${myVcn}
    visible:
      le:
        - ${availability}
        - 4
  - title: "Greater than Conditional Section"
    variables:
      - ${myVcn}
    visible:
      gt:
        - ${availability}
        - 5
  - title: "Greater than or Equal Conditional Section"
    variables:
      - ${myVcn}
    visible:
      ge:
        - ${availability}
        - 4
  - title: "Vault section"
    variables:
      - ${myVault}
      - ${myVaultKey}
      - ${mode}
      - ${myCompatibleKey}
      - ${algo}
      - ${myCompatibleKeyBasedOnAlgo}
      - ${mySecret}
      - ${myVaultSecret}
  - title: "DataScience"
    variables:
      - ${ods_project_ocid}
  - title: "Generic File"
    variables:
      - ${generic_file}
  - title: "Resource Tagging"
    variables:
      - ${tag}
  - title: "Resource Manager Section"
    variables:
      - ${private_endpoint_ocid}
  - title: "APM Domain Selection"
    variables:
      - ${apmDomain}

variables:
  # string field
  username:
    type: string
    minLength: 1
    maxLength: 255
    pattern: "^[a-z][a-zA-Z0-9]+$"
    # title is used as the label if present
    title: Username
    # description used as the tooltip if present
    description: Enter your username
    default: admin
    required: true

  # password field
  password:
    description: Really Bad Password Field
    type: password
    pattern: "^[a-zA-z]{1,8}$"
    required: true

  # integer field
  nodeCount:
    type: integer
    description: Number of Nodes
    minimum: 3
    maximum: 12
    multipleOf: 3

  # non-integer number field
  availability:
    type: number
    default: 99.7
    maximum: 100
    minimum: 0

  # string enum
  objectStorageTier:
    type: enum
    enum:
      - archive
      - standard
    allowMultiple: false

  # input a list, each element must be an ip addresses
  dnsServers:
    type: array
    items:
      type: string
      pattern: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
    minItems: 1
    uniqueItems: true
    default: [8.8.8.8, 8.8.4.4]

  # datetime picker
  expireDate:
    type: datetime

  # compartmentId dynamic dropdown, targetCompartment present in input variables
  targetCompartment:
    type: oci:identity:compartment:id

  # ---- subnet picker ---- #

  useExistingVcn:
    type: boolean

  vcnCompartment:
    type: oci:identity:compartment:id
    visible: ${useExistingVcn}

  myVcn:
    type: oci:core:vcn:id
    dependsOn:
      compartmentId: ${vcnCompartment}
    visible:
      or:
        - ${useExistingVcn}
        - and:
            - and:
                - true
                - true
            - not:
                - false

  subnetCompartment:
    type: oci:identity:compartment:id
    visible: ${useExistingVcn}

  mySubnet:
    type: oci:core:subnet:id
    dependsOn:
      compartmentId: ${subnetCompartment}
      vcnId: ${myVcn}
    visible: ${useExistingVcn}

  mySubnetWithFilter:
    type: oci:core:subnet:id
    dependsOn:
      compartmentId: ${subnetCompartment}
      vcnId: ${myVcn}
      hidePublicSubnet: ${hide_public_subnet}
      hidePrivateSubnet: ${hide_private_subnet}
      hideRegionalSubnet: ${hide_regional_subnet}
      hideAdSubnet: ${hide_ad_subnet}
    visible: ${useExistingVcn}

  hide_public_subnet:
    type: boolean
    default: false

  hide_private_subnet:
    type: boolean
    default: false

  hide_regional_subnet:
    type: boolean
    default: false

  hide_ad_subnet:
    type: boolean
    default: false

  load_balancer:
    type: oci:loadbalancer:loadbalancer:id
    pattern: ^(10)Mbps.*$
    title: Existing LBaaS for "Application" Evaluation
    required: true
    dependsOn:
      compartmentId: ${vcnCompartment}

  Kubernetes_version:
    type: oci:kubernetes:versions:id
    title: Kubernetes version
    description: The Oracle cloud kubernetes version for tenancy.
    required: true
    visible: true
    dependsOn:
      compartmentId: ${vcnCompartment}
      clusterOptionId: "all"

  backup_policies:
    type: oci:blockstorage:policies:id
    title: Backup Policy
    description: The Oracle Cloud Backup Policy for tenancy.
    required: true

  mount_target:
    type: oci:mount:target:id
    title: Mount target
    description: The Oracle Cloud mount target
    dependsOn:
      compartmentId: ${targetCompartment}
      availabilityDomain: ${myAvailabilityDomain}

  myNsg:
    type: oci:core:nsg:id
    title: "Network Security Group"
    description: "Network Security Group description"
    dependsOn:
      compartmentId: ${vcnCompartment}

  service_gateway:
    type: oci:core:servicegateway:id
    title: NAT Gateway
    dependsOn:
      compartmentId: ${vcnCompartment}
      vcnId: ${myVcn}

  nat_gateway:
    type: oci:core:servicegateway:id
    title: NAT Gateway
    dependsOn:
      compartmentId: ${vcnCompartment}
      vcnId: ${myVcn}

  iam_groups_use_existing:
    type: boolean
    title: Use existing Groups
    required: true
    default: false

  iam_groups:
    type: oci:identity:groups:id
    title: Group Name
    dependsOn:
      compartmentId: ${targetCompartment}
    visible:
      or:
        - ${iam_groups_use_existing}
        - and:
            - and:
                - true
                - true
            - not:
                - false

  iam_dynamic_groups:
    type: oci:identity:dynamicgroups:id
    title: Dynamic Group Name
    dependsOn:
      compartmentId: ${targetCompartment}
    visible:
      or:
        - ${iam_groups_use_existing}
        - and:
            - and:
                - true
                - true
            - not:
                - false
  
  iam_domains:
    type: oci:identity:domains:id
    title: Domain Name
    dependsOn:
      compartmentId: ${targetCompartment}
    visible:
      or:
        - ${iam_groups_use_existing}
        - and:
            - and:
                - true
                - true
            - not:
                - false

  myRegion:
    type: oci:identity:region:name
    visible: false

  myImageId:
    type: oci:core:image:id
    dependsOn:
      compartmentId: ${targetCompartment}

  myShape:
    type: oci:core:instanceshape:name
    dependsOn:
      compartmentId: ${targetCompartment}

  myInstance:
    type: oci:core:instance:id
    dependsOn:
      compartmentId: ${targetCompartment}

  myCompatibleShape:
    type: oci:core:instanceshape:name
    dependsOn:
      compartmentId: ${targetCompartment}
      imageId: ${myImageId}
    visible:
      or:
        - ${useExistingVcn}
        - and:
            - and:
                - true
                - true
            - not:
                - false

  myCompatibleShapeBasedOnAd:
    type: oci:core:instanceshape:name
    dependsOn:
      compartmentId: ${targetCompartment}
      availabilityDomain: ${myAvailabilityDomain}
    visible:
      or:
        - ${useExistingVcn}
        - and:
            - and:
                - true
                - true
            - not:
                - false

  myAvailabilityDomain:
    type: oci:identity:availabilitydomain:name
    dependsOn:
      compartmentId: ${targetCompartment}
    visible: complexExpression

  myFaultdomain:
    type: oci:identity:faultdomain:name
    dependsOn:
      compartmentId: ${targetCompartment}
      availabilityDomainName: ${myAvailabilityDomain}

  dbCompartment:
    type: oci:identity:compartment:id

  myDbSystem:
    type: oci:database:dbsystem:id
    dependsOn:
      compartmentId: ${dbCompartment}

  myDbHome:
    type: oci:database:dbhome:id
    dependsOn:
      dbSystemId: ${myDbSystem}
      compartmentId: ${dbCompartment}

  myDbHomeVersion:
    type: oci:database:dbhome:dbversion
    dependsOn:
      dbHomeId: ${myDbHome}

  myDb:
    type: oci:database:database:id
    dependsOn:
      dbHomeId: ${myDbHome}
      compartmentId: ${dbCompartment}

  myAutonomousDB:
    type: oci:database:autonomousdatabase:id
    dependsOn:
      compartmentId: ${dbCompartment}
      dbWorkload: "DW"

  myAutonomousDBVersion:
    type: oci:database:autonomousdatabaseversion:id
    title: AutonomousDatabaseVersionTitle
    description: AutonomousDatabaseVersionDescription
    required: true
    default: "19c"
    dependsOn:
      compartmentId: ${compartment_ocid}
      dbWorkload: "AJD"

  container_cluster_ocid:
    type: oci:container:cluster:id
    required: true
    title: OKE Cluster
    description: Kubernetes cluster managed by OCI Container Engine for Kubernetes
    dependsOn:
      compartmentId: ${compartment_ocid}

  myVault:
    type: oci:kms:vault:id
    title: "vault"
    description: "vault"
    dependsOn:
      compartmentId: ${targetCompartment}

  myVaultKey:
    type: oci:kms:key:id
    title: "key"
    description: "key"
    dependsOn:
      compartmentId: ${targetCompartment}
      vaultId: ${myVault}

  mode:
    type: enum
    enum:
      - Hsm
      - Software
    allowMultiple: false

  myCompatibleKey:
    type: oci:kms:key:id
    title: "key"
    description: "key"
    dependsOn:
      compartmentId: ${targetCompartment}
      vaultId: ${myVault}
      protectionMode: ${mode}

  algo:
    type: enum
    enum:
      - AES
      - RSA
      - ECDSA
    allowMultiple: true

  myCompatibleKeyBasedOnAlgo:
    type: oci:kms:key:id
    title: "key"
    description: "key"
    dependsOn:
      compartmentId: ${targetCompartment}
      vaultId: ${myVault}
      protectionMode: ${mode}
      algorithm: ${algo}

  mySecret:
    type: "oci:kms:secret:id"
    title: "secret"
    description: "secret"
    dependsOn:
      compartmentId: ${targetCompartment}

  myVaultSecret:
    type: "oci:kms:secret:id"
    title: "secret"
    description: "secret"
    dependsOn:
      compartmentId: ${targetCompartment}
      vaultId: ${myVault}

  ods_project_ocid:
    type: oci:ods:project:id
    required: true
    title: odsProject
    description: "Select ods project from list"
    dependsOn:
      compartmentId: ${targetCompartment}

  generic_file:
    type: file
    required: true
    title: GenericFile
    description: "Drop a raw file (stored as base64 string data)"

  tag:
    type: oci:identity:tag:value
    required: true
    title: Tagging
    description: Tag value for resource created
    dependsOn:
      compartmentId: ${targetCompartment}

  private_endpoint_ocid:
    type: oci:resourcemanager:privateendpoint:id
    required: true
    title: privateEndpoint
    description: "Resource Manager Private Endpoint for Private Access"
    dependsOn:
      compartmentId: ${targetCompartment}
      vcnId: ${vcnId}

  multilineText:
    type: text
    required: false
    multiline: true
    title: Multi-line value
    description: Multi-line value
    default: "First line\nSecond line\nThird line"

  apmDomainVariable:
    type: oci:apm:domain:id
    title: "APM Domain"
    description: "APM Domain"
    dependsOn:
      compartmentId: ${targetCompartment}

  # ---- Complex Data Type: Map Variable ---- #
  # map variable with subnet OCIDs for dev, test, prod
  subnet_ocids: 
    type: map
    valueType: subnet_ocid
    title: "Subnet OCIDs"
    description: "Subnet Map containing dev, test and prod subnet OCIDs"
    default: "{\"dev\":\"ocid1.subnet.oc1..aaaaaaaadevsubnet\",\"test\":\"ocid1.subnet.oc1..aaaaaaaatestsubnet\",\"prod\":\"ocid1.subnet.oc1..aaaaaaaaprodsubnet\"}"

  subnet_ocid:
    type: string
    visible: false
    
  # ---- Complex Data Type: List Variable ---- #
  # list variable with dynamic valueType variable 
  shapesList:
    type: list
    valueType: shape
    title: "List of Shapes"
    required: true
    description: "List of Shapes in the target Compartment"

  shape: 
    type: oci:core:instanceshape:name
    visible: false
    dependsOn:
      compartmentId: ${targetCompartment}
  # ---- Complex Data Type: Object Variable ---- #
  # an object variable for compute instance configuration 
  compute_instance_config:
    type: object
    title: "Compute Instance Configuration"
    attributes:
      - availabilityDomain
      - displayName
      - imageID
    description: "Configuration for an OCI compute instance"
    default: "{\"availability_domain\": \"us-phoenix-1\", \"display_name\":\"Instance1\", \"image_id\":\"ocid1.image.oc1..aaaaaaaadevimage\"}"

  availabilityDomain:
    type: oci:identity:availabilitydomain:name
    actualName: availability_domain
    visible: false
    dependsOn:
      compartmentId: ${targetCompartment}

  displayName: 
    type: string 
    actualName: display_name 
    visible: false   

  imageID: 
    type: oci:core:image:id 
    actualName: image_id 
    visible: false
    dependsOn: 
      compartmentId: ${targetCompartment}

# Used to present outputs with more refinement on the Application Information tab.
# The Application Information tab is only shown if the schema has a "title",
# "description", and at least one output in this "outputs" section.
#
# type:
#   - boolean
#   - string
#   - number
#   - link - contains url that can be hyperlinked.  If type is not specified and the
#            value is a proper url, this type is assumed.
#   - ocid - contains an OCID.  An attempt is made to hyperlink it to the designated
#            resource in the console.
#   - csv - synonym for list.  Array of values converted to a comma separated list.
#   - json - synonym for map.  Map of key / values converted to JSON.
#   - list - array of values converted to a comma separated list.
#   - map - map of key / values converted to JSON.
#
# displayText: used in links to give text displayed instead of value
# title: friendly label
# visible: if false, this ouptut is not shown in the outputs section of Application Information.
#          It can still be used as the primaryOutputButton.
outputs:
  controlCenterUrl:
    type: link
    title: Control Center
    displayText: Control Center
    visible: false

  schemaRegistryUrl:
    type: link
    title: Schema Registry
    displayText: Schema Registry

  schemaRegistryPublicIps:
    type: csv
    title: Public IPs

  schemaRegistryLoadBalancer:
    type: ocid
    title: Load Balancer

  brokerPublicIps:
    type: csv

  connectUrl:
    type: link
    title: Connect
    displayText: Connect

  connectPublicIps:
    type: csv
    title: Public IPs

  restUrl:
    type: link
    title: Rest API

# primaryOutputButton is a reference to a link output that creates a primary button
# on the Application Information tab.
# (Optional) if not provided, no primary button is shown.  Also if the output
# referenced is not a link output, no button is shown.
primaryOutputButton: ${controlCenterUrl}

# Used to group Outputs.  Any outputs not included in these defined groups, are
# included in a default group labelled "Outputs".
# (Optional) if not groups are given, outputs are not grouped at all.
outputGroups:
  - title: Schema Registry
    outputs:
      - ${schemaRegistryUrl}
      - ${schemaRegistryPublicIps}
      - ${schemaRegistryInstances}
      - ${schemaRegistryLoadBalancer}

  - title: Broker / Connect
    outputs:
      - ${brokerPublicIps}
      - ${brokerInstances}
      - ${connectUrl}
      - ${connectPublicIps}
      - ${restUrl}

Come controllare gli elementi della console

Utilizzare un documento di schema per controllare la visualizzazione delle variabili dello stack e di altri elementi nelle pagine dei dettagli dello stack nella console.

Questo controllo di visualizzazione è disponibile per gli stack creati da un file di configurazione Terraform. Utilizzando un documento di schema, è possibile definire l'aspetto e il funzionamento delle variabili durante la creazione dello stack e il testo visualizzato nella scheda Informazioni applicazione per uno stack creato.

Di seguito sono riportati gli elementi di visualizzazione della console controllati dal documento di schema. Per visualizzare istruzioni ed esempi pertinenti, espandere un elemento di visualizzazione a cui si è interessati.

Etichetta e descrizione del campo

Per visualizzare un'etichetta di campo e una descrizione per una variabile, effettuare le operazioni riportate di seguito.

  • Aggiungere le righe title: <field_label> e description: <field_description>.

Immagine di esempio per un'etichetta e una descrizione di campo variabile:

Campo di log avanzato con descrizione "Abilita o disabilita il log avanzato (log di flusso VCN e/o log di audit)".

Dichiarazione di esempio per un'etichetta e una descrizione di campo variabile:

  advanced_logging_option:
    type: enum
    description: "Enable or disable advanced logging (VCN flow logs and/or audit logs)."
    title: "Advanced logging"
Descrizioni variabili formattate

Nella descrizione di una variabile sono supportati i seguenti formati:

Formato Codice
Forte (grassetto) <strong>...</strong>
Enfasi (corsivo) <em>...</em>
Link <a href='...'>...</a>
È inoltre possibile combinare la formattazione supportata. Esempi:
  • Forte ed enfasi (grassetto e corsivo): <strong><em>...</em></strong> OPPURE <em><strong>...</strong></em>
  • Forte ed enfasi nel testo del link (grassetto e corsivo nel testo del link): <a href='...'><strong>...</strong><em>...</em></a>

Esempio di descrizione di variabile formattata:

container_cluster_ocid:   
 type: oci:container:cluster:id   
 required: true   
 title: OKE Cluster   
 description: "<strong>Kubernetes cluster</strong> managed by <a href="https://www.oracle.com/cloud/cloud-native/kubernetes-engine/">OCI Container Engine</a> for Kubernetes"
Valore predefinito

Per eseguire il rendering di una variabile con un valore predefinito:

  • Aggiungere la riga default: <default-value>.

Immagine di esempio per una variabile con un valore predefinito:

Valore predefinito "DataScienceGroup" per il nome del gruppo di variabili per i criteri di sicurezza.

Esempio di dichiarazione per un valore predefinito:

  ods_group_name:
    type: string
    title: ${Messages.solutionsHub.solutions.dataScience.variables.ods_group_name.title()}
    description: ${Messages.solutionsHub.solutions.dataScience.variables.ods_group_name.description()}
    required: true
  # provide a default value
    default: "DataScienceGroup"
Campo di testo a più righe

Per eseguire il rendering di una variabile come campo di testo multiriga:

  • Aggiungere la riga multiline: true.

Per dichiarare un valore predefinito con più righe:

  • Separare ogni riga con \n.

Immagine di esempio per una variabile visualizzata come campo di testo a più righe, con due righe di testo immesse:

Campo di testo su più righe con due righe di testo immesse.

Dichiarazione di esempio per un campo di testo su più righe:

  otherNames:
    type: text
    required: false
    multiline: true
    title: "Other Names"
    description: "Enter one name per line."
    default: "Name1\nName2"
Gruppo e ordine

Per eseguire il rendering di un gruppo (casella) di variabili, con le variabili in una sequenza prescritta:

  • Aggiungere un blocco variableGroups.
  • Aggiungere una riga title a questo blocco.
  • Aggiungere un blocco variables a variableGroups.
  • Aggiungere le variabili al blocco variables nell'ordine desiderato.

Immagine di esempio per un gruppo di variabili:

Configurazione del gruppo di variabili WordPress contenente i campi per nome utente e password.

Esempio di dichiarazione per un gruppo di variabili con un ordine prescritto:

variableGroups:
  - title: "WordPress configuration"
    variables:
    - wp_admin_user
    - wp_admin_password
Controllo chiave SSH
Per eseguire il rendering di una variabile come controllo chiave SSH:
  • Aggiungere la riga type: oci:core:ssh:publickey.

Immagine di esempio per un controllo chiave SSH:

Controllo della chiave SSH.

Dichiarazione di esempio per un controllo di chiave SSH:

  ssh_public_key:
    title: SSH public key
    description: Public SSH key to be included in the ~/.ssh/authorized_keys file for the default user on the instance
    # renders variable as an SSH key control
    type: oci:core:ssh:publickey
    additionalProps:
      allowMultiple: true
    required: false
    default: [""]
    pattern: "((^(ssh-rsa AAAAB3NzaC1yc2|ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNT|ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzOD|ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1Mj|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5|ssh-dss AAAAB3NzaC1kc3)[0-9A-Za-z+\/]+[=]{0,3})( [^,]*)?)(,((ssh-rsa AAAAB3NzaC1yc2|ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNT|ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzOD|ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1Mj|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5|ssh-dss AAAAB3NzaC1kc3)[0-9A-Za-z+\/]+[=]{0,3})( [^,]*)?)*$"
Controllo file

Per eseguire il rendering di una variabile come controllo file:

  • Aggiungere la riga type: file.

    Nota

    Il file caricato viene memorizzato in formato Base64. Per utilizzare il file, decodificare l'output. Ad esempio, aggiungere il codice seguente a un file outputs.tf nella configurazione Terraform.
    output "generic_file_raw" {
      value = base64decode(var.generic_file)
    }

Immagine di esempio per un controllo file:

Controllo file.

Dichiarazione di esempio per un controllo file:

  generic_file:
    type: file
    title: generic_file
    description: Drop any file or browse
    required: true
Controllo applicazione tag

Per eseguire il rendering di una variabile come controllo di applicazione tag:

  • Aggiungere la riga type: oci:identity:tag:value.

    Nota

    Per preinserire i valori delle tag nella console, accedere ai valori dalla configurazione Terraform. Ad esempio, aggiungere il codice seguente a un file main.tf nella configurazione Terraform.
    resource "oci_logging_log_group" "sample_log_group" {
      compartment_id = var.compartment_ocid
      display_name   = "sample_log_group"
      description    = "Prepopulated tag values"
      freeform_tags  = var.tag_value.freeformTags
      defined_tags   = var.tag_value.definedTags
    }

Immagine di esempio per un controllo di applicazione tag:

Controllo applicazione tag.

Dichiarazione di esempio per un controllo di applicazione tag:

  tag_value:
    type: oci:identity:tag:value
    title: Tags
    required: true
Tipi di dati complessi

Questa sezione descrive i tipi di dati complessi per le variabili di elenco, mappa e oggetto. Si consiglia di includere un campo title per qualsiasi tipo di dati complesso.

Elenca e mappa le linee guida delle variabili:

  • Definire il campo valueType quando si specifica la variabile di schema.
  • Per qualsiasi variabile valueType, impostare visible su false.

Linee guida delle variabili oggetto:

  • Includere un campo attributes per definire le variabili di attributo dell'oggetto.
  • Per qualsiasi variabile attribute, includere un campo actualName che corrisponda al nome dell'attributo definito nel file Terraform per la variabile oggetto.
  • Per qualsiasi variabile attribute, impostare visible su false.

Dichiarazioni di esempio da Documento di schema di esempio:

  # ---- Complex Data Type: Map Variable ---- #
  # map variable with subnet OCIDs for dev, test, prod
  subnet_ocids: 
    type: map
    valueType: subnet_ocid
    title: "Subnet OCIDs"
    description: "Subnet Map containing dev, test and prod subnet OCIDs"
    default: "{\"dev\":\"ocid1.subnet.oc1..aaaaaaaadevsubnet\",\"test\":\"ocid1.subnet.oc1..aaaaaaaatestsubnet\",\"prod\":\"ocid1.subnet.oc1..aaaaaaaaprodsubnet\"}"

  subnet_ocid:
    type: string
    visible: false
    
  # ---- Complex Data Type: List Variable ---- #
  # list variable with dynamic valueType variable 
  shapesList:
    type: list
    valueType: shape
    title: "List of Shapes"
    required: true
    description: "List of Shapes in the target Compartment"

  shape: 
    type: oci:core:instanceshape:name
    visible: false
    dependsOn:
      compartmentId: ${targetCompartment}
  # ---- Complex Data Type: Object Variable ---- #
  # an object variable for compute instance configuration 
  compute_instance_config:
    type: object
    title: "Compute Instance Configuration"
    attributes:
      - availabilityDomain
      - displayName
      - imageID
    description: "Configuration for an OCI compute instance"
    default: "{\"availability_domain\": \"us-phoenix-1\", \"display_name\":\"Instance1\", \"image_id\":\"ocid1.image.oc1..aaaaaaaadevimage\"}"

  availabilityDomain:
    type: oci:identity:availabilitydomain:name
    actualName: availability_domain
    visible: false
    dependsOn:
      compartmentId: ${targetCompartment}

  displayName: 
    type: string 
    actualName: display_name 
    visible: false   

  imageID: 
    type: oci:core:image:id 
    actualName: image_id 
    visible: false
    dependsOn: 
      compartmentId: ${targetCompartment}
Prepopolamento dinamico

Per popolare dinamicamente le variabili con valori basati sulle dipendenze:

Immagine di esempio per una variabile prepopolata dinamicamente:

Valori precompilati per il campo Rete cloud virtuale (VCN).

Dichiarazione di esempio per una variabile prepopolata dinamicamente:

    vcn_ocid:
    "title": "Virtual cloud network (VCN)",
    "description": "The virtual cloud network to use with the compute instance. You can use the subnets template to create a VCN."
    # prepopulates available values for VCN
      type: oci:core:vcn:id
    # determines values for prepopulation from selected compartment
      dependsOn:
        compartmentId: compartment_ocid
      required: true
      default: ""

Dichiarazione di esempio per gli endpoint privati:

  private_endpoint_ocid:
    type: oci:resourcemanager:privateendpoint:id
    required: true
    title: "Resource Manager Private Endpoint"
    description: "Resource Manager Private Endpoint for Private Access"
    dependsOn:
      compartmentId: ${privateEndpointCompartmentOCID}
      vcnId: ${privateEndpointVCNOCID}

Dichiarazioni di esempio per la VCN a seconda del compartimento, con subnet a seconda sia del compartimento che della VCN:

  vcnCompartment:
    # prepopulates available values for compartment
    type: oci:identity:compartment:id
 
myVcn:
    # prepopulates available values for VCN
    type: oci:core:vcn:id
    # determines values for VCN prepopulation from selected compartment
    dependsOn:
      compartmentId: ${vcnCompartment}
 
subnetCompartment:
    # prepopulates available values for compartment
    type: oci:identity:compartment:id
 
mySubnet:
    # prepopulates available values for subnet
    type: oci:core:subnet:id
    # determines values for subnet prepopulation from selected compartment and VCN
    dependsOn:
      compartmentId: ${subnetCompartment}
      vcnId: ${myVcn}

Dichiarazione di esempio di immagine 1, in cui l'immagine dipende solo dal compartimento (l'unico campo dependsOn obbligatorio):

  instance_image:    
    title: Image    
    description: Image    
    type: oci:core:image:id    
    required: true    
    dependsOn:      
       compartmentId: ${compartment_ocid}

Dichiarazione di esempio di immagine 2, in cui l'immagine dipende dal compartimento, dal sistema operativo, dalla versione del sistema operativo e dalla forma:

  instance_image:    
    title: Image    
    description: Image    
    type: oci:core:image:id    
    required: true    
    dependsOn:      
       compartmentId: ${compartment_ocid}      
       operatingSystem: "Oracle Linux"      
       operatingSystemVersion: "7.8"
       shape: "<shape name>"
Valori enumerati (selezione di un solo valore)

Per visualizzare i valori enumerati per una variabile (consentendo la selezione di un valore):

  • Aggiungere le righe type: enum e un blocco enum.

Immagine di esempio per una variabile con valori enumerati che consentono la selezione di un singolo valore:

Valori enumerati per il campo di registrazione avanzata.

Dichiarazione di esempio per una variabile con valori enumerati:

  advanced_logging_option:
    title: "Advanced logging"
    description: "Enable or disable advanced logging (VCN flow logs and/or audit logs)."
    type: enum
    # enumerated values
    enum:
    - AUDIT_LOGS
    - FLOW_LOGS
    - BOTH
    - NONE
    default: NONE
    required: true
Valori enumerati (selezione di più valori)

Per visualizzare i valori enumerati per una variabile (consentendo la selezione di più valori):

  • Aggiungere le righe type: enum e un blocco enum.
  • Aggiungere le righe additionalProps: e un blocco allowMultiple:true.

Immagine di esempio per una variabile con valori enumerati che consentono la selezione di più valori:

Questa immagine mostra una variabile con valori enumerati, in cui è possibile selezionare più valori.

Dichiarazione di esempio per una variabile con valori enumerati (selezione di più valori):

    attachment_type:
      type: enum
      title: "Attachment type"
      additionalProps:
        allowMultiple: true
      default: "iscsi"
      # enumerated values (multiple value selection)
      enum:
        - "iscsi"
        - "paravirtualized"
Casella di controllo

Per visualizzare una variabile come casella di controllo:

  • Aggiungere la riga type: boolean.

Immagine di esempio per una variabile della casella di controllo:

Rendering della casella di controllo per la variabile Enable vault support?.

Dichiarazione di esempio per una variabile di casella di controllo:

  ods_vcn_use_existing:
    # renders variable as a check box
    type: boolean
    title: "Enable vault support?"
    description: "Use a vault to store secrets and manage encrypted resources."
    required: true
    default: false
Dipendenza visibilità
Nota

I gruppi hanno una priorità maggiore rispetto alle variabili costituenti dei gruppi. Ad esempio, se una variabile è visibile all'interno di un gruppo non visibile, l'intero gruppo non è visibile.

Operazioni supportate:

  • and
  • eq (uguale a)
  • ge (maggiore o uguale a)
  • gt (maggiore di)
  • le (minore o uguale a)
  • lt (minore di)
  • not
  • or
Per nascondere o mostrare variabili o gruppi di variabili a seconda di altre variabili:
  • Aggiungere la riga visible: <other_variable>.

Esempio di variabile Usa vault esistente?, la cui visibilità dipende dalla selezione utente per la variabile Abilita supporto vault?:

Usare il vault esistente? è visibile solo quando è selezionata l'opzione Abilita supporto vault?.

Dichiarazioni di esempio che mostrano i campi "Nome applicazione" e "Nome gateway API" (functions_app_name e apigateway_name) solo quando è selezionata la casella di controllo "Funzioni di provisioning e gateway API?" (enable_functions_apigateway):

  enable_vault:
    type: boolean
    title: "Enable vault support?"
    description: "Use a vault to store secrets and manage encrypted resources."
    required: true
    default: false

  ods_use_existing_vault:
    type: boolean
    title: "Use existing vault?"
    description: "Use a pre-existing vault in the current compartment."
    required: true
    default: false
  # show only when enable_vault variable is selected
    visible: enable_vault
Password
Per visualizzare una variabile come password:
  • Aggiungere la riga type: password.
Per richiedere il reinserimento per la conferma della password immessa:
  • Aggiungere la riga confirmation: true.

Immagine di esempio per una variabile password che richiede conferma:

Richiesta di conferma per una password (password amministratore WordPress).

Esempio di dichiarazione per una variabile password che richiede conferma:

  wp_admin_password:
    title: "WordPress administrator password"
    description: "The password must be more than 8 characters and include at least one uppercase letter, one lowercase letter, one number, and one of the following special characters: !@#%^*_+-:?.,[]{}"
    # renders variable as a password field
    type: password
    # renders a second field to re-enter the password for confirmation
    confirmation: true
    pattern: "^(?=.*[!@#%^*_+\\-:?.,\\[\\]\\{\\}])(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?!.*[$\\(\\)]).{8,32}$"
    required: true
Variabili richieste

Per richiedere un valore per una variabile:

  • Aggiungere la riga required: true.

Immagine di esempio per una variabile obbligatoria con avvertenza di convalida:

Avvertenza di convalida per una variabile obbligatoria (VCN) non popolata.

Dichiarazione di esempio per una variabile obbligatoria:

    vcn_ocid:
    "title": "Virtual cloud network (VCN)",
    "description": "The virtual cloud network to use with the compute instance. You can use the subnets template to create a VCN."
      type: oci:core:vcn:id
      dependsOn:
        compartmentId: compartment_ocid
    # displays validation warning if no value is selected or entered
      required: true
      default: ""
Variabile opzionale

Per contrassegnare una variabile come facoltativa:

  • Aggiungere la riga required: false.

Immagine di esempio per una variabile facoltativa:

Contrassegno "Facoltativo" visualizzato a destra del titolo della variabile: IP privato.

Dichiarazione di esempio per una variabile facoltativa:

    private_ip:
      title: "Private IP"
      description: "Private IP address of your choice to assign to the VNICs."
      type: string
      # displays "Optional" marking to right of field label
      required: false
      default: ""
Pattern di convalida

Per convalidare il valore immesso per una variabile rispetto a un pattern di espressione regolare, procedere come segue.

  • Aggiungere la riga pattern: <regular-expression>.

    <regular-expression> è il pattern di convalida specifico del valore che si desidera convalidare.

    Esempio di pattern di collegamento ipertestuale: ^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$

Immagine di esempio per un errore di convalida per un valore immesso:

Errore di convalida per un valore immesso (password amministratore WordPress).

Dichiarazione di esempio per una variabile con un pattern di convalida:

  wp_admin_password:
    title: "WordPress administrator password"
    description: "The password must be more than 8 characters and include at least one uppercase letter, one lowercase letter, one number, and one of the following special characters: !@#%^*_+-:?.,[]{}"
    type: password
    confirmation: true
    # validate entered value against alphanumeric regular expression
    pattern: "^(?=.*[!@#%^*_+\\-:?.,\\[\\]\\{\\}])(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?!.*[$\\(\\)]).{8,32}$"
    required: true
Variabili riservate (scheda Output, scheda Informazioni applicazione)

L'output di una variabile con contrassegno riservato viene visualizzato come <sensitive> con un'opzione Unlock nella scheda Application information. Questa scheda è visibile nelle pagine Dettagli job e Dettagli stack.

Immagine di esempio per una variabile con contrassegno riservato (Chiave privata SSH generata) nella scheda Informazioni sull'applicazione:

Variabile con contrassegno riservato nella scheda Informazioni applicazione.

Per ulteriori informazioni sull'argomento riservato Terraform, vedere sensibile - Eliminazione dei valori nell'output CLI.

Per contrassegnare una variabile come sensibile:

  • Aggiungere la riga sensitive: true.

Esempio di dichiarazione per una variabile con segno sensibile:

  ssh_private_key:
    title: Generated SSH private key
    # marks variable as sensitive
    sensitive: true
Scheda Informazioni applicazione

Per visualizzare la scheda Informazioni sull'applicazione per uno stack creato dalla configurazione Terraform:

  • Aggiungere le righe per lo schema title e description.
  • Facoltativamente, aggiungere una riga per una casella di testo informativa blu: informationalText.
  • Aggiungere almeno un output nella sezione outputs, facoltativamente raggruppato utilizzando outputGroups.
Per consentire la copia di un valore di output visualizzato nella scheda Informazioni applicazione:
  • Impostare il tipo: aggiungere la riga type: copyableString.

Immagine di esempio per la scheda Informazioni applicazione:

Scheda Informazioni sull'applicazione.

Dichiarazione di esempio per un titolo dello schema, una descrizione e gli output:

# heading under Application Information tab
title: "Deploy a WordPress instance"
# text under heading
description: "Create your own website or blog using WordPress."

...

# output variable groups
outputGroups:
- title: "Service endpoints"
  outputs:
    - wordpress_public_ip
- title: "Generated passwords"
  outputs:
    - generated_ssh_private_key

...

# output variable field names and values
outputs:
  wordpress_public_ip:
    type: link
    title: "Your WordPress website"
  generated_ssh_private_key:
    title: "Generated SSH private key"
    sensitive: true

Come interagire con gli elementi della console

Questa sezione descrive come interagire con la visualizzazione controllata dallo schema delle informazioni sullo stack nella console di Oracle Cloud Infrastructure.

Le informazioni sullo stack sono interessate dall'eventuale documento di schema incluso nella configurazione Terraform per la creazione dello stack. Il documento dello schema influenza l'aspetto e il funzionamento delle variabili durante la creazione dello stack e il testo visualizzato nella scheda Informazioni applicazione per uno stack creato.

Sblocca variabili sensibili

Un'opzione Sblocca nella scheda Informazioni sull'applicazione indica una variabile con contrassegno sensibile. Questa opzione passa da Unlock a Lock.

  • Per visualizzare il valore, selezionare Unlock.
  • Per nascondere il valore, selezionare Blocca.

Immagine di esempio per una variabile con contrassegno riservato (Chiave privata SSH generata) nella scheda Informazioni sull'applicazione:

Screenshot della scheda delle informazioni dell'applicazione con una variabile con contrassegno riservato (chiave privata SSH generata).