Commit Graph

392 Commits

Author SHA1 Message Date
Sander van Harmelen 9797881ed8 Updating the tests and refactoring the code a little
There was an error in the goamz package the prevented updating the
availability zones correctly. So PR #181 should be merged before this
one can be merged…
2014-12-16 15:21:25 +01:00
Sander van Harmelen 3aeba87e38 Updating the resource to use a set instead of a list
By using a set for the availability zones, you can use things like
`availability_zones = ["${aws_instance.web.*.availability_zone}"]`
where is very likely multiple of the same zones will be added to the
set. If you use a list here, the list will say it’s changed (even if
you add the same zone) which will force a new resource.
2014-12-16 13:13:59 +01:00
Sander van Harmelen 7e091dd7bd Merge pull request #677 from svanharmelen/f-provider-aws-fix-route53-toggling
provider/aws: fixing the flipflop problem for the aws_route53 resource
2014-12-16 11:22:54 +01:00
Sander van Harmelen a7667986f9 Updated the code so it makes use of the available functionality
The `helper/schema` package already knows how to create a set from a
slice with set items. So let’s use that functionality…
2014-12-16 11:14:33 +01:00
Mitchell Hashimoto 4f70630c52 Merge pull request #525 from pmoust/patch-2
provider/aws: update to support more regions
2014-12-15 16:40:35 -08:00
Sander van Harmelen 43a30e7d13 Finishing up the needed changes
Also executed the acceptance tests successfully now.
2014-12-16 00:59:47 +01:00
Sander van Harmelen ee7b33acf4 Fixing the flipflop problem
Actually meant as a PoC, but it works perfectly so let’s just merge
this…
2014-12-16 00:40:43 +01:00
Mitchell Hashimoto 6a663796d5 Merge pull request #663 from svanharmelen/f-fix/change-set-logic
core: refactoring the way sets work internally v2
2014-12-15 13:38:00 -08:00
Armon Dadgar 6098809ec5 Merge pull request #665 from gosuri/master
Fix for #664, crashed due to ig.Attachements being 0
2014-12-14 18:15:27 -08:00
Greg Osuri 9b9d147585 Setting the VPC id to blank for unattached igws 2014-12-14 14:05:38 -08:00
Sander van Harmelen 27a97c4498 Small gofmt update... 2014-12-14 12:32:17 +01:00
Sander van Harmelen d9af954c60 provider/aws: fixing the aws_internet_gateway resource
The resource is build so it can attach and detach the Internet Gateway
from a VPC, but as the schema has `Required` and `ForceNew` both set
to `true` for the vpc_id field it will never use these capabilities.
2014-12-14 12:20:59 +01:00
Greg Osuri 3883e47902 Fix for #664, crashed due to ig.Attachements being 0 2014-12-13 22:14:23 -08:00
Sander van Harmelen 83c760fcb3 core: refactoring the way sets work internally v2
This is a refactored solution for PR #616. Functionally this is still
the same change, but it’s implemented a lot cleaner with less code and
less changes to existing parts of TF.
2014-12-12 23:21:20 +01:00
Sander van Harmelen cc4710c952 Fixing up the tests so they actually pass
Running the tests without these changes results in this error first:

```
--- FAIL: TestAccAWSNetworkAclsOnlyIngressRulesChange (24.92 seconds)
  testing.go:121: Step 0 error: Check failed: Invalid number of ingress
entries found; count = %!s(int=3)
FAIL
exit status 1
FAIL  github.com/hashicorp/terraform/builtin/providers/aws  24.974s
```

And after fixing that one you also get a few unexpected values due to
an expected order mismatch between the items in the set versus the
items in the config.

Those are also fixed, so the test is passing now.
2014-12-12 13:25:44 +01:00
Armon Dadgar 7a3b4fa7ce Merge pull request #648 from yahyapo/master
Adding tag support to AWS EC2 route table resource.
2014-12-10 19:24:38 -08:00
Armon Dadgar 0ff62016ee provider/aws: Fixing ASG handling of not found 2014-12-10 13:27:11 -08:00
Armon Dadgar 633a08230e Merge pull request #638 from snehaso/tag_for_acl
[AWS] added tags for aws_network_acl
2014-12-10 12:59:22 -08:00
Armon Dadgar 9668c8292f Merge pull request #637 from snehaso/vpc_tenanct
[AWS] added vpc instance_tenancy
2014-12-10 12:58:50 -08:00
Armon Dadgar 8e32076d55 Merge pull request #635 from snehaso/cross_zone_lb
[AWS]  enabled cross zone load balancing
2014-12-10 10:55:54 -08:00
Yahya Poonawala b595c73d42 Adding tag support to AWS EC2 route table resource. 2014-12-11 00:03:13 +05:30
Sneha Somwanshi 5e3e8562fc added tags for aws_network_acl 2014-12-10 16:29:00 +05:30
Sneha Somwanshi 89f1a38f5b added vpc tenancy argument 2014-12-10 16:10:00 +05:30
Sneha Somwanshi 1d3e30b353 enabled cross zone load balancing 2014-12-10 12:49:43 +05:30
Armon Dadgar 82e60bb3cd Merge pull request #631 from snehaso/network_acl
aws_network_acl: return error if rule protocol is invalid
2014-12-09 09:07:44 -08:00
Sneha Somwanshi aad594aed3 aws_network_acl: return error if protocol is invalid 2014-12-08 16:53:05 +05:30
Armon Dadgar 38697d6b4c aws: Making security group ingress rules optional 2014-12-07 23:52:04 -08:00
Armon Dadgar fae29f4685 Merge pull request #506 from muralimadhu/master
Support termination policies in aws auto scaling group
2014-12-07 23:35:33 -08:00
Armon Dadgar 03d4a425b6 Merge pull request #623 from snehaso/network_acl
[AWS] added new resource aws_network_acl
2014-12-07 23:09:51 -08:00
Sneha Somwanshi 4b154b8fe7 Fixed update of ingress/egress rules 2014-12-08 11:00:55 +05:30
Armon Dadgar 7182e5618e Merge pull request #612 from MerlinDMC/feature/aws_block_device_virtual_name
allow setting the block device virtual_name
2014-12-03 12:08:07 -08:00
Armon Dadgar a2c8859f04 Merge pull request #615 from Banno/fix-aws-instance-block-devices-index-range
fixing array length for aws instance volumes
2014-12-03 12:00:31 -08:00
Sneha Somwanshi c79e6ba08b handled subnet and network acl association 2014-12-03 16:37:50 +05:30
Sneha Somwanshi 86aafdb839 test for tenancy schema 2014-12-03 15:58:51 +05:30
Sneha Somwanshi cd0f9761da rearranged the tests 2014-12-01 14:19:39 +05:30
Luke Amdor f3ff4bece8 fixing array length for aws instance volumes 2014-11-30 08:24:23 -06:00
Sneha Somwanshi 5eec8a531c Added CRUD operations for network acl 2014-11-30 17:10:54 +05:30
Sneha Somwanshi d4a887278e flatten/expand operations for network_acl 2014-11-30 17:09:37 +05:30
Sneha Somwanshi bd9e9ec0c4 Add support for network acls 2014-11-26 19:14:02 +05:30
Sneha Somwanshi dca2d9aa4c acceptance test for creating network acl 2014-11-26 19:12:59 +05:30
Sneha Somwanshi cebea04cce added provider for aws_network_acl 2014-11-26 19:12:39 +05:30
Sneha Somwanshi f63e032c23 Merge remote-tracking branch 'upstream/master' 2014-11-26 17:06:42 +05:30
Armon Dadgar ccf7f40711 Merge pull request #596 from svanharmelen/f-refactor-aws-provider
provider/aws: refactor to use the schema.Provider approach
2014-11-24 16:30:41 -08:00
Sander van Harmelen d3e1a6678d Making some last tweaks and fixing some acc tests 2014-11-24 21:22:18 +01:00
Seth Vargo eb729d17c7 Merge pull request #546 from tmtk75/dev/enable-associate-public-ip
support associate_public_ip_address for aws_launch_configuration
2014-11-24 09:58:26 -05:00
Sander van Harmelen 0725486e89 Refactored the last two resources 2014-11-24 14:04:48 +01:00
Tomotaka Sakuma db8256a4a7 add associate_public_ip_address attr to the acceptance test of aws_launch_configuration 2014-11-24 13:27:41 +09:00
Daniel Malon 1e3065ae11 allow setting the block device virtual_name 2014-11-22 09:50:22 +00:00
Sander van Harmelen eccd5ad308 Refactored about 90%
Still need to update 2 resources and check the acceptance tests, but
overall we’re nearly there 😃
2014-11-21 17:58:34 +01:00
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