Terraform EC2(인스턴스) 삭제

[Tool]Terraform EC2삭제

EC2삭제 예시(CentOS 2016.2.15기준)

  • *.tfstate파일에 기재되어 있는 Instance를 삭제(terraform으로 생성한 EC2삭제)

$ terraform destroy

Do you really want to destroy?
  Terraform will delete all your managed infrastructure.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes  # <--- yes는 수동으로 입력

aws_instance.example: Refreshing state... (ID: i-37ce5cb8)
aws_instance.example: Destroying...
aws_instance.example: Destruction complete

Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
  • AWS Console에서 확인해보면 Teminate로 처리된 것을 확인 할 수 있다.

댓글