Commit Graph

11688 Commits

Author SHA1 Message Date
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
Dan Allegood 4b9b42dbf0 Fixes the hasBootableVmdk flag when attaching multiple disks (#7804)
The hasBootableFlag logic had a bug where it would only be set properly
if the bootable disk was the last specified.  Adding some bool logic
resolves the issue.  Also adding check to ensure only one bootable disk
is given, and cleaning up a redundant var.
2016-07-27 00:25:56 +01:00
Paul Stack 5cacd788b5 Update CHANGELOG.md 2016-07-26 22:01:01 +01:00
stack72 3d4e3e729a
Merge branch 'b-aws-sqs-defaults' 2016-07-26 21:59:30 +01:00
stack72 4e1d54ad51
provider/aws: Change the resource name expected as part of sqs queue import test 2016-07-26 21:59:21 +01:00
stack72 3a1f2e6fe9
Merge branch 'master' into b-aws-sqs-defaults 2016-07-26 21:51:48 +01:00
James Nugent 683300ba0f Merge pull request #7710 from hashicorp/f-parse-tfenvvars-as-hcl
core: Allow TF_VAR_x to contain lists and maps
2016-07-26 15:46:19 -05:00
James Nugent 681d94ae20 core: Allow lists and maps as variable overrides
Terraform 0.7 introduces lists and maps as first-class values for
variables, in addition to string values which were previously available.
However, there was previously no way to override the default value of a
list or map, and the functionality for overriding specific map keys was
broken.

Using the environment variable method for setting variable values, there
was previously no way to give a variable a value of a list or map. These
now support HCL for individual values - specifying:

    TF_VAR_test='["Hello", "World"]'

will set the variable `test` to a two-element list containing "Hello"
and "World". Specifying

    TF_VAR_test_map='{"Hello = "World", "Foo" = "bar"}'

will set the variable `test_map` to a two-element map with keys "Hello"
and "Foo", and values "World" and "bar" respectively.

The same logic is applied to `-var` flags, and the file parsed by
`-var-files` ("autoVariables").

Note that care must be taken to not run into shell expansion for `-var-`
flags and environment variables.

We also merge map keys where appropriate. The override syntax has
changed (to be noted in CHANGELOG as a breaking change), so several
tests needed their syntax updating from the old `amis.us-east-1 =
"newValue"` style to `amis = "{ "us-east-1" = "newValue"}"` style as
defined in TF-002.

In order to continue supporting the `-var "foo=bar"` type of variable
flag (which is not valid HCL), a special case error is checked after HCL
parsing fails, and the old code path runs instead.
2016-07-26 15:27:29 -05:00
Clint 7d580625da Update CHANGELOG.md 2016-07-26 15:04:41 -05:00
Clint ff9ad3cc40 provider/aws: Fix issue updating ElasticBeanstalk Environment templates (#7811)
* provider/aws: Fix issue removing templates from ElasticBeanstalk

* regression test
2016-07-26 15:04:03 -05:00
clint shryock 348f6bad50 provider/aws: Apply defaults to SQS Queues 2016-07-26 14:53:45 -05:00
clint shryock 6a42717f55 update sqs test to fail on reverting to defaults 2016-07-26 14:41:54 -05:00
Paul Stack da43730397 Update CHANGELOG.md 2016-07-26 19:20:42 +01:00
Joe Topjian 8623803dd7 provider/mysql: user and grant resources (#7656)
* provider/mysql: User Resource

This commit introduces a mysql_user resource. It includes basic
functionality of adding a user@host along with a password.

* provider/mysql: Grant Resource

This commit introduces a mysql_grant resource. It can grant a set
of privileges to a user against a whole database.

* provider/mysql: Adding documentation for user and grant resources
2016-07-26 19:19:39 +01:00
Paul Stack fcefa098b5 docs/consul: Adding the missing navigation links for the new consul resources (#7816) 2016-07-26 18:47:24 +01:00
Paul Stack d8d9bdd2b3 Update CHANGELOG.md 2016-07-26 18:35:17 +01:00
stack72 dd2db4474c
Merge branch 'maxenglander-gh-2087-consul-service-resource' 2016-07-26 18:32:59 +01:00
stack72 47c274f699
provider/consul: Fixing the ConsulNode_basic tests to have the correct references 2016-07-26 18:31:38 +01:00
stack72 c1d7ae867f
Merge branch 'gh-2087-consul-service-resource' of https://github.com/maxenglander/terraform into maxenglander-gh-2087-consul-service-resource 2016-07-26 18:26:52 +01:00
Paul Stack 2c166770d6 Update CHANGELOG.md 2016-07-26 18:24:39 +01:00
Martin Atkins 19d0b42911 provider/consul: consul_keys data source (#7678)
Previously the consul_keys resource did double-duty as both a reader and
writer of values from the Consul key/value store, but that made its
interface rather confusing and complex, as well as having all of the other
general problems associated with read-only resources.

Here we split the functionality such that reading is done with the
consul_keys data source while writing is done with the consul_keys
resource.

The old read behavior of the resource is still supported, but it's no
longer documented (except as a deprecation note) and will generate
deprecation warnings when used.

In future it should be possible to simplify the consul_keys resource by
removing all of the read support, but that is deferred for now to give
users a chance to gracefully migrate to the new data source.
2016-07-26 18:23:38 +01:00
Radek Simko deba1b63e9 docker/docs: Document new data source + limitations (#7814) 2016-07-26 17:07:35 +01:00
Radek Simko 4606a74dfa Update CHANGELOG.md 2016-07-26 16:51:32 +01:00
clint shryock 0e6ff77433 provider/aws: Restore Defaults to SQS Queues 2016-07-26 10:30:52 -05:00
kyhavlov 09bba0424c provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
clint shryock 5050d4555c provider/aws: ignore force_destroy on AWSUser Import test 2016-07-26 09:56:50 -05:00
stack72 201a499be9
Merge branch 'master' of github.com:hashicorp/terraform 2016-07-26 10:50:25 +01:00
stack72 8f48a4106f
docs/aws: Add the App Autoscaling Resources to the nav bar in a section of their own 2016-07-26 10:50:17 +01:00
Paul Stack 0c9669b614 Update CHANGELOG.md 2016-07-26 10:46:17 +01:00
stack72 63db19f564
Merge branch 'master' of github.com:hashicorp/terraform 2016-07-26 10:43:42 +01:00
stack72 28e073ec41
Merge branch 'andskli-appautoscaling' 2016-07-26 10:43:30 +01:00