terraform/builtin/providers/aws
Daniel Farina 67b03247ec Make Routes in RouteTable optional
Otherwise it is impossible to get simple configurations with the
"default" routing table, which is only the "local" route.

The following contents of main.tf expose the bug, and boots an instance
fine after this patch is applied:

    variable aws_access_key {}
    variable aws_secret_key {}
    variable aws_ubuntu_ami {}

    provider "aws" {
        access_key = "${var.aws_access_key}"
        secret_key = "${var.aws_secret_key}"
        region = "us-east-1"
    }

    resource "aws_vpc" "default" {
        cidr_block = "10.0.0.0/20"
    }

    resource "aws_route_table" "private" {
        vpc_id = "${aws_vpc.default.id}"
        # Note the lack of "route" sub-key here.
    }

    resource "aws_subnet" "private" {
        vpc_id = "${aws_vpc.default.id}"
        cidr_block = "10.0.1.0/24"
    }

    resource "aws_route_table_association" "private" {
        subnet_id = "${aws_subnet.private.id}"
        route_table_id = "${aws_route_table.private.id}"
    }

    # Demonstrate an instance can be booted fine in this fashion.
    resource "aws_instance" "sample" {
        ami = "${var.aws_ubuntu_ami}"
        instance_type = "t2.micro"
        subnet_id = "${aws_subnet.private.id}"
    }

terraform.tfvars for completeness:

    aws_access_key = "..."
    aws_secret_key = "..."

    # A public Trusty AMI
    aws_ubuntu_ami = "ami-9aaa1cf2"
2014-11-19 22:04:44 -08:00
..
config.go Add AWS region validation 2014-07-30 00:22:37 +02:00
provider.go provider/aws: Fixing merge conflict 2014-11-19 17:17:18 -08:00
provider_test.go providers/aws: create an empty schema.Provider 2014-08-19 15:40:48 -07:00
resource_aws_autoscaling_group.go providers/aws: drain autoscale groups before deleting [GH-435] 2014-10-17 20:11:00 -07:00
resource_aws_autoscaling_group_test.go Fix build breaks from latest goamz 2014-10-17 00:53:54 -04:00
resource_aws_db_instance.go Upped the RDS instance creation/destroy timeout to 20 minutes as it regularly takes 12+ minutes to create 2014-11-05 11:03:06 -08:00
resource_aws_db_instance_test.go Added new aws_db_parameter_group resource for creating RDS DB Parameter Groups. 2014-11-05 11:03:06 -08:00
resource_aws_db_parameter_group.go Fixed bug with final_snapshot_identifier and skip_final_snapshot and removed apply_method as an option for now and am only supporting immediate mode 2014-11-05 11:03:06 -08:00
resource_aws_db_parameter_group_test.go Fixed bug with final_snapshot_identifier and skip_final_snapshot and removed apply_method as an option for now and am only supporting immediate mode 2014-11-05 11:03:06 -08:00
resource_aws_db_security_group.go ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
resource_aws_db_security_group_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_db_subnet_group.go AWS DB Subnet Group resource and testing 2014-09-15 14:58:04 -04:00
resource_aws_db_subnet_group_test.go providers/aws: fix some broken tests 2014-09-22 08:57:17 -07:00
resource_aws_eip.go providers/aws: disassociate EIP before destroying 2014-10-18 15:32:33 -07:00
resource_aws_eip_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_elb.go providers/aws: ELB should treat subest as a set 2014-10-20 16:32:38 -07:00
resource_aws_elb_test.go Add listener.ssl_certificate_id support to AWS ELB (@jpadvo [GH-176]) 2014-10-02 05:19:36 +03:00
resource_aws_instance.go added block_device attribute 2014-10-17 12:12:45 -04:00
resource_aws_instance_test.go tests for aws instance block_device 2014-10-31 16:25:16 -04:00
resource_aws_internet_gateway.go providers/aws: retry destroying internet gateway for some time [GH-447] 2014-10-18 11:47:33 +03:00
resource_aws_internet_gateway_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_launch_configuration.go providers/aws: if LC not found, delete it [GH-421] 2014-10-17 20:21:18 -07:00
resource_aws_launch_configuration_test.go providers/aws: launch configuration in helper/schema 2014-10-10 14:50:23 -07:00
resource_aws_route53_record.go providers/aws: not an error if route53 record is already destroy 2014-10-07 21:55:40 -07:00
resource_aws_route53_record_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_route53_zone.go providers/aws: Route53 decrease MinTimeout interval 2014-11-13 17:52:10 +02:00
resource_aws_route53_zone_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_route_table.go ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
resource_aws_route_table_association.go ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
resource_aws_route_table_association_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_route_table_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_s3_bucket.go ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
resource_aws_s3_bucket_test.go providers/aws: tests passing, compiles 2014-09-16 17:49:24 -07:00
resource_aws_security_group.go helper/schema: diffs for sets should include the full set [GH-457] 2014-10-21 10:49:53 -07:00
resource_aws_security_group_test.go Added security group tagging 2014-10-14 17:11:09 -04:00
resource_aws_subnet.go Add tag support to AWS subnets 2014-11-02 12:30:33 -08:00
resource_aws_subnet_test.go Merge branch 'f-state' 2014-09-22 08:55:44 -07:00
resource_aws_vpc.go providers/aws: main_route_table_id attribute for VPC [GH-193] 2014-10-10 16:57:32 -07:00
resource_aws_vpc_test.go providers/aws: test tag removal 2014-10-08 18:21:21 -07:00
resource_provider.go providers/*: fix compilation for input 2014-09-29 10:28:08 -07:00
resource_provider_test.go providers/aws: subnet retry destroy [GH-357] 2014-10-07 21:52:08 -07:00
resources.go Make Routes in RouteTable optional 2014-11-19 22:04:44 -08:00
structure.go Fixed bug with final_snapshot_identifier and skip_final_snapshot and removed apply_method as an option for now and am only supporting immediate mode 2014-11-05 11:03:06 -08:00
structure_test.go Fixed bug with final_snapshot_identifier and skip_final_snapshot and removed apply_method as an option for now and am only supporting immediate mode 2014-11-05 11:03:06 -08:00
tags.go providers/aws: should delete tags that are changing in-place 2014-10-09 10:47:33 -07:00
tags_test.go argument and verb formatting fixes reported by go vet 2014-11-02 13:56:44 +01:00