linuxacademy / content-hashicorp-certified-terraform-associate-foundations

Hashicorp Certified Terraform Associate: Foundations, Moosa Khalid, Sep 20
161 stars 570 forks source link

Use vpc_security_group_ids for instance #1

Open BusiPlay opened 2 years ago

BusiPlay commented 2 years ago

Per the note in https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#security_groups, when creating Instances in a VPC, use vpc_security_group_ids instead. Otherwise Terraform plan/apply post the initial apply deletes and recreates the instance.