次の方法で共有


az terraform

Note

このリファレンスは、Azure CLI (バージョン 2.61.0 以降) の Terraform 拡張機能の一部です。 拡張機能は、 az terraform コマンドを初めて実行するときに自動的にインストールされます。 拡張機能の詳細については、 を参照してください。

このコマンド グループはプレビュー段階であり、開発中です。 参照レベルとサポート レベル: https://aka.ms/CLI_refstatus

Azure Terraform エクスペリエンス。

コマンド

名前 説明 状態
az terraform export-terraform

指定したリソースの Terraform 構成をエクスポートします。

Extension Preview

az terraform export-terraform

プレビュー

コマンド グループ 'az terraform' はプレビュー段階であり、開発中です。 参照レベルとサポート レベル: https://aka.ms/CLI_refstatus

指定したリソースの Terraform 構成をエクスポートします。

az terraform export-terraform [--export-query]
                              [--export-resource]
                              [--export-resource-group]
                              [--full-properties {0, 1, f, false, n, no, t, true, y, yes}]
                              [--mask-sensitive {0, 1, f, false, n, no, t, true, y, yes}]
                              [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                              [--target-provider {azapi, azurerm}]

'azurerm' プロバイダーを対象とするリソース グループをエクスポートする

az terraform export-terraform --export-resource-group '{resource-group-name:my-rg}'

'azapi' プロバイダーを対象とするリソースの一覧をエクスポートする

az terraform export-terraform --full-properties false --target-provider azapi --export-resource '{resource-ids:[id1,id2,id3]}'

"azapi" プロバイダーを対象とする子リソース (サブネットなど) と共に、現在のサブスクリプション内のすべての仮想ネットワークをエクスポートします

az terraform export-terraform --full-properties false --target-provider azapi --export-query "{query:'type =~ \"microsoft.network/virtualnetworks\"',recursive:true}"

省略可能のパラメーター

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--export-query

ARG によって照会されたリソースのエクスポート パラメーター (Azure Resource Graph)。 短縮構文、json-file、yaml-file をサポートします。 詳細を表示するには、"??" を試してください。

プロパティ
Parameter group: ExportParameter Arguments
--export-resource

個々のリソースのエクスポート パラメーター。 短縮構文、json-file、yaml-file をサポートします。 詳細を表示するには、"??" を試してください。

プロパティ
Parameter group: ExportParameter Arguments
--export-resource-group

リソース グループのエクスポート パラメーター。 短縮構文、json-file、yaml-file をサポートします。 詳細を表示するには、"??" を試してください。

プロパティ
Parameter group: ExportParameter Arguments
--full-properties

生成された Terraform 構成内のすべての計算されていないプロパティを出力するかどうか。 これはおそらく、有効にするために手動で変更する必要があります。

プロパティ
Parameter group: ExportParameter Arguments
規定値: True
指定可能な値: 0, 1, f, false, n, no, t, true, y, yes
--mask-sensitive

Terraform 構成で機密性の高い属性をマスクします。

プロパティ
Parameter group: ExportParameter Arguments
規定値: True
指定可能な値: 0, 1, f, false, n, no, t, true, y, yes
--no-wait

実行時間の長い操作が完了するまで待つ必要はありません。

プロパティ
指定可能な値: 0, 1, f, false, n, no, t, true, y, yes
--target-provider

ターゲットの Azure Terraform プロバイダー。

プロパティ
Parameter group: ExportParameter Arguments
規定値: azurerm
指定可能な値: azapi, azurerm
グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

プロパティ
規定値: False
--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

プロパティ
規定値: False
--output -o

出力フォーマット。

プロパティ
規定値: json
指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

プロパティ
規定値: False