Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TerraformではじめるInfrastructure as Code

Yusuke Yasuo
October 18, 2018
710

TerraformではじめるInfrastructure as Code

「JAWS-UG 初心者支部#14」のLT資料です。

Yusuke Yasuo

October 18, 2018
Tweet

Transcript

  1. ࣄલ४උ • IAMϢʔβʔͷ࡞੒ • AWS CLIΛར༻͢ΔͨΊͷIAMϢʔβʔΛ࡞੒͠ɺΞΫηεΩʔΛऔಘ͢Δ • AWS CLIͷηοτΞοϓ •

    $ aws configure Ͱೝূ৘ใΛηοτ͢Δ
 ※ ~/.aws/credentials ʹೝূ৘ใ͕อଘ͞Ε͍ͯΕ͹OK • terraformͷॳظԽ • $ terraform init
  2. ఆٛϑΝΠϧͷ࡞੒ provider "aws" { region = "ap-northeast-1" } resource "aws_db_instance"

    "default" { allocated_storage = 10 storage_type = "gp2" engine = "mysql" engine_version = "5.7" instance_class = "db.t2.micro" name = "mydb" username = "foo" password = "foobarbaz" parameter_group_name = "default.mysql5.7" } rds.tf