このページでは、Cloud Shell とローカルシェルにCloud de Confiance 用の Terraform をインストールする手順について説明します。Cloud Shell は、 Cloud de Confiance用のインタラクティブなシェル環境です。 Cloud de Confiance を使用して学習とテストを行い、ウェブブラウザでプロジェクトやリソースを管理できます。
Cloud de Confianceで Terraform を使用する方法の入門ガイドについては、 Cloud de Confiance 用 Terraform のクイックスタートをご覧ください。
Cloud Shell
gcloud CLI と Terraform で設定済みのオンライン ターミナルを使用するには、Cloud Shell を有効にします。
このページの下部で Cloud Shell セッションが開始され、コマンドライン プロンプトが表示されます。セッションが初期化されるまで数秒かかることがあります。
次のコマンドを実行して、Terraform が使用可能であることを確認します。
terraform出力例を以下に示します。
Usage: terraform [global options] <subcommand> [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes required by the current configuration apply Create or update infrastructure destroy Destroy previously-created infrastructureCloud de Confianceで Terraform を使用するには、 Cloud de Confiance内で次のタスクが完了している必要があります。
- Cloud de Confiance プロジェクトを作成する、あるいはすでにプロジェクトがある。
- Cloud de Confiance プロジェクトの課金が有効にする。
- 使用するCloud de Confiance サービスの API を有効にする。
- Terraform の認証を設定する。
ローカルシェル
Terraform により提供されているインストール手順を参照します。
次のコマンドを実行して、Terraform が使用可能であることを確認します。
terraform出力例を以下に示します。
Usage: terraform [global options] <subcommand> [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes required by the current configuration apply Create or update infrastructure destroy Destroy previously-created infrastructureCloud de Confianceで Terraform を使用するには、 Cloud de Confiance内で次のタスクが完了している必要があります。
- Cloud de Confiance プロジェクトを作成する、あるいはすでにプロジェクトがある。
- Cloud de Confiance プロジェクトの課金が有効にする。
- 使用するCloud de Confiance サービスの API を有効にする。
- Terraform の認証を設定する。
次のステップ
- Terraform for Cloud de Confiance のクイックスタートを確認する。
- 基本的な Terraform コマンドについて学習する。