0
0

More than 1 year has passed since last update.

terraform 学習議事録1

Posted at

terraformとは

コード化された構築設定に従って自動で任意のクラウド環境に対してデプロイしてくれるツール
aws,Google Cloud Azure複数のクラウドサービスに対応
image.png

最初に何するか

1.aws cliインストール
※ユーザーが必要
image.png

aws configureでアクセスキー、シークレットキーを設定
内容はユーザー/.aws/credentialsに配置
terraform用IAMユーザーを作成すること

terraformのインストール

tfenv(バージョン管理ツール)をインストール
brew install tfenv

tfenv list-remote
tfenv isntall
tfenv use

動作確認
terraform version

VSCodeにプラグインインストール

HashiCorp Terraform
シンタックスハイライト、コード補完を行えるようになる

EC2を起動

main.tf
image.png

インスタンスが立ち上がる(画像は立ち上げた後にdestroyした画像)
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0