Commit Graph

11821 Commits

Author SHA1 Message Date
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
James Nugent 91ba73f4b2 Merge pull request #7837 from hashicorp/f-plan-map-merge
core: Do not assume HCL parser has touched vars
2016-07-27 17:51:22 -05:00
James Nugent 7af10adcbe core: Do not assume HCL parser has touched vars
This PR fixes #7824, which crashed when applying a plan file. The bug is
that while a map which has come from the HCL parser reifies as a
[]map[string]interface{}, the variable saved in the plan file was not.
We now cover both cases.

Fixes #7824.
2016-07-27 17:14:47 -05:00
Paul Stack e1d21594e2 Update CHANGELOG.md 2016-07-27 22:57:36 +01:00
Paul Stack 630de403ce provider/azurerm: Wait for `azurerm_storage_account` to be available (#7329)
Fixes #7005 where a container tried to provision *before* the storage
account was available. We now wait for the Storage Account to be in the
`Succeeded` state before returning

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMStorageAccount_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMStorageAccount_ -timeout 120m
=== RUN   TestAccAzureRMStorageAccount_basic
--- PASS: TestAccAzureRMStorageAccount_basic (163.68s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
163.695s
```
2016-07-27 22:57:02 +01:00
Paul Stack c0bd7fe1d8 Update CHANGELOG.md 2016-07-27 22:50:44 +01:00
Paul Stack 61c5c9f56b provider/azurerm: `azurerm_storage_table` resource (#7327)
* provider/azurerm: `azurerm_storage_table` resource

Fixes #7257

``````

* Update resource_arm_storage_table.go

* Update resource_arm_storage_table.go
2016-07-27 22:49:43 +01:00
Paul Stack ba8674451c Update CHANGELOG.md 2016-07-27 22:39:38 +01:00
Paul Stack 390e1acb3c provider/azurerm: Change of `availability_set_id` on (#7650)
`azurerm_virtual_machine` should ForceNew

Fixes #6873

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_ChangeAvailbilitySet'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMVirtualMachine_ChangeAvailbilitySet -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_ChangeAvailbilitySet
--- PASS: TestAccAzureRMVirtualMachine_ChangeAvailbilitySet (976.35s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
976.367s
```
2016-07-27 22:39:03 +01:00
Paul Stack d965bc6367 Update CHANGELOG.md 2016-07-27 22:17:35 +01:00
Paul Stack 3f83f0b9f9 provider/aws: Enable Redshift Cluster Logging (#7813)
Fixes #7423

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_loggingEnabled'
==> 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=TestAccAWSRedshiftCluster_loggingEnabled -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_loggingEnabled
--- PASS: TestAccAWSRedshiftCluster_loggingEnabled (675.21s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    675.233s
```
2016-07-27 22:16:32 +01:00
Paul Hinze 4cdebd7a60 Merge pull request #7832 from hashicorp/f-map-func
config: Add map() interpolation function
2016-07-27 13:52:32 -05:00
Paul Hinze 1425b34562
config: Add map() interpolation function
* `map(key, value, ...)` - Returns a map consisting of the key/value pairs
  specified as arguments. Every odd argument must be a string key, and every
  even argument must have the same type as the other values specified.
  Duplicate keys are not allowed. Examples:
  * `map("hello", "world")`
  * `map("us-east", list("a", "b", "c"), "us-west", list("b", "c", "d"))`
2016-07-27 13:03:08 -05:00
James Bardin b4b70193d2 whitespace fixes 2016-07-27 12:08:59 -04:00
clint shryock f0021e1f03 provider/aws: Seperate out TestAccAWSDBInstance_iops_update into it's own run
This will seperate the TestAccAWSDBInstance_iops_update test into it's own
namespace for testing by itself in Travis
2016-07-27 11:07:37 -05:00
James Bardin 735e425daa Merge pull request #7831 from hashicorp/jbardin/unused-vars
Remove unused variables
2016-07-27 11:55:57 -04:00
Paul Stack a09c7f329b Update CHANGELOG.md 2016-07-27 16:48:18 +01:00
Paul Stack 8ed549c3b5 provider/aws: Don't delete Lambda function from state on initial call of (#7829)
the Read func

Fixes #7782

Lambda functions are eventually consistent :( Therefore, when we move
from the Create func to the Read func, there is a chance that the Lambda
hasn't replicated yet and we could therefore find that it doesn't exist
and delete it as follows:

```
params := &lambda.GetFunctionInput{
        FunctionName: aws.String(d.Get("function_name").(string)),

}

    getFunctionOutput, err := conn.GetFunction(params)
    if err != nil {
            if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" {
                        d.SetId("")
                                    return nil

            }
                    return err

    }
```

This PR uses `d.IsNewResource()` to check if the Read is being called
after a Create and therefore, won't delete the lambda if not found. This
should allow the lambda to replicate

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSLambdaFunction_'
=> 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=TestAccAWSLambdaFunction_ -timeout 120m
=== RUN   TestAccAWSLambdaFunction_importLocalFile
--- PASS: TestAccAWSLambdaFunction_importLocalFile (36.64s)
=== RUN   TestAccAWSLambdaFunction_importLocalFile_VPC
--- PASS: TestAccAWSLambdaFunction_importLocalFile_VPC (45.17s)
=== RUN   TestAccAWSLambdaFunction_importS3
--- PASS: TestAccAWSLambdaFunction_importS3 (40.88s)
=== RUN   TestAccAWSLambdaFunction_basic
--- PASS: TestAccAWSLambdaFunction_basic (44.77s)
=== RUN   TestAccAWSLambdaFunction_VPC
--- PASS: TestAccAWSLambdaFunction_VPC (44.13s)
=== RUN   TestAccAWSLambdaFunction_s3
--- PASS: TestAccAWSLambdaFunction_s3 (43.62s)
=== RUN   TestAccAWSLambdaFunction_localUpdate
--- PASS: TestAccAWSLambdaFunction_localUpdate (33.49s)
=== RUN   TestAccAWSLambdaFunction_localUpdate_nameOnly
--- PASS: TestAccAWSLambdaFunction_localUpdate_nameOnly (51.83s)
=== RUN   TestAccAWSLambdaFunction_s3Update
--- PASS: TestAccAWSLambdaFunction_s3Update (106.49s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    447.055s
```

Thanks to @radeksimko for pointing out `d.IsNewResource()`
2016-07-27 16:47:25 +01:00
James Bardin 142f689f96 Remove unused variables
These variables weren't used, but the compiler misses them since they
are captured in a closure.
2016-07-27 11:42:21 -04:00
Sander van Harmelen 393863a5a9 Add project parameter to additional resources (#7828) 2016-07-27 17:30:18 +02:00
James Bardin 8038e60a20 Add a function to quote HCL strings
The strings we have in the variables may contain escaped double-quotes,
which have already been parsed and had the `\`s removed. We need to
re-escape these, but only if we are in the outer string and not inside an
interpolation.
2016-07-27 10:03:04 -04:00
stack72 3392b3a764
Merge branch 'goloroden-patch-1' 2016-07-27 12:30:07 +01:00
stack72 ed49a23dab
Merge branch 'patch-1' of https://github.com/goloroden/terraform into goloroden-patch-1 2016-07-27 12:27:09 +01:00
James Bardin 648fff9ba1 Update the atlas-go client
adds the new TFVars field
2016-07-26 20:38:50 -04:00
James Bardin de87267697 Add tf_vars to the variables sent in push
Add tf_vars to the data structures sent in terraform push.

This takes any value of type []interface{} or map[string]interface{} and
marshals it as a string representation of the equivalent HCL. This
prevents ambiguity in atlas between a string that looks like a json
structure, and an actual json structure.

For the time being we will need a way to serialize data as HCL, so the
command package has an internal encodeHCL function to do so. We can
remove this if we get complete package for marshaling HCL.
2016-07-26 20:38:50 -04:00
Paul Stack bef3b76c7a docs/intro: Change the location of Atlas User Tokens in Intro docs (#7822)
Fixes #5861
2016-07-27 01:06:23 +01:00
Paul Stack 6263adaa13 Update CHANGELOG.md 2016-07-27 00:26:47 +01:00