Commit Graph

777 Commits

Author SHA1 Message Date
Sander van Harmelen 8e7ffc24a5 Merge pull request #823 from svanharmelen/f-provider/cloudstack-managed-fw
provider/cloudstack: managed fw and adding/updating docs
2015-01-16 17:53:42 +01:00
Mitchell Hashimoto 61e91017be Merge pull request #804 from PeoplePerHour/f-aws-elb-subnet
providers/aws: elb subnet change should not force a new resource
2015-01-16 08:33:32 -08:00
Panagiotis Moustafellos a49f1b5dd8 epic typo 2015-01-16 16:07:55 +02:00
Sander van Harmelen 8f223c020b Extending the managed firewall option
It’s now also possible to don’t give any rules, when the firewall is
configured with `managed = true`. This will in effect mean; make sure
no rules exist at all for the firewall.
2015-01-16 13:26:43 +01:00
Sander van Harmelen ab8977eed6 Last tweaks needed to get through all acc tests
Needed to tweak a few things in order get all tests running OK and to
be able to handle the latest changes in master. All is good again now…
2015-01-15 21:46:06 +01:00
Panagiotis Moustafellos cedf3a9415 providers/aws: elb subnet change acceptance test
add listeners

add orig subnet
2015-01-15 16:02:47 +02:00
Sander van Harmelen 19776ba402 Updating some logic and tests
These fixes are needed to make the provider work with master again.
These are still some issues, but they seem not to be related to the
provider, but the changes in `helper/schema`.
2015-01-15 11:29:04 +01:00
Sander van Harmelen 3898098c78 Adding the ability to manage the whole firewall
This goes for the normal firewall, the egress firewall and the network
ACL.

USE WITH CAUTION! When setting `managed = true` in your config, it
means it will delete all firewall rules that are not in your config, so
unknown to TF.

Also adding the new `cloudstack_egress_firewall` resource with this
commit and updating go-cloudstack to the latest API version (v4.4)
2015-01-15 10:04:09 +01:00
Panagiotis Moustafellos c963793f3d providers/aws: elb subnet change should not force a new resource 2015-01-15 10:43:26 +02:00
Emil Hessman 335d8fa1e6 builtin/providers/cloudstack: fix err checks in tests
Wrong return value is used to determine if an error occured.
Make sure to check the actual Error value that the functions return.
2015-01-14 19:54:29 +01:00
Sander van Harmelen fa1b3c88d8 Fix conversion error
This causes a crash of the provider
2015-01-13 08:55:47 +01:00
Sander van Harmelen 7b16c44cc2 provider/cloudstack: make timeout configurable
Seems some platforms need more time, so make it configurable with a
sane default…
2015-01-12 15:57:24 +01:00
Sander van Harmelen 9cf0c44247 provider/cloudstack: fixing the cloudstack_disk provider
This value is read back from the environment to the state, without
setting this to `Computed: true` it will see the read back value as a
diff.
2015-01-12 15:04:58 +01:00
Mitchell Hashimoto 08813e6571 Merge branch 'add-ig-tags' of https://github.com/robzienert/terraform into robzienert-add-ig-tags
Conflicts:
	builtin/providers/aws/resource_aws_internet_gateway_test.go
2015-01-10 15:28:14 -08:00
Paul Hinze f800441fe1 provider/aws: fix aws_db_instance acceptance tests
- 5.6.17 is no longer a valid mysql engine version, bumping to 5.6.21
- updating security_group_names assertion to match new set structure
  introduce in #663
2015-01-10 15:55:08 -06:00
Ryan Uber 94c3acbca6 Switch to github.com/hashicorp/consul/api 2015-01-06 17:11:29 -08:00
Mitchell Hashimoto cc0ee4a6bb Merge pull request #731 from atlassian/tags
providers/aws: make tags not computed
2015-01-06 15:38:35 -08:00
Armon Dadgar eef75a7a2a Merge pull request #695 from moredip/aws_key_pair-resource
add aws_key_pair resource
2015-01-06 10:46:58 -08:00
Armon Dadgar 0ffc11c885 Merge pull request #704 from yahyapo/master
[AWS] Adding default network ACL ID and default security group ID to VPC reference attributes
2015-01-06 10:29:16 -08:00
Armon Dadgar 11dc775c25 Merge pull request #701 from ceh/issue-687
builtin/providers/aws: acceptance tests for assigning private IPs on AWS instance
2015-01-05 11:41:15 -08:00
Armon Dadgar 34d5464c63 Merge pull request #725 from jgoldschrafe/feature-google-compute-service-accounts
Support service accounts on GCE instances
2015-01-05 11:30:38 -08:00
Armon Dadgar 150da4720f Merge pull request #724 from frodenas/google_ubuntu_images
provider/google: Add Ubuntu images
2015-01-05 11:27:07 -08:00
Sander van Harmelen 54ab857a54 Merge pull request #728 from atlassian/route_diff_fix
Route diff fix
2015-01-05 10:43:02 +01:00
Sander van Harmelen 7106917e98 Merge pull request #726 from atlassian/vgw_routes
Vgw routes
2015-01-05 10:39:42 +01:00
Emil Hessman c738bf0477 builtin/providers/aws: remove unreachable code and skip unnecessary remote call
When DeleteInternetGateway is successful it returns a nil error value.
However, for a nil error value, the RetryFunc returns an error yielding a
unnecessary second call to DeleteInternetGateway in the retry logic.

The logic works because DeleteInternetGateway eventually returns an ec2.Error
with error code InvalidInternetGatewayID.NotFound since the internet gateway
has been deleted in the previous call. The return value of nil breaks the
retry logic and the deletion is deemed successful.

Fix the unnecessary second call to DeleteInternetGateway by short circuiting
with a nil error value when deletion of the internet gateway is successful on
the first try.

Add an acceptance test for internet gateway deletion and remove unreachable
code while here.
2015-01-03 21:56:44 +01:00
Otto Jongerius eb1776c7e3 "Computed" should be false 2015-01-03 18:33:18 +11:00
Otto Jongerius 66159fd008 ignore routes originating from vgws 2015-01-02 19:17:52 +11:00
Otto Jongerius f6385215f6 Merge branch 'master' into route_diff_fix 2015-01-02 19:08:53 +11:00
Otto Jongerius 9bdb2fb2d1 This change belongs in a branch 2015-01-02 19:08:33 +11:00
Otto Jongerius 19c6d04928 Do store potentially empty values. Failing to do so will generate different hashes for identical route(s). 2015-01-02 19:03:13 +11:00
Jeff Goldschrafe d3081e0da8 Support service accounts on GCE instances
Update the Google Compute Engine provider to add support for service
accounts on `google_compute_instance`. Both gcloud shorthand (`compute-ro`,
`storage-ro`, etc.) and OAuth2 API endpoints are supported.

This feature is currently limited to a single service account (supporting
multiple scopes) and an automatically-generated service account email.
2015-01-02 01:25:19 -05:00
Ferran Rodenas fc0902d230 provider/google: Add Ubuntu images
Ubuntu images are now GA, so add them to the list of available public images
2014-12-31 03:16:52 -08:00
Otto Jongerius 639e0c72b4 ignore routes originating from vgws 2014-12-31 10:23:34 +11:00
Rob Zienert 186af0bbb3 Changing AWS ELB to not ForceNew when listeners change 2014-12-27 22:33:33 -06:00
Rob Zienert 9fd59f09e2 Adding tags support to Internet Gateway resource 2014-12-27 22:05:15 -06:00
Sander van Harmelen 852e2f74ca Fixing aws_elb schema
If not suppling the `availability_zones`, they will be computed
(meaning an update/refresh will retrieve the info and update the values
to the state file).

So without the `Computed = true` the diff will always flag this as a
change, even when it’s not.
2014-12-25 23:12:54 +01:00
Sander van Harmelen 72fa547557 Making things consistent throughout the provider 2014-12-25 22:58:17 +01:00
Sander van Harmelen 57ae6a5da6 Fixing aws_instance schema
Some instance types have a block device by default. So when selecting
such an instance type, you will not set a config for the block device,
but the update/refresh func will notice one and update the state
nonetheless.

So in those cases the `block_device` becomes a `computed` field.
2014-12-25 21:58:26 +01:00
Sander van Harmelen b96f373ee9 Fixing some logic issues with the aws-instance resource
1. The schema contained a few fields that where not marked as
`computed`, while they were updated inside the resource.

2. While updating the `volume_size` it was doing so with a `string`,
but in the schema this field is set as `int`.

3. The set func for calculating the hashes for the `block` set items,
also used computed values to calculate the hash. As these values will
not be in the config, but only in the state, this will always show as a
diff. The solution is to only use the fields that aren’t computed in
order to get consistent hashes.

These where all issues before, but weren’t visible as such. All should
be good again now.
2014-12-25 18:21:05 +01:00
Yahya Poonawala 7860dc1ef6 Adding default security group id attribute reference on creation of VPC. Fixes issue #466. 2014-12-23 11:43:33 +05:30
Yahya Poonawala 634984532d Adding default network acl id attribute reference on creation of VPC. Fixes issue #466. 2014-12-22 23:08:15 +05:30
Emil Hessman 13f1f1f9ad builtin/providers/aws: acceptance tests for assigning private IPs on AWS instance 2014-12-20 20:48:07 +01:00
Sander van Harmelen fd6382fbaf Merge pull request #699 from svanharmelen/f-provider/cloudstack-small-fix
provider/cloudstack: changing this fixes an Excoscale issue where 'all' is not allowed
2014-12-19 19:21:47 +01:00
Sander van Harmelen bb3bbcc0fc Changing this fixes an Excoscale issue where 'all' is not allowed 2014-12-19 19:14:46 +01:00
Pete Hodgson 5b66b9306e add aws_key_pair resource
For now this only supports importing a key pair (by specifying a
public_key) property. In the future it'd be fairly trivial to support
key pair creation, with the private key returned as a computed property.

In real world usage you'd probably want to provide that public_key
property via a variable rather than hard-coding it into a terraform
config that'd end up in source control.
2014-12-18 01:27:06 -08:00
Sander van Harmelen b58e468033 Updated the security_group attribute to use a set
This way the order returned by the API has no impact on the saved
state, preventing false positives when diffing.
2014-12-17 23:53:01 +01:00
Emil Hessman 68a41035a9 builtin/providers/mailgun: vet fix
Fixes the following vet report:

builtin/providers/mailgun/resource_mailgun_domain_test.go:73: arg DomainResp.Domain.Wildcard for printf verb %s of wrong type: bool
2014-12-17 12:59:07 +01:00
Emil Hessman 7b704fb77d builtin/providers/heroku: vet fix
Fixes the following vet reports:

builtin/providers/heroku/resource_heroku_app.go:192: arg vs for printf verb %s of wrong type: bool
builtin/providers/heroku/resource_heroku_app.go:198: arg vs for printf verb %s of wrong type: bool
2014-12-17 12:58:12 +01:00
Emil Hessman 4f3f85b165 builtin/providers/aws: vet fix
Fixes the following vet reports:

builtin/providers/aws/resource_aws_network_acl.go:191: wrong number of args for format in Errorf call: 2 needed but 3 args
builtin/providers/aws/resource_aws_network_acl.go:264: wrong number of args for format in Errorf call: 1 needed but 2 args
builtin/providers/aws/resource_aws_network_acl.go:268: wrong number of args for format in Errorf call: 1 needed but 2 args
builtin/providers/aws/resource_aws_network_acl.go:286: arg m[to_port].(int) for printf verb %s of wrong type: int
builtin/providers/aws/resource_aws_network_acl_test.go:277: arg r.NetworkAcls for printf verb %s of wrong type: []github.com/mitchellh/goamz/ec2.NetworkAcl
builtin/providers/aws/resource_aws_subnet_test.go:21: arg v.MapPublicIpOnLaunch for printf verb %s of wrong type: bool
2014-12-17 12:37:46 +01:00
Emil Hessman 95fa353ee9 builtin/providers/atlas: vet fix
Fixes the following vet report:

builtin/providers/atlas/resource_artifact.go:139: arg user for printf verb %d of wrong type: string
2014-12-17 12:28:28 +01:00
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 f923368fc5 Merge pull request #672 from plan3-labs/heroku_cert_support
Heroku SSL certificate support
2014-12-15 12:12:57 -08:00
Sander van Harmelen 9f0c8874b9 Merge pull request #674 from svanharmelen/f-make-func-names-consistent
Making all function names consistent
2014-12-15 15:57:02 +01:00
Sander van Harmelen 4ace4865d7 Making all function names consistent
Before all providers were using the helper.Schema approach the helper
function had these names. Now they all use names consistent with the Go
naming conventions except for these last few…
2014-12-15 15:26:17 +01:00
Jakub Janczak 765cd1f494 Heroku SSL support: fixes after code review of @svanharmelen 2014-12-15 15:10:59 +01:00
Jakub Janczak 3c0e9970e5 Heroku SSL certificate support added 2014-12-15 12:21:47 +01: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
Sander van Harmelen 17bc60fb68 Merge pull request #645 from svanharmelen/f-cloudstack-provider
First release of a provider for CloudStack
2014-12-10 22:33:09 +01:00
Mitchell Hashimoto edc4a277d6 provider/atlas: fix required token 2014-12-10 13:27:11 -08:00
Armon Dadgar 0ff62016ee provider/aws: Fixing ASG handling of not found 2014-12-10 13:27:11 -08:00
Mitchell Hashimoto 124d9fc0bd providers/atlas: make errors more readable 2014-12-10 13:27:11 -08:00
Mitchell Hashimoto 04eb1885f1 providers/atlas: force new 2014-12-10 13:27:06 -08:00
Mitchell Hashimoto a8c05acd1d providers/atlas 2014-12-10 13:27:06 -08:00
Sander van Harmelen 4910423d83 First release of a provider for CloudStack
Of course not all resources are covered by this first release, but
there should be enough resources available to handle most common
operations.

Tests and docs are included.
2014-12-10 22:20:52 +01: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
Armon Dadgar f7a0b7ac1d Merge pull request #617 from josephholsten/simplify-do-droplet-image-loading
simplify digitalocean_droplet.image loading
2014-12-03 11:59:52 -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
Joseph Anthony Pasquale Holsten 5b0894b5cd simplify digitalocean_droplet.image loading
If a droplet's image slug is empty and its image id is empty, then the
image attribute should be empty, so we may assign from either. So it is
unnecessary to check if the image id is empty.

* remove unnecessary check for emptiness of image id
* reverse order of the conditions for assigning the image attribute,
  with the default case (using the slug) first, and the fallback case
  (using the id) second
2014-12-01 11:36:05 -08:00
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
Seth Vargo d7a9b663b4 Merge pull request #585 from fdr/routes-optional
Make Routes in RouteTable optional
2014-11-20 11:19:15 -05:00
Seth Vargo b7de15f8b9 Merge pull request #586 from svanharmelen/f-update-google-provider
Fix acc tests and updated the provider schema to use a DefaultFunc
2014-11-20 11:17:01 -05:00
Sander van Harmelen 6be4b2e807 A really small update fixing a cosmetic inconsistentie
For the OCD types among us, this inconsistentie (only location where
droplet is spelled with a capital) drives me mad
😝
2014-11-20 15:09:22 +01:00
Sander van Harmelen 36ed95c86d Fixing the acc tests
I do wonder when these tests where last run successfully… Must be quite
some time ago considering what I needed to fix in here 😉
2014-11-20 14:30:02 +01:00
Sander van Harmelen bed36cc86a Refactoring the resourceInstanceTags func just a little
My eye caught this somewhat un-logic mixed use of ‘vs’ and
‘v.(*schema.Set)’, so thought to make it a little cleaner…
2014-11-20 11:32:15 +01:00
Sander van Harmelen 144ceb8003 providers/google: update schema to use a DefaultFunc
This makes testing easier and gives you a way to configure the provider
using env variables. It also makes the provider more inline following
the TF 0.2 approach.
2014-11-20 11:25:23 +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
Armon Dadgar e53bf23c0c provider/aws: Fixing merge conflict 2014-11-19 17:17:18 -08:00
Armon Dadgar 735e83a146 Merge branch 'master' of https://github.com/serenitus/terraform into serenitus-master 2014-11-19 17:15:15 -08:00
Armon Dadgar 41f2e7f98e Merge pull request #545 from rcostanzo/f-parameter-group
Added new parameter_group_name parameter for creating an RDS DB instance
2014-11-19 16:01:11 -08:00
Armon Dadgar 4303232533 Merge pull request #440 from buth/awsblockdevices
AWS Instance `block_device` Attribute
2014-11-19 15:52:00 -08:00
Armon Dadgar 8446b036d7 Merge pull request #535 from ceh/vet-fixes
argument and verb formatting fixes reported by go vet
2014-11-19 15:46:01 -08:00
Armon Dadgar fc5a13a1c1 Merge pull request #570 from svanharmelen/f-refactor-digitalocean-provider
Refactor to use the schema.Provider approach
2014-11-19 14:15:48 -08:00
Armon Dadgar 12cde243a8 Merge pull request #568 from svanharmelen/f-refactor-cloudflare-provider
Refactor to use the schema.Provider approach
2014-11-19 14:07:40 -08:00
Armon Dadgar 6afae237e5 Merge pull request #569 from svanharmelen/f-refactor-dnsimple-provider
Refactor to use the schema.Provider approach
2014-11-19 14:04:17 -08:00
Armon Dadgar 5b8efd1ba8 Merge pull request #576 from svanharmelen/f-update-mailgun-provider
providers/mailgun: updated the provider schema to use a DefaultFunc
2014-11-19 13:58:53 -08:00
Sander van Harmelen 1b6f37b6eb Fixed tests and updated the provider schema to use a DefaultFunc
The default stack changed from ‘cedar’ to ‘cedar-14’, so updated the
acceptance tests to reflect this.

Updating the schema makes testing easier and gives you a way to
configure the provider using env variables. It also makes the provider
more inline following the TF 0.2 approach.
2014-11-19 14:25:18 +01:00
Sander van Harmelen 2cb1fd8987 Updated the provider to make testing a little easier
Also makes the provider more inline with the others following the TF
0.2 approach.
2014-11-18 15:21:32 +01:00
Sander van Harmelen 12f6ccb731 Refactor the DigitalOcean provider
With this refactor the DigitalOcean provider is updated to use the
schema.Provider approach released with TF 0.2.
2014-11-18 11:26:59 +01:00
Sander van Harmelen 4e94af3644 Removing obsolete struct tags 2014-11-17 18:58:41 +01:00
Sander van Harmelen 11f024a8e7 Removing obsolete struct tags 2014-11-17 18:57:41 +01:00
Sander van Harmelen a270bc9771 Refactoring the CloudFlare provider
With this refactor the CloudFlare provider is updated to use the
schema.Provider approach released with TF 0.2.
2014-11-17 14:03:57 +01:00
Sander van Harmelen cdee8c70ec Refactoring the DNSimple provider
With this refactor the DNSimple provider is updated to use the
schema.Provider approach released with TF 0.2.
2014-11-17 14:01:00 +01:00
Panagiotis Moustafellos 56defa346f providers/aws: Route53 decrease MinTimeout interval
It get's a bit annoying when handling dozens of records to have the MinInterval for retries so high.
2014-11-13 17:52:10 +02:00
Madhu 5ed2ee8f37 Merge branch 'master' of https://github.com/hashicorp/terraform 2014-11-10 18:44:23 -08:00
Tomotaka Sakuma 1170111c7e support associate_public_ip_address for aws_launch_configuration 2014-11-06 21:00:48 +09:00
Rob Costanzo 16b4dd44c1 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
Rob Costanzo a14da63a39 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
Rob Costanzo 0e3afa6d3d Fixed incorrect ForcesNew settings for parameters and added better acceptance tests to ensure updates are working as expected 2014-11-05 11:03:06 -08:00
Rob Costanzo 3b54001a1b Added missing update support for new aws_db_parameter_group resource 2014-11-05 11:03:06 -08:00
Rob Costanzo de16b10555 Added new aws_db_parameter_group resource for creating RDS DB Parameter Groups.
Added plumbing to allow an optional DBParameterGroupName to be passed when creating an RDS DB instance.
2014-11-05 11:03:06 -08:00
sneha somwanshi 750a36c51e AWS instance resource now supports tenancy 2014-11-04 16:38:30 +05:30
Jack Pearkes ecf66ad7b5 providers/digitalocean: compat for changes to API for droplet size
Upstream in the digitalocean API, the size slug became a size
string, breaking pearkes/digitalocean.

https://github.com/pearkes/digitalocean/pull/1

This fixes compatibility for changes to that library.

closes #510
2014-11-02 14:50:59 -08:00
Jack Pearkes def922551e providers/digitalocean: fix acceptance test suite for running 2014-11-02 14:44:32 -08:00
Simon Turvey 31132f1ded Add tag support to AWS subnets 2014-11-02 12:30:33 -08:00
Emil Hessman 4bfe18b40d argument and verb formatting fixes reported by go vet
builtin/providers/aws/tags_test.go:56: unrecognized printf verb 'i'
builtin/providers/aws/tags_test.go:59: unrecognized printf verb 'i'

config/config_test.go:101: possible formatting directive in Fatal call
config/config_test.go:157: possible formatting directive in Fatal call

config/module/get_file_test.go:91: missing argument for Fatalf(%s): format reads arg 1, have only 0 args

helper/schema/schema.go:341: arg v.Type for printf verb %s of wrong type: schema.ValueType
helper/schema/schema.go:656: missing argument for Errorf(%s): format reads arg 2, have only 1 args
helper/schema/schema.go:912: arg schema.Type for printf verb %s of wrong type: schema.ValueType

terraform/context.go:178: arg v.Type() for printf verb %s of wrong type: github.com/hashicorp/terraform/config.VariableType
terraform/context.go:486: arg c.Operation for printf verb %s of wrong type: terraform.walkOperation

terraform/diff_test.go💯 arg actual for printf verb %s of wrong type: terraform.DiffChangeType
terraform/diff_test.go:235: arg actual for printf verb %s of wrong type: terraform.DiffChangeType
2014-11-02 13:56:44 +01:00
Eric Buth 9fa25c40b2 tests for aws instance block_device 2014-10-31 16:25:16 -04:00
Eric Buth fc58d0a977 Merge branch 'master' of github.com:hashicorp/terraform into awsblockdevices 2014-10-31 15:41:30 -04:00
Panagiotis Moustafellos 5bef93042b Update to support more regions
Relates https://github.com/hashicorp/terraform/issues/524
Added `eu-central-1`, `cn-north-1` and `us-gove-west-1`(hi NSA)
I checked `goamz`, @mitchellh already has added support for those regions
2014-10-30 16:07:12 +02:00
Madhu 5085e75f4a Remove debug logs 2014-10-23 15:50:17 -07:00
Madhu 7d4064ca03 Termination Policy Support 2014-10-23 14:58:54 -07:00
Mitchell Hashimoto 1792334ec4 fmt 2014-10-21 11:00:12 -07:00
Mitchell Hashimoto 81913c58fb providers/aws: fixing faililng test 2014-10-21 10:57:55 -07:00
Mitchell Hashimoto f63a5d24e9 helper/schema: diffs for sets should include the full set [GH-457]
Prior to this, the diff only contained changed set elements. The issue
with this is that `getSet`, the internal function that reads a set from
the ResourceData, expects that each level (state, config, diff, etc.)
has the _full set_ information. This change was done to fix merging
issues.

Because of this, we need to make sure the full set is visible in the
diff.
2014-10-21 10:49:53 -07:00
Mitchell Hashimoto d5b418d82b Merge pull request #402 from longnguyen11288/add-sg-tags
Added security group tagging
2014-10-20 23:18:22 -07:00
Mitchell Hashimoto 98f104dde6 Merge pull request #406 from catsby/heroku-orgs-maps
Proposal to change Heroku organization TypeString to a TypeList
2014-10-20 23:15:50 -07:00
Mitchell Hashimoto 4822419414 Merge pull request #454 from stuntgoat/goog-external
providers/google: add external_address; needed for connection
2014-10-20 23:10:48 -07:00
Mitchell Hashimoto 590a635b70 providers/aws: ELB should treat subest as a set 2014-10-20 16:32:38 -07:00
Mitchell Hashimoto 8f166458d2 Merge pull request #480 from hashicorp/f-fix-consul
Consul param should be "key"
2014-10-20 15:35:31 -07:00
Mitchell Hashimoto 903aa0250c providers/consul: fix delete diff 2014-10-20 14:09:57 -07:00
Mitchell Hashimoto 7e2a421d87 providers/aws: ELB treats subnets as a set 2014-10-20 13:34:26 -07:00
Armon Dadgar f4d5d648c9 provider/consul: Disambiguate between set/get 2014-10-20 12:06:27 -07:00
Armon Dadgar 00eaabf5b8 provider/consul: Fixing test DC 2014-10-20 12:06:16 -07:00
Armon Dadgar 3fcc016e48 provider/consul: Change keyword to key from keys 2014-10-20 12:02:48 -07:00
Armon Dadgar 3e43eb5497 provider/consul: Fixing test harness 2014-10-20 12:02:37 -07:00
stungtoat afa1666cad set default host on connection info 2014-10-19 00:04:17 -07:00
stungtoat fe4e89bef7 consistent spacing 2014-10-18 23:17:14 -07:00
stungtoat 6cc10998ec go fmt 2014-10-18 23:15:43 -07:00
stungtoat fd979d0a8e providers/google: add external_address; needed for connection 2014-10-18 23:03:37 -07:00
Mitchell Hashimoto b25a536299 providers/aws: disassociate EIP before destroying 2014-10-18 15:32:33 -07:00
Mitchell Hashimoto 895d978065 fmt 2014-10-18 10:59:23 -07:00
Mitchell Hashimoto 6eb409c00e Merge pull request #449 from pmoust/subnet-destroy-retry
providers/aws: retry destroying subnet for some time [GH-449]
2014-10-18 10:56:21 -07:00
Panagiotis Moustafellos c459421892 providers/aws: retry destroying subnet for some time [GH-449] 2014-10-18 18:24:57 +03:00
Panagiotis Moustafellos f240c27e16 providers/aws: retry destroying internet gateway for some time [GH-447] 2014-10-18 11:47:33 +03:00
Mitchell Hashimoto 1912e9655d providers/aws: if LC not found, delete it [GH-421] 2014-10-17 20:21:18 -07:00
Mitchell Hashimoto f5c2aba215 providers/aws: drain autoscale groups before deleting [GH-435] 2014-10-17 20:11:00 -07:00
Mitchell Hashimoto 7c89fb06cc providers/aws: only retry dependency violation for security groups
[GH-436]
2014-10-17 18:29:48 -07:00
Mitchell Hashimoto 10ce2b690c providers/aws: retry deleting security group for some time [GH-436] 2014-10-17 18:21:18 -07:00
Eric Buth f10e84aa16 added block_device attribute 2014-10-17 12:12:45 -04:00
John Eckhart 22fa84ebcb Fix build breaks from latest goamz 2014-10-17 00:53:54 -04:00
Mitchell Hashimoto 05bfe85f9f providers/aws: instances can be computed on an ELB 2014-10-16 18:24:58 -07:00
Mitchell Hashimoto 152d5b0c69 providers/aws: elb properly hashes listeners 2014-10-16 18:02:03 -07:00
Mitchell Hashimoto 1a2afdaa37 providers/aws: launch config and autoscale group load is correct
[GH-423]
2014-10-16 16:39:58 -07:00
Clint Shryock 98667d1b12 update error message 2014-10-14 17:28:25 -05:00
Clint Shryock b850f8bc65 proposal for making orgs a structure with fields instead of just a name field 2014-10-14 17:28:24 -05:00
Long Nguyen eef3197ba0 Added security group tagging 2014-10-14 17:11:09 -04:00
Mitchell Hashimoto 6fea336c09 Merge pull request #396 from hashicorp/f-consul-schema
Port Consul provider to new helper.Schema, add Token support
2014-10-14 12:21:23 -07:00
Mitchell Hashimoto e59e4a6bd9 providers/aws: fix compile error 2014-10-14 12:20:39 -07:00
Mitchell Hashimoto 3e6263332d providers/heroku: set all the things 2014-10-14 12:18:18 -07:00
Mitchell Hashimoto e4a2cb216c Merge pull request #389 from catsby/heroku-go-orgs
Starting point for adding Organization app support for Heroku Provider
2014-10-14 12:16:48 -07:00
Armon Dadgar 1cc95b7a72 provider/consul: Change to GetOk with schema.Helper 2014-10-14 12:16:42 -07:00
Mitchell Hashimoto ce997a9a33 providers/aws: fix test 2014-10-14 12:15:46 -07:00
Sean Herron 3e16190e69 Expands AWS tagging to cover EC2 instances 2014-10-13 16:55:59 -04:00
Armon Dadgar 269c5be738 provider/Consul: Support Token. Fixes #378 2014-10-13 11:42:40 -07:00
Armon Dadgar 3e249a4e4e provider/consul: Port to helper.Schema framework 2014-10-13 11:35:45 -07:00
Clint Shryock 764b0259dd Document the organization name field 2014-10-12 12:21:32 -05:00
Clint Shryock 8ab3ebbfb2 clean up the conditional check for Heroku organization 2014-10-12 11:58:18 -05:00
Clint Shryock 5fe2593c16 Add to Organization schema ref. Also gofmt the file 2014-10-12 11:49:57 -05:00