Slide 4
Slide 4 text
Introduction
Terraformとは
Terraformで書いたコードに対してplan/applyコマンドを実行することで、実際にどのようなリソー
スが作成される予定か確認・デプロイ作業を行うことができます。
resource "aws_instance“ “hello” {
count = 2
type = t2.micro
}
provider "aws" {
profile = “default”
region = "ap-northeast-1"
}
コードの作成 planの実行 applyの実行
$ terraform plan
Terraform will perform the following
actions:
# aws_instance.hello will be created
(中略)
Plan: 1 to add, 0 to change, 0 to destroy
$ terraform apply
(中略)
Enter a value: yes
aws_instance.hello: Creating...
(中略)
Apply complete! Resource: 1 added,
0 changed, 0 destroyed