MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

Terraform Errors: Error: updating EC2 InstanceTerraform Errors:

Uncategorized
Terraform will perform the following actions:

  # aws_instance.example-list will be updated in-place
  ~ resource "aws_instance" "example-list" {
        id                                   = "i-0e0f189eb341d211f"
        tags                                 = {}
      ~ vpc_security_group_ids               = [
          - "sg-0541801a7a059ba17",
          + "default",
        ]
        # (30 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
aws_instance.example-list: Modifying... [id=i-0e0f189eb341d211f]
╷
│ Error: updating EC2 Instance (i-0e0f189eb341d211f): modifying network interface: InvalidGroup.NotFound: The security group 'default' does not exist
│       status code: 400, request id: 0aaeef89-d273-470f-9a39-9e298de841c9
│
│   with aws_instance.example-list,
│   on list.tf line 7, in resource "aws_instance" "example-list":
│    7: resource "aws_instance" "example-list" {
│
╵

Answer

USE Security Group ID instead of Security Group Name.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x