{"action":"opened","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/130","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/130/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/130/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/130","id":235619558,"number":130,"title":"provider/aws: confusing error message for malformed vpc_security_group_ids on aws_instance","user":{"login":"hashibot","id":26720499,"avatar_url":"https://avatars2.githubusercontent.com/u/26720499?v=3","gravatar_id":"","url":"https://api.github.com/users/hashibot","html_url":"https://github.com/hashibot","followers_url":"https://api.github.com/users/hashibot/followers","following_url":"https://api.github.com/users/hashibot/following{/other_user}","gists_url":"https://api.github.com/users/hashibot/gists{/gist_id}","starred_url":"https://api.github.com/users/hashibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashibot/subscriptions","organizations_url":"https://api.github.com/users/hashibot/orgs","repos_url":"https://api.github.com/users/hashibot/repos","events_url":"https://api.github.com/users/hashibot/events{/privacy}","received_events_url":"https://api.github.com/users/hashibot/received_events","type":"User","site_admin":false},"labels":[{"id":620316239,"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/bug","name":"bug","color":"e99695","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-13T16:52:36Z","updated_at":"2017-06-13T16:52:36Z","closed_at":null,"body":"_This issue was originally opened by @thebenwaters as hashicorp/terraform#5998. It was migrated here as part of the [provider split](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/). The original body of the issue is below._\r\n\r\n<hr>\r\n\r\n```\nbenwaters@XXX $ terraform --version\nTerraform v0.6.14\n```\n\n```\n* aws_instance.vpn_nat: Error launching source instance: InvalidParameterCombination: The parameter groupName cannot be used with the parameter subnet\n        status code: 400, request id:\n```\n\n```\nmodule.ops.aws_instance.vpn_nat: Creating...\n  ami:                                       \"\" => \"ami-91d717d5\"\n  availability_zone:                         \"\" => \"XXXX\"\n  disable_api_termination:                   \"\" => \"1\"\n  ebs_block_device.#:                        \"\" => \"<computed>\"\n  ephemeral_block_device.#:                  \"\" => \"<computed>\"\n  instance_initiated_shutdown_behavior:      \"\" => \"stop\"\n  instance_state:                            \"\" => \"<computed>\"\n  instance_type:                             \"\" => \"m1.small\"\n  key_name:                                  \"\" => \"XXXX\"\n  placement_group:                           \"\" => \"<computed>\"\n  private_dns:                               \"\" => \"<computed>\"\n  private_ip:                                \"\" => \"<computed>\"\n  public_dns:                                \"\" => \"<computed>\"\n  public_ip:                                 \"\" => \"<computed>\"\n  root_block_device.#:                       \"\" => \"1\"\n  root_block_device.0.delete_on_termination: \"\" => \"0\"\n  root_block_device.0.iops:                  \"\" => \"<computed>\"\n  root_block_device.0.volume_size:           \"\" => \"40\"\n  root_block_device.0.volume_type:           \"\" => \"gp2\"\n  security_groups.#:                         \"\" => \"<computed>\"\n  source_dest_check:                         \"\" => \"0\"\n  subnet_id:                                 \"\" => \"subnet-xxxx\"\n  tags.#:                                    \"\" => \"2\"\n  tags.Environment:                          \"\" => \"operations\"\n  tags.Name:                                 \"\" => \"xxx-vpn-nat\"\n  tenancy:                                   \"\" => \"dedicated\"\n  vpc_security_group_ids.#:                  \"\" => \"1\"\n  vpc_security_group_ids.2861944429:         \"\" => \"{aws_security_group.vpn_nat.id}\"\n```\n\nAnd here's the resource\n\n```\nresource \"aws_instance\" \"vpn_nat\" {\n    ami = \"${var.ubuntu_ami}\"\n    instance_type = \"${var.vpn_size}\"\n    availability_zone = \"${var.vpn_az}\"\n    tenancy = \"dedicated\"\n    disable_api_termination  = true\n    instance_initiated_shutdown_behavior = \"stop\"\n    key_name = \"${xxxxx}\"\n    vpc_security_group_ids = [\"{aws_security_group.vpn-sg.id}\"]\n    subnet_id = \"${aws_subnet.operations_public_instances.id}\"\n    source_dest_check = false\n    root_block_device {\n        volume_type = \"gp2\"\n        volume_size = 40\n        delete_on_termination = false\n    }\n\n    tags = {\n        Environment = \"operations\"\n        Name = \"XXXt\"\n\n    }\n}\n```\n\nsecurity group\n\n```\nresource \"aws_security_group\" \"vpn-sg\" {\n  tags {\n    Name = \"sg-vpn-nat\"\n    Environment = \"all\"\n  }\n\n  name = \"xxxxxxx\"\n  description = \"Security group to allow VPN and SSH traffic into instance\"\n  vpc_id = \"${aws_vpc.operations.id}\"\n\nBLAH\n}\n```\n\nRan with debug and this was the API request made\n\n```\nAction=RunInstances&BlockDeviceMapping.1.DeviceName=%2Fdev%2Fsda1&BlockDeviceMapping.1.Ebs.DeleteOnTermination=false&BlockDeviceMapping.1.Ebs.VolumeSize=40&BlockDeviceMapping.1.Ebs.VolumeType=gp2&DisableApiTermination=true&EbsOptimized=false&IamInstanceProfile.Name=&ImageId=ami-91d717d5&InstanceInitiatedShutdownBehavior=stop&InstanceType=m1.small&KeyName=XXX&MaxCount=1&MinCount=1&Monitoring.Enabled=false&Placement.AvailabilityZone=XXXXX&Placement.GroupName=&Placement.Tenancy=dedicated&SecurityGroupId.1=%7Baws_security_group.vpn_nat.id%7D&SubnetId=subnet-xxxxx&UserData=&Version=2015-10-01\n```\n"}}
{"actor":{"display_login":"hashibot"}}