1

How do i edit the ingress and egress and also the tags of the default security group within AWS VPN created by Terraform

What i have tried:

 resource "aws_security_group" "default" {
   name        = "default"
   description = "default VPC security group"
   vpc_id = "${aws_vpc.default.id}"
   tags {
    Name = "Do Not Use"
  }
}

But i keep getting: Error creating Security Group: InvalidParameterValue: Cannot use reserved security group name: default

Any idea how can it be manipulated.

koby meir
  • 151
  • 7

1 Answers1

2

Since terraform version 0.74 there is a new resource type aws_default_security_group which allows you to manipulate the default security group.

You can read more here: https://www.terraform.io/docs/providers/aws/r/default_security_group.html

koby meir
  • 151
  • 7