スキーマ・ドキュメントを使用したコンソール・ページの拡張
リソース・マネージャでTerraform構成で使用されるスキーマ・ドキュメントの要件、サポートされているタイプおよび例を確認します。
リソース・マネージャを使用する場合は、Terraform構成にスキーマ・ドキュメントをお薦めします。スキーマ・ドキュメントを含めると、Oracle Cloud Infrastructure Consoleでページを拡張できます。「スタックの作成」ページの変数エントリを容易にするには、SSHキー・コントロールを表示し、名前を付け、グループ化し、値を動的に事前移入します。作成されたスタックに対して開く「スタック詳細」ページの「アプリケーション情報」タブでテキストを定義します。
スキーマ・ドキュメントの要件
リソース・マネージャのスキーマ・ドキュメントには、次の要件があります。
-
YAML形式。
-
データ型は、関連するTerraform構成と一致している必要があります。
たとえば、スキーマ内の
availability
変数の型number
を宣言するとします。この場合、availability
は、関連付けられたTerraform構成で同じ宣言型(number
)を持つ必要があります。(デフォルトでは、宣言された型を持たない変数はstring
を使用します。) -
リソース・マネージャのTerraform構成のルート・フォルダの下に配置。(デフォルトでは、スキーマ・ドキュメントはルート・フォルダが作業ディレクトリであるとみなします。)
サポートされているタイプ(動的事前移入および制御)
この項では、動的事前移入およびコントロールについてリソース・マネージャでサポートされているタイプを示します。
ほとんどのタイプには、コンパートメントOCID (dependsOn: required: compartmentId
)が必要です。一部のタイプには、追加の必須アイテムまたはオプション・アイテムがあります。タイプの必須項目およびオプション項目を確認するには、検証用のメタ・スキーマを参照してください。
オプションで、dependsOn
を使用して、他の変数によって動的に事前移入されたリストをフィルタします。たとえば、サブネットをVCNでフィルタします。詳細は、動的事前移入を参照してください。
schema.yaml
ファイルの説明は、出力にHTMLでエンコードされています。
Terraform構成で定義した場合、次の変数は、スタックの作成および編集に使用されるコンソール・ページの値を自動的に事前移入します。スタックの値は、Terraformアクションの「プラン」、「適用」および「破棄」を選択した場合に使用されます。
tenancy_ocid
(テナントOCID)compartment_ocid
(コンパートメントOCID)region
(リージョン)current_user_ocid
(現在のユーザーのOCID)
タイプ(特に明記されていないかぎり、動的に事前移入されたドロップダウン・フィールドとしてレンダリングされます) | リソース識別子 | コメント |
---|---|---|
file |
-- | 削除または参照によって単一のファイルを追加するためのコントロールをサーフェスします。このコントロールが表示されると、ユーザーはライセンスキーや証明書などの任意の拡張子のファイルをアップロードできます。詳細は、ファイル・コントロールを参照してください。 |
oci:apm:domain:id |
Application Performance Monitoring (APM)ドメインOCID | |
oci:blockstorage:policies:id |
ボリューム・バックアップ・ポリシー | |
oci:container:cluster:id |
KubernetesクラスタOCID | |
oci:core:image:id |
イメージOCID | |
oci:core:instanceshape:name |
インスタンス・シェイプ名 | |
oci:core:natgateway:id |
NATゲートウェイのOCID | |
oci:core:nsg:id |
ネットワーク・セキュリティ・グループOCID | |
oci:core:servicegateway:id |
サービス・ゲートウェイOCID | |
oci:core:ssh:publickey |
-- | ファイルを削除したり、キー値を貼り付けたりして、1つ以上の公開SSHキーを追加するためのコントロールをサーフェスします。詳細は、SSHキー制御を参照してください。 |
oci:core:subnet:id |
サブネットOCID | |
oci:core:vcn:id |
VCN OCID | |
oci:database:autonomouscontainerdatabase:id |
Autonomous Container Database OCID | |
oci:database:autonomousdatabase:id |
Autonomous DatabaseのOCID | |
oci:database:autonomousdatabaseversion:id |
Autonomous Databaseバージョン | |
oci:database:database:id |
ベース・データベース・サービス・データベースまたは専用インフラストラクチャ上のExadata Database Service・データベースのデータベースOCID。 | |
oci:database:dbhome:id |
DBホームOCID (ベース・データベースおよびExadata Database Service on Dedicated Infrastructureに適用されます) | |
oci:database:dbsystem:id |
DBシステムOCID (ベース・データベースに適用) | |
oci:identity:availabilitydomain:name |
可用性ドメイン名 | |
oci:identity:compartment:id |
コンパートメントOCID | |
oci:identity:domains:id |
アイデンティティ・ドメインOCID |
テナントOCIDを |
oci:identity:dynamicgroups:id |
動的グループOCID |
テナントOCIDを |
oci:identity:faultdomain:name |
フォルト・ドメイン名 | |
oci:identity:groups:id |
グループOCID |
テナントOCIDを |
oci:identity:region:name |
リージョン名 | |
oci:identity:tag:value |
タグ・ネームスペースからのタグ・キー名。TagSummaryを参照してください | 定義済タグおよびフリーフォーム・タグを追加するためのコントロールをサーフェスします。詳細は、タグ付け制御に関する項を参照してください |
oci:kms:key:id |
VaultキーOCID。ListKeysを参照してください | |
oci:kms:secret:id |
VaultシークレットOCID。ListSecretsを参照してください | |
oci:kms:vault:id |
Vault OCID | |
oci:kubernetes:versions:id |
GetClusterOptionsを参照してください | |
oci:loadbalancer:loadbalancer:id |
ロード・バランサOCID | |
oci:ods:project:id |
データ・サイエンス・プロジェクトOCID | |
oci:resourcemanager:privateendpoint:id |
リソース・マネージャ・プライベート・エンドポイントOCID | プライベート・エンドポイントをリストするためのコンパートメント(compartmentId )およびVCN (vcnId )を指定します。例については、このページのプライベート・エンドポイントの宣言の例を参照してください。 |
検証用のメタ・スキーマ
次のメタ・スキーマ・ファイルを使用して、スキーマ・ドキュメントでサポートされている変数タイプを使用していることを確認します。
# 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"
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"
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
スキーマ・ドキュメントの例
次に、スキーマ・ドキュメントの例を示します。
# 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: "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}
# 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}
コンソール項目の制御方法
スキーマ・ドキュメントを使用して、コンソールのスタック詳細ページでのスタック変数およびその他のアイテムの表示を制御します。
この表示制御は、Terraform構成ファイルから作成されたスタックで使用できます。スキーマ・ドキュメントを使用して、スタック作成時の変数の外観と動作、および作成されたスタックの「アプリケーション情報」タブに表示されるテキストを定義できます。
次に、スキーマ・ドキュメントが制御するコンソール表示アイテムを示します。関連する指示および例を表示するには、関心のある表示項目を展開します。
デフォルト値で変数をレンダリングするには:
default: <default-value>
行を追加します。
デフォルト値を持つ変数のイメージの例:
デフォルト値の宣言の例:
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"
type: oci:core:ssh:publickey
行を追加します。
SSHキー制御のイメージの例:
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})( [^,]*)?)*$"
変数をファイル・コントロールとしてレンダリングするには:
-
type: file
行を追加します。ノート
アップロードされたファイルは、Base64形式で格納されます。ファイルを使用するには、出力をデコードします。たとえば、Terraform構成のoutputs.tf
ファイルに次のコードを追加します。output "generic_file_raw" { value = base64decode(var.generic_file) }
ファイル・コントロールのイメージの例:
ファイル・コントロールの宣言例:
generic_file:
type: file
title: generic_file
description: Drop any file or browse
required: true
変数をタグ付けコントロールとしてレンダリングするには:
-
type: oci:identity:tag:value
行を追加します。ノート
コンソールでタグ値を事前移入するには、Terraform構成から値にアクセスします。たとえば、Terraform構成のmain.tf
ファイルに次のコードを追加します。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 }
タグ付けコントロールのイメージの例:
タグ付けコントロールの宣言の例:
tag_value:
type: oci:identity:tag:value
title: Tags
required: true
依存関係に基づく値を変数に動的に事前移入するには:
- 行
type: <supported-type>
およびdependsOn: <other_variable>
を追加します。<supported-type>は、「サポートされているタイプ(動的事前移入および制御)」にリストされているタイプです。
動的に事前移入される変数のイメージの例:
動的に事前移入される変数の宣言の例:
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: ""
プライベート・エンドポイントの宣言の例:
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}
コンパートメントに応じたVCNの宣言の例(コンパートメントと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}
イメージの宣言1の例。イメージはコンパートメントのみに依存します(1つの必須のdependsOn
フィールド)。
instance_image:
title: Image
description: Image
type: oci:core:image:id
required: true
dependsOn:
compartmentId: ${compartment_ocid}
イメージの宣言2の例。イメージはコンパートメント、オペレーティング・システム、オペレーティング・システムのバージョンおよびシェイプに依存します。
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>"
変数の列挙値をレンダリングするには(1つの値を選択可能)、次のようにします。
type: enum
行を追加し、enum
ブロックを追加します。
単一の値を選択できる列挙値を持つ変数のイメージの例:
列挙値を持つ変数の宣言の例:
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
変数の列挙値をレンダリングする(複数の値を選択できる)には:
type: enum
行を追加し、enum
ブロックを追加します。additionalProps:
行を追加し、allowMultiple:true
ブロックを追加します。
複数の値を選択できる列挙値を持つ変数のイメージの例:
列挙値を持つ変数の宣言の例(複数値の選択):
attachment_type:
type: enum
title: "Attachment type"
additionalProps:
allowMultiple: true
default: "iscsi"
# enumerated values (multiple value selection)
enum:
- "iscsi"
- "paravirtualized"
グループは、グループの構成変数よりも優先度が高くなります。たとえば、表示されないグループ内で変数が表示される場合、グループ全体は表示されません。
サポートされている操作:
and
eq
(等しい)ge
(以上)gt
(より大きい)le
(以下)lt
(未満)not
or
visible: <other_variable>
行を追加します。
変数「既存のボールトを使用しますか。」の例。その表示は、変数「ボールト・サポートを有効にしますか。」のユーザー選択によって異なります:
「ファンクションおよびAPIゲートウェイのプロビジョニング?」チェック・ボックス(enable_functions_apigateway
)が選択されている場合にのみ、「アプリケーション名」および「APIゲートウェイ名」フィールド(functions_app_name
およびapigateway_name
)を示す宣言の例:
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
type: password
行を追加します。
confirmation: true
行を追加します。
確認が必要なパスワード変数のイメージの例:
確認が必要なパスワード変数の宣言の例:
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
変数の値を要求するには:
required: true
行を追加します。
検証警告付きの必須変数のイメージの例:
必須変数の宣言の例:
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: ""
正規表現パターンに対して変数に入力された値を検証するには:
pattern: <regular-expression>
行を追加します。<regular-expression>は、検証する値に固有の検証パターンです。
ハイパーリンク・パターンの例:
^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$
入力した値に対する検証エラーのイメージの例:
検証パターンを持つ変数の宣言の例:
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
機密マーク付き変数の出力は、「アプリケーション情報」タブに「ロック解除」オプションを含む<sensitive>と表示されます。このタブは、「ジョブ詳細」および「スタック詳細」ページに表示されます。
「アプリケーション情報」タブの機密マーク付き変数(生成されたSSH秘密キー)のイメージの例:
Terraform機密引数の詳細は、「機密- CLI出力での値の抑制」を参照してください。
変数を機密としてマークするには:
sensitive: true
行を追加します。
機密マーク付き変数の宣言の例:
ssh_private_key:
title: Generated SSH private key
# marks variable as sensitive
sensitive: true
Terraform構成から作成されたスタックの「アプリケーション情報」タブを表示するには:
- スキーマ
title
およびdescription
の行を追加します。 - オプションで、青い情報テキスト・ボックス
informationalText
の行を追加します。 outputs
セクションに、outputGroups
を使用してグループ化した出力を少なくとも1つ追加します(オプション)。
- タイプを設定します。
type: copyableString
行を追加します。
「アプリケーション情報」タブのイメージの例:
スキーマ・タイトル、説明および出力の宣言の例:
# 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
コンソール項目との対話方法
この項では、Oracle Cloud Infrastructure Consoleでスタック情報のスキーマ制御表示を操作する方法について説明します。
スタック情報は、スタックを作成するためのTerraform構成に含めるスキーマ・ドキュメント(ある場合)の影響を受けます。スキーマ・ドキュメントは、スタック作成時の変数の外観と動作、および作成されたスタックの「アプリケーション情報」タブに表示されるテキストに影響します。
「アプリケーション情報」タブの「ロック解除」オプションは、機密マーク付き変数を示します。このオプションは、「ロック解除」と「ロック」を切り替えます。
- 値を表示するには、「ロック解除」を選択します。
- 値を非表示にするには、「ロック」を選択します。
「アプリケーション情報」タブの機密マーク付き変数(生成されたSSH秘密キー)のイメージの例: