Commit Graph

11695 Commits

Author SHA1 Message Date
James Bardin c9e1522103 Use HIL to limit concat to ast.TypeList
we can remove some type checks in the concat function
2016-08-01 15:24:18 -04:00
James Bardin c15c0eb0cb Disallow strings as arguments to concat
The concat interpolation function now only accepts list arguments.
Strings are no longer supported, for concatenation or appending to
lists. All arguments must be a list, and single elements can be promoted
with the `list` interpolation function.
2016-08-01 15:06:20 -04:00
stack72 8bb7e619b5
provider/aws: Support Import of `aws_redshift_security_group`
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftSecurityGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSRedshiftSecurityGroup_ -timeout 120m
=== RUN   TestAccAWSRedshiftSecurityGroup_importBasic
--- PASS: TestAccAWSRedshiftSecurityGroup_importBasic (30.87s)
=== RUN   TestAccAWSRedshiftSecurityGroup_ingressCidr
--- PASS: TestAccAWSRedshiftSecurityGroup_ingressCidr (30.45s)
=== RUN   TestAccAWSRedshiftSecurityGroup_updateIngressCidr
--- PASS: TestAccAWSRedshiftSecurityGroup_updateIngressCidr (72.78s)
=== RUN   TestAccAWSRedshiftSecurityGroup_ingressSecurityGroup
--- PASS: TestAccAWSRedshiftSecurityGroup_ingressSecurityGroup (49.73s)
=== RUN   TestAccAWSRedshiftSecurityGroup_updateIngressSecurityGroup
--- PASS: TestAccAWSRedshiftSecurityGroup_updateIngressSecurityGroup
(92.44s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    276.291s
```
2016-08-02 02:03:43 +10:00
stack72 91596b4a71
provider/aws: Support Import of `aws_db_security_group`
This test overrides the AWS_DEFAULT_REGION parameter as the security
groups are created in us-east-1 (due to classic VPC requirements)

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBSecurityGroup_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSDBSecurityGroup_importBasic -timeout 120m
=== RUN   TestAccAWSDBSecurityGroup_importBasic
--- PASS: TestAccAWSDBSecurityGroup_importBasic (49.46s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    49.487s
```
2016-08-02 01:42:54 +10:00
Paul Stack d85007b55a Update CHANGELOG.md 2016-08-01 08:50:34 +10:00
Peter McAtominey cc18e4d7ca provider/azurerm: add traffic manager resources (#7826)
* provider/azurerm: vendor arm/trafficmanager package

* provider/azurerm: add azurerm_traffic_manager_profile resource

* provider/azurerm: add azurerm_traffic_manager_endpoint resource

* provider/azurerm: document traffic manager resources

* provider/azurerm: use short type argument for traffic manager endpoint

The resource now takes the short type for example azureEndpoints instead of the
long form Microsoft.Network/TrafficManagerProfiles/azureEndpoints.

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMTrafficManagerEndpoint -timeout 120m
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basic
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basic (179.72s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal (171.36s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updateWeight
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updateWeight (167.24s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updatePriority
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updatePriority (192.91s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints
--- PASS: TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints (111.18s)
PASS
ok   github.com/hashicorp/terraform/builtin/providers/azurerm    822.534s
```

* provider/azurerm: remove unnecesary dereferences in traffic manager resources

```
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMTrafficManager -timeout 120m
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basic
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basic (176.08s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal
--- PASS: TestAccAzureRMTrafficManagerEndpoint_basicDisableExternal (172.28s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updateWeight
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updateWeight (148.97s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_updatePriority
--- PASS: TestAccAzureRMTrafficManagerEndpoint_updatePriority (101.18s)
=== RUN   TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints
--- PASS: TestAccAzureRMTrafficManagerEndpoint_nestedEndpoints (88.33s)
=== RUN   TestAccAzureRMTrafficManagerProfile_weighted
--- PASS: TestAccAzureRMTrafficManagerProfile_weighted (80.92s)
=== RUN   TestAccAzureRMTrafficManagerProfile_performance
--- PASS: TestAccAzureRMTrafficManagerProfile_performance (82.98s)
=== RUN   TestAccAzureRMTrafficManagerProfile_priority
--- PASS: TestAccAzureRMTrafficManagerProfile_priority (81.07s)
=== RUN   TestAccAzureRMTrafficManagerProfile_withTags
--- PASS: TestAccAzureRMTrafficManagerProfile_withTags (102.50s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	1034.458s
```
2016-07-31 23:46:15 +01:00
Milad Irannejad 802f014d60 Update doc page for aws_elb (#7882) 2016-07-31 23:44:21 +01:00
Paul Stack 2e38467213 release: clean up after v0.7.0-rc4 2016-07-30 00:53:38 +00:00
Paul Stack abfd2c1daf
v0.7.0-rc4 2016-07-29 23:40:54 +00:00
James Nugent 796ce7bdd7 build: Opt-in to building rather than opt-out 2016-07-29 18:40:31 -05:00
James Nugent b2d5b66508 Merge pull request #7880 from hashicorp/b-fix-freebsd
build: Fix errors in FreeBSD build
2016-07-29 18:30:55 -05:00
James Nugent 2eb00c9184 build: Fix errors in FreeBSD build
Fixes the following error when cross compiling:

```
--> freebsd/amd64 error: exit status 2
Stderr: # github.com/hashicorp/terraform/config/module
config/module/inode.go:18: cannot use st.Ino (type uint32) as type uint64 in return argument
```
2016-07-29 18:26:22 -05:00
James Bardin 2747d964cb Merge pull request #7877 from hashicorp/jbardin/races
core: Fix race conditions, mostly around diffs
2016-07-29 18:42:31 -04:00
James Bardin 074be9ae56 Another race in resource.Retry 2016-07-29 18:35:54 -04:00
Paul Hinze 46b78286bc Merge pull request #7865 from hashicorp/b-filter-untargeted-variables
terraform: Filter untargeted variable nodes
2016-07-29 17:08:08 -05:00
Paul Hinze 24c45fcd5d
terraform: Filter untargeted variable nodes
When targeting, only Addressable untargeted nodes were being removed
from the graph. Variable nodes are not directly Addressable, so they
were hanging around. This caused problems with module variables that
referred to Resource nodes. The Resource node would be filtered out of
the graph, but the module Variable node would not, so it would try to
interpolate during the graph walk and be unable to find it's referent.

This would present itself as strange "cannot find variable" errors for
variables that were uninvolved with the currently targeted set of
resources.

Here, we introduce a new interface that can be implemented by graph
nodes to indicate they should be filtered out from targeting even though
they are not directly addressable themselves.
2016-07-29 16:55:30 -05:00
James Nugent 9034196baf Merge pull request #7875 from hashicorp/b-outputs-by-module
core: Fix -module for terraform output command
2016-07-29 16:40:24 -05:00
James Nugent 0e4e94a86f core: Fix -module for terraform output command
The behaviour whereby outputs for a particular nested module can be
output was broken by the changes for lists and maps. This commit
restores the previous behaviour by passing the module path into the
outputsAsString function.

We also add a new test of this since the code path for indivdual output
vs all outputs for a module has diverged.
2016-07-29 16:39:59 -05:00
Paul Stack d6191be608 Update CHANGELOG.md 2016-07-29 21:13:34 +01:00
Paul Stack 1bdc2f1c5f provider/aws: `aws_vpn_gateway` should be removed from state when in (#7861)
deleted state

Fixes #7859

When a VPN Gateway has been manually deleted, we should expect it to be
added back to the plan

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVpnGateway_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpnGateway_
-timeout 120m
=== RUN   TestAccAWSVpnGateway_importBasic
--- PASS: TestAccAWSVpnGateway_importBasic (247.94s)
=== RUN   TestAccAWSVpnGateway_basic
--- PASS: TestAccAWSVpnGateway_basic (409.50s)
=== RUN   TestAccAWSVpnGateway_reattach
--- PASS: TestAccAWSVpnGateway_reattach (211.33s)
=== RUN   TestAccAWSVpnGateway_delete
--- PASS: TestAccAWSVpnGateway_delete (121.10s)
=== RUN   TestAccAWSVpnGateway_tags
--- PASS: TestAccAWSVpnGateway_tags (125.38s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws
1115.274s
```
2016-07-29 21:12:51 +01:00
James Bardin 5802f76eaa Make all terraform package tests pass under -race
This isn't a pretty refactor, but fixes the race issues in this package
for now.

Fix race on RawConfig.Config()

fix command package races
2016-07-29 16:12:21 -04:00
Clint a9aaf44a87 fix make issues (supersedes #7868) (#7876)
* Fixing the make error or invalid data type for errorf and printf

* fix make errors
2016-07-29 21:05:57 +01:00
Paul Stack 37557f9452 provider/aws: Fix up `aws_api_gateway_api_key` import test (#7873)
This changes the behaviour of `aws_api_gateway_integration` to set the
`passthrough_behaviour` to be computed as this was breaking the import
test

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayApiKey_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSAPIGatewayApiKey_importBasic -timeout 120m
=== RUN   TestAccAWSAPIGatewayApiKey_importBasic
--- PASS: TestAccAWSAPIGatewayApiKey_importBasic (50.19s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    50.210s
```

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayIntegration_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSAPIGatewayIntegration_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayIntegration_basic
--- PASS: TestAccAWSAPIGatewayIntegration_basic (67.43s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    67.449s
```
2016-07-29 20:20:50 +01:00
stack72 37b7a22db9
provider/aws: Bump SDK package version to v1.2.10 2016-07-29 09:11:56 +01:00
Greg Aker 3d1802d547 Add default value & acceptance test. 2016-07-28 16:57:33 -05:00
Paul Hinze 70999b1a64 Merge pull request #7851 from hashicorp/d-lists-and-maps
website: Docs sweep for lists & maps
2016-07-28 16:05:40 -05:00
Paul Hinze d50aeeef0d
website: Docs sweep for lists & maps 2016-07-28 15:49:53 -05:00
Greg Aker a8e8922ea8 Add enable_cdn to google_compute_backend_service.
Add the ability to add/remove the Cloud CDN configuration
option on a backend service.
2016-07-28 15:38:09 -05:00
Greg Aker 81fa4de2d0 Update vendorized google deps. 2016-07-28 15:35:45 -05:00
James Bardin 9dec28bccf Merge pull request #7803 from hashicorp/jbardin/tf_vars-push
Add tf_vars to the variables sent in push
2016-07-28 16:31:04 -04:00
Clint 0024358b08 Update resource_aws_db_instance_test.go 2016-07-28 14:30:50 -05:00
James Bardin 0c714592f0 Fix variable handling on subsequent pushes
The handling of remote variables was completely disabled for push.
We still need to fetch variables from atlas for push, because if the
variable is only set remotely the Input walk will still prompt the user
for a value. We add the missing remote variables to the context
to disable input.

We now only handle remote variables as atlas.TFVar and explicitly pass
around that type rather than an `interface{}`.

Shorten the text fixture slightly to make the output a little more
readable on failures.
2016-07-28 15:06:53 -04:00
James Nugent 0b8cc99038 Merge pull request #7847 from dvorak/openstack-doc-fixes2
Fix subnet part of OS network example
2016-07-28 11:21:09 -05:00
Clayton O'Neill efc6bf01b0 Fix subnet part of OS network example
This fixes the hard coded network id and also fixes the fixed_ip address
to be one on the network that is specified above.
2016-07-28 12:19:37 -04:00
Paul Stack 4353832f6a Update CHANGELOG.md 2016-07-28 17:02:07 +01:00
Stephen Muth bbd9b2c944 provider/powerdns: Add support for PowerDNS 4 API (#7819)
* Auto-detect the API version

and update the endpoint URL accordingly

* Typo fix

* Make client and resource work with the 4.X API

* Update documentation

* Fix typos

* 204 now counts as a "success" response

See
f0e76cee2c
for the change in the pdns repository.

* Add a note about a possible pitfall when defining some records
2016-07-28 17:01:06 +01:00
Paul Hinze 14f19aff1b
CHANGELOG: sort BC section by provider/core 2016-07-28 10:43:24 -05:00
Paul Hinze c6c0443548 Update CHANGELOG.md 2016-07-28 10:33:49 -05:00
Paul Hinze 16a1a0c3c9 Update CHANGELOG.md 2016-07-28 10:31:21 -05:00
Clayton O'Neill a1c14f0ffc Fix OpenStack documentation (#7844)
References to security_groups attribute on network objects should
actually be security_group_ids.
2016-07-28 16:24:11 +01:00
James Nugent a14d23bbbc Merge pull request #7845 from stvnwrgs/add_missing_compute_address_output_to_docs
Updated compute_address docs
2016-07-28 10:22:56 -05:00
Paul Hinze 3f16a067ca Merge pull request #7834 from hashicorp/f-interp-funcs-list-map-audit
config: Audit all interpolation functions for list/map behavior
2016-07-28 10:20:35 -05:00
Steven Wirges f8caa630d8 Updated compute_address docs
Added address to attribute ref
2016-07-28 17:08:06 +02:00
Paul Hinze 88030764ff
config: Audit all interpolation functions for list/map behavior
- `distinct()` - error on non-flat lists
 - `element()` - error on non-flat lists
 - `join()` - error on non-flat lists
 - `length()` - support maps
 - `lookup()` - error on non-flat maps
 - `values()` - error on non-flat maps
2016-07-28 09:56:30 -05:00
James Bardin 341abd7956 limit input retries
Prevent going into a busy loop if the input fd closes early.
2016-07-28 08:49:09 -04:00
Paul Stack c3ec9c7948 provider/azurerm: `azurerm_storage_blob` validation fix (#7328)
The validation for the `azurerm_storage_blob` `type` parameter was
checking for `blob` where it should have been `block`

This commits fixes it up

```
make testacc TEST=./builtin/providers/azurerm
TESTARGS='-run=TestResourceAzureRMStorageBlobType_validation'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestResourceAzureRMStorageBlobType_validation -timeout 120m
=== RUN   TestResourceAzureRMStorageBlobType_validation
--- PASS: TestResourceAzureRMStorageBlobType_validation (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
0.014s
```
2016-07-28 13:32:40 +01:00
Paul Stack bf2e8e23d9 Update CHANGELOG.md 2016-07-28 11:20:32 +01:00
Krzysztof Wilczynski 63a14be8da Add ability to set Performance Mode in aws_efs_file_system. (#7791)
* Add ability to set Performance Mode in aws_efs_file_system.

The Elastic File System (EFS) allows for setting a Performance Mode during
creation, thus enabling anyone to chose performance of the file system according
to their particular needs. This commit adds an optional "performance_mode"
attribte to the aws_efs_file_system resource so that an appropriate mode can be
set as needed.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>

* Add test coverage for the ValidateFunc used.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>

* Add "creation_token" and deprecate "reference_name".

Add the "creation_token" attribute so that the resource follows the API more
closely (as per the convention), thus deprecate the "reference_name" attribute.

Update tests and documentation accordingly.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-07-28 11:19:39 +01:00
Borgstrom ♕ 2195a67748 Ensure kms_key_id docs indicate it is an ARN (#7842)
If you specify just a bare ID, then the initial application works but
subsequent applications may end up doing bad things, like:

```
-/+ aws_ebs_volume.vol_1
    availability_zone: "us-east-1a" => "us-east-1a"
    encrypted:         "true" => "true"
    iops:              "" => "<computed>"
    kms_key_id:        "arn:aws:kms:us-east-1:123456789:key/59faf88b-0912-4cca-8b6c-bd107a6ba8c4" => "59faf88b-0912-4cca-8b6c-bd107a6ba8c4" (forces new resource)
    size:              "100" => "100"
    snapshot_id:       "" => "<computed>"
```
2016-07-28 08:44:09 +01:00
tomgoren 7ead97369f Website typo (#7838)
* missing single space between the words 'DB' and 'Snapshot'

* just kidding - 'S' should be lowercase also
2016-07-28 00:26:47 +01:00