nginx in ../../../modules/nginx Initializing provider plugins... - Finding kreuzwerker/docker versions matching "~> 4.0.0"... - Installing kreuzwerker/docker v4.0.0... … Terraform has created a lock file .terraform.lock.hcl to record the provider selections it made above. … Terraform has been successfully initialized! 自動生成され、 選定したプロバイダーの情報を記録 You may now begin working with Terraform. Try running "terraform plan" to see any changes that are required for your infrastructure. All Terraform commands should now work. … 163
following execution plan. Resource actions are indicated with the following symbols: “nginx” module の + create “nginx” という名前の “docker_container” resource を構築 Terraform will perform the following actions: # module.nginx.docker_container.nginx will be created + resource "docker_container" "nginx" { + attach = false … } # module.nginx.docker_image.nginx will be created + resource "docker_image" "nginx" { + id = (known after apply) “nginx” module の “nginx” という名前の … “docker_image” resource を構築 } Plan: 2 to add, 0 to change, 0 to destroy. 165
following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # module.nginx.docker_container.nginx will be created plan と同じように作成するステップが走る + resource "docker_container" "nginx" { + attach = false … } # module.nginx.docker_image.nginx will be created + resource "docker_image" "nginx" { 本来は承認ステップが入る + id = (known after apply) ... } Plan: 2 to add, 0 to change, 0 to destroy. module.nginx.docker_image.nginx: Creating... module.nginx.docker_image.nginx: Creation complete after 6s 対象のリソースが作成される [id=sha256:2c9168b3c9a84851f91e03534dc4136951e9f581ab3ac8ee38b28b49ad57ba38nginx] module.nginx.docker_container.nginx: Creating... module.nginx.docker_container.nginx: Creation complete after 1s [id=9eee7200841c6b8b54153f20ce4f9eb1afffad6ba2d3f2c4c33d9aff6ebf8ed1] Apply complete! Resources: 2 added, 0 changed, 0 destroyed. 167
the following execution plan. Resource actions are indicated with the following symbols: - destroy Terraform will perform the following actions: リソースを破壊する際にどうなるかの記載 # module.nginx.docker_container.nginx will be destroyed - resource "docker_container" "nginx" { - attach = false -> null … } # module.nginx.docker_image.nginx will be destroyed 本来は承認ステップが入る - resource "docker_image" "nginx" { - id = "sha256:2c9168b3c9a84851f91e03534dc4136951e9f581ab3ac8ee38b28b49ad57ba38nginx" -> null … } Plan: 0 to add, 0 to change, 2 to destroy. module.nginx.docker_container.nginx: Destroying... [id=9eee7200841c6b8b54153f20ce4f9eb1afffad6ba2d3f2c4c33d9aff6ebf8ed1] 対象のリソースが破棄される module.nginx.docker_container.nginx: Destruction complete after 0s … [id=sha256:2c9168b3c9a84851f91e03534dc4136951e9f581ab3ac8ee38b28b49ad57ba38nginx] module.nginx.docker_image.nginx: Destruction complete after 0s Destroy complete! Resources: 2 destroyed. 169