Commit Graph

18547 Commits

Author SHA1 Message Date
Martin Atkins eaac9fbca3 provider/template: template_dir explicitly create dest dir
Previously we were letting it get implicitly created as part of making
the structure for copying in each file, but that isn't sufficient if the
source directory is empty.

By explicitly creating the directory first we ensure that it will complete
successfully even in the case of an empty directory.
2017-04-25 10:48:26 -07:00
Martin Atkins eda2550074 provider/template: template_dir: don't crash if source dir nonexistent
When an error is passed, the FileInfo can be nil, which was previously
causing a crash on trying to evaluate f.IsDir(). By checking for an error
first we avoid this crash.
2017-04-25 10:48:26 -07:00
Quentin Machu f721608e4e provider/template: Add a 'dir' resource to template entire directories
When TerraForm is used to configure and deploy infrastructure
applications that require dozens templated files, such as Kubernetes, it
becomes extremely burdensome to template them individually: each of them
requires a data source block as well as an upload/export (file
provisioner, AWS S3, ...).

Instead, this commit introduces a mean to template an entire folder of
files (recursively), that can then be treated as a whole by any provider
or provisioner that support directory inputs (such as the
file provisioner, the archive provider, ...).

This does not intend to make TerraForm a full-fledged templating system
as the templating grammar and capabilities are left unchanged. This only
aims at improving the user-experience of the existing templating
provider by significantly reducing the overhead when several files are
to be generated - without forcing the users to rely on external tools
when these templates stay simple and that their generation in TerraForm
is justified.
2017-04-25 10:48:26 -07:00
= 7130755d8b Randomizes basic test name 2017-04-25 11:44:42 -06:00
= 1e0f4d5e5e Randomizes glaciar vault name 2017-04-25 11:30:42 -06:00
James Bardin f4168d97f0 Merge pull request #13922 from hashicorp/jbardin/remote-state-backup
always wrap remote state in a BackupState
2017-04-25 13:17:58 -04:00
James Bardin 7dad3f4d48 remove redundant output when interrupting apply
The backend apply operation doesn't need to output the same text as the
cli itself. Instead notify the user that we are in the process of
stopping the operation.
2017-04-25 11:44:51 -04:00
James Bardin 6ef7c83ec5 add data-loss warning to SIGINT handler in apply
Warning user about data loss after receiving an interrupt.
2017-04-25 11:43:59 -04:00
Jake Champlin 4441c6f53b Update CHANGELOG.md 2017-04-25 10:41:10 -04:00
Matthew Frahry f0272f5b14 Merge pull request #13918 from hashicorp/p-aws-ecs-service-test
Randomize mongodb names
2017-04-25 08:40:48 -06:00
Jake Champlin c839a7b2ff Merge pull request #13910 from bernerdschaefer/bs-heroku-buildpacks
provider/heroku: set app buildpacks from config
2017-04-25 10:40:19 -04:00
Tom Harvey 8d48c4743c Updating to include #13933 2017-04-25 15:22:15 +01:00
Josh Komoroske 414060c83b Documented aws_api_gateway_usage_plan.api_stages attributes as required (#13930) 2017-04-25 09:21:49 -05:00
Tom Harvey c38d5470a5 Merge pull request #13933 from hashicorp/fix-13927
provider/azurerm: ignoring the case during Diff to the `create_option` field of`azurerm_virtual_machine`
2017-04-25 15:17:51 +01:00
Jake Champlin af3ba9a02c
cleanup conditional logic 2017-04-25 10:06:28 -04:00
Tom Elliff bc46b1cbf9 Allow filtering of aws_subnet_ids by tags
This is the minimal amount of work needed to be able to create a list of a subset of subnet IDs in a VPC, allowing people to loop through them easily when creating EC2 instances or provide a list straight to an ELB.
2017-04-25 14:46:51 +01:00
tombuildsstuff 5121995100 Ignoring the case of the create_option field. Fixes #13927. 2017-04-25 10:45:46 +01:00
evalphobia 4622960835 Fix import path on provider-localfile 2017-04-24 21:51:35 -07:00
James Bardin 563cfd00df always wrap remote state in a BackupState
Use a local backup for remote state operations. This allows for manual
recovery in the case of a put failure.
2017-04-24 22:15:19 -04:00
James Bardin 7a07c4e99c update CHANGELOG 2017-04-24 21:12:59 -04:00
James Bardin 10ee31d5a2 update CHANGELOG 2017-04-24 21:09:58 -04:00
Bernerd Schaefer 81e8db56f0 Fix typo in docs 2017-04-24 17:50:52 -07:00
Bernerd Schaefer de54855f63 Website 2017-04-24 17:42:54 -07:00
Scott Nowicki 3a77aafe49 merge upstream 2017-04-24 19:40:17 -05:00
Bernerd Schaefer dbf82e651e Implementation 2017-04-24 17:34:34 -07:00
Bernerd Schaefer 43257492b9 Add first failing test for heroku_space 2017-04-24 17:08:22 -07:00
Scott Nowicki 5d4e0490ae Merge branch 'master' of github.com:harijayms/terraform 2017-04-24 18:33:27 -05:00
Jake Champlin 10ddf607e3
provider/aws: Add `network_interface` to instance 2017-04-24 18:06:28 -04:00
Jay Wang 537d3333ff Merge remote-tracking branch 'upstream/master' 2017-04-24 14:28:58 -07:00
= 15aabe93c3 Randomize mongodb names 2017-04-24 15:23:52 -06:00
Seth Vargo 6daef74e9b Merge pull request #13917 from hashicorp/sethvargo-patch-1
Document that random_pet is referenced by id
2017-04-24 16:40:30 -04:00
Paul Stack 6e6c5368d2 Update CHANGELOG.md 2017-04-24 23:40:12 +03:00
Paul Stack 1eeb3c41e3 provider/aws: Allow AWS Subnet to change IPv6 CIDR Block without ForceNew (#13909)
Fixes: #13588

It was pointed out in #13588 that we don't need to ForceNew on a change
of IPv6 CIDR block. The logic I decided to implement here was to
disassociate then associate. We should only be able to be associated to
1 IPv6 CIDR block at once. This feels like a risky move. We can
disassociate and then error on the associate. This would leave us in a
situation where we have no IPv6 CIDR block associated

The alternative here would be that the failure of association, triggers
a reassociation with the old IPv6 CIDR block

I added a test to make sure that the subnet Ids don't change as the ipv6
block changes. Before removing the ForceNew from the ipv6_cidr_block,
the test results in the following:

```
=== RUN   TestAccAWSSubnet_ipv6
--- FAIL: TestAccAWSSubnet_ipv6 (92.09s)
	resource_aws_subnet_test.go:105: Expected SubnetIDs not to change, but both got before: subnet-0d2b6a6a and after: subnet-742c6d13
```

After the removal of ForceNew, the test result looks as follows:

```
=== RUN   TestAccAWSSubnet_ipv6
--- PASS: TestAccAWSSubnet_ipv6 (188.34s)
```

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSubnet_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/24 21:26:36 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSubnet_ -timeout 120m
=== RUN   TestAccAWSSubnet_importBasic
--- PASS: TestAccAWSSubnet_importBasic (85.63s)
=== RUN   TestAccAWSSubnet_basic
--- PASS: TestAccAWSSubnet_basic (80.28s)
=== RUN   TestAccAWSSubnet_ipv6
--- PASS: TestAccAWSSubnet_ipv6 (188.34s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	354.283s
```
2017-04-24 23:39:28 +03:00
Seth Vargo b64c9a73cc Document that random_pet is referenced by id 2017-04-24 16:38:23 -04:00
Scott Nowicki f2ba2a3088 Merge branch 'master' of github.com:harijayms/terraform 2017-04-24 15:31:33 -05:00
Radek Simko e079e5fa28 Update CHANGELOG.md 2017-04-24 21:22:55 +01:00
Radek Simko d4dafbe0da Merge pull request #13766 from hashicorp/b-aws-waf-ipset-fix
provider/aws: Fix WAF IPSet descriptors removal on update
2017-04-24 22:21:57 +02:00
Scott Nowicki 2362bd7e8f merge upstream 2017-04-24 15:02:59 -05:00
Scott Nowicki afb164b79a Topic 101 vm simple linux (#1)
* added .travis.yml and deploy.sh
* added deploy script, updated travis.yml to build topic- branches
* generate random string for hostname
* plan now produces output plan, apply now consumes outputted plan
* cleanup; sane defaults
* explicit build dirs
2017-04-24 14:57:28 -05:00
Radek Simko f33afb7e4e
provider/aws: Support IPSets with 0 descriptors 2017-04-24 21:53:25 +02:00
Radek Simko 01aa3fd76a
provider/aws: Fix WAF IPSet descriptors removal on update 2017-04-24 21:53:25 +02:00
anniehedgpeth e4b1cf7f91 Merge branch 'topic-101-vm-simple-linux' of https://github.com/10thmagnitude/terraform into topic-101-vm-simple-linux 2017-04-24 14:39:47 -05:00
anniehedgpeth 5850bc8cf9 azuredeploy.tf to main.tf in README 2017-04-24 14:38:14 -05:00
Scott Nowicki 942c23a554 Merge branch 'master' into topic-101-vm-simple-linux 2017-04-24 14:35:48 -05:00
Radek Simko 2db0e12e63 Update CHANGELOG.md 2017-04-24 20:47:57 +02:00
Radek Simko cda84b1674 provider/aws: Expose invoke ARN from Lambda function (for APIG) (#13890) 2017-04-24 20:47:11 +02:00
Radek Simko 28851ef5d9 Update CHANGELOG.md 2017-04-24 20:46:39 +02:00
Radek Simko 3c2a40a192 provider/aws: Expose execution ARN + invoke URL for APIG deployment (#13889) 2017-04-24 20:43:56 +02:00
Scott Nowicki 938402edba bad syntax 2017-04-24 13:43:38 -05:00
Julien Pivotto 61d183eded provider/digitaocean: Test that droplets are indempotent (#13883)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2017-04-24 21:43:27 +03:00