Commit Graph

11688 Commits

Author SHA1 Message Date
James Bardin 885935962c Add a terraform version header to all atlas calls
Using the DefaultHeader added to the atlas.Client
2016-07-21 11:04:27 -04:00
Sander van Harmelen ddc0f4cdb0 Fix dynamically determining if `ForceNew = true` (#7745)
The same instance of the resources’ `schema.Resource` is used for all resources of the same type.

So we need to set either `true` or `false` for every resource to make sure we get the correct value.
2016-07-21 15:23:58 +02:00
stack72 330ca236d0
Merge branch 'dropbox-rossd/cloudfront_import' 2016-07-21 12:42:09 +01:00
stack72 399f1c20e0
provider/aws: Rename the Basic Import test for CloudFront distributions 2016-07-21 12:41:01 +01:00
stack72 c9a53c20ba
Merge branch 'rossd/cloudfront_import' of https://github.com/dropbox/terraform into dropbox-rossd/cloudfront_import 2016-07-21 10:31:35 +01:00
Joe Topjian 2e650ce153 provider/openstack: making import command consistent (#7739) 2016-07-21 07:35:49 +01:00
Paul Hinze df5d2c9a63 provider/aws: pull iamconn setup earlier (#7734)
Fixes problem introduced in re-arrangement of config
2016-07-21 00:38:14 +01:00
Paul Stack 7ba439dbf6 Update CHANGELOG.md 2016-07-21 00:30:43 +01:00
Jan Schumann ecb4b5aada providers/aws: Opsworks permission resource (#6304)
* add opsworks permission resource

* add docs

* remove permission from state if the permission object could not be found

* remove nil validate function. validation is done in schema.Resource.

* add id to the list of exported values

* renge over permission to check that we have found got the correct one

* removed comment

* removed set id

* fix unknown region us-east-1c

* add user_profile resource

* add docs

* add default value
2016-07-21 00:29:33 +01:00
Paul Stack 28d10d6eb5 Update CHANGELOG.md 2016-07-20 23:55:44 +01:00
David Glasser 50959a654c command: Remove second DefaultDataDirectory const (#7666) 2016-07-20 23:55:05 +01:00
Paul Stack 07cd0bfc13 Update CHANGELOG.md 2016-07-20 23:53:26 +01:00
Paul Stack a2c5b31490 provider/aws: Support kms_key_id for `aws_rds_cluster` (#7662)
* provider/aws: Support kms_key_id for `aws_rds_cluster`

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSCluster_'
==> 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=TestAccAWSRDSCluster_
-timeout 120m
=== RUN   TestAccAWSRDSCluster_basic
--- PASS: TestAccAWSRDSCluster_basic (127.57s)
=== RUN   TestAccAWSRDSCluster_kmsKey
--- PASS: TestAccAWSRDSCluster_kmsKey (323.72s)
=== RUN   TestAccAWSRDSCluster_encrypted
--- PASS: TestAccAWSRDSCluster_encrypted (173.25s)
=== RUN   TestAccAWSRDSCluster_backupsUpdate
--- PASS: TestAccAWSRDSCluster_backupsUpdate (264.07s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    888.638s
```

* provider/aws: Add KMS Key ID to `aws_rds_cluster_instance`

```

```
2016-07-20 23:52:34 +01:00
Paul Hinze 4078221957 provider/aws: Clean up aws config path a bit (#7672)
Rearrange client setup, and remove the extraneous log lines we make per
connection. There's no need to log one line per API client - we're just
setting up structs for most of them.

Since this collapses the file down quite a bit, switch to alphabetized
client setup, since previously there wasn't much of an order to things.
2016-07-20 23:49:57 +01:00
Golo Roden f7fa4610cd Add note that provider uses API v1. (#7727) 2016-07-20 23:33:05 +01:00
Paul Stack 5f6ea8b18e documentation/aws: More additions of Import documention to the AWS (#7729)
resources
2016-07-20 23:28:59 +01:00
Ross Delinger 6ef7f9cd4d Add import support to CloudFront Distributions.
* Import support and acceptance tests for import support have been added.
* geo_restriction.location is now guarnteed to be in sorted order (was
causing a failure in the test)
2016-07-20 15:25:06 -07:00
James Bardin d6d0c9087e Merge pull request #7528 from hashicorp/f-list-interpolation-function
core: Add list() interpolation function
2016-07-20 17:04:33 -04:00
Clint 4d126aaf6f provider/aws: Fix regression in Security Group Rules with self reference (#7706)
* provider/aws: Failing test for #7670

* provider/aws: Fix security group rule regression with self (#7670)
2016-07-20 15:47:10 -05:00
James Bardin 7193ec5cb9 Merge pull request #7723 from hashicorp/jbardin/dot-map-tests
Add tests for maps with dots
2016-07-20 15:57:29 -04:00
Golo Roden 3ccb23f0e3 Explain domain and name parameters. 2016-07-20 21:05:12 +02:00
Paul Stack 2b6cd48ff0 Update CHANGELOG.md 2016-07-20 20:04:52 +01:00
Paul Stack af4cc20ec0 provider/azurerm: `azurerm_virtual_machine` computer_name now Required (#7308)
Fixes #7299 where it was found that computer_name is not optional (as
the msdn documentation states)

```
make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMVirtualMachine_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v -run=TestAccAzureRMVirtualMachine_ -timeout 120m
=== RUN   TestAccAzureRMVirtualMachine_basicLinuxMachine
--- PASS: TestAccAzureRMVirtualMachine_basicLinuxMachine (403.53s)
=== RUN   TestAccAzureRMVirtualMachine_tags
--- PASS: TestAccAzureRMVirtualMachine_tags (488.46s)
=== RUN   TestAccAzureRMVirtualMachine_updateMachineSize
--- PASS: TestAccAzureRMVirtualMachine_updateMachineSize (601.82s)
=== RUN   TestAccAzureRMVirtualMachine_basicWindowsMachine
--- PASS: TestAccAzureRMVirtualMachine_basicWindowsMachine (646.75s)
=== RUN   TestAccAzureRMVirtualMachine_windowsUnattendedConfig
--- PASS: TestAccAzureRMVirtualMachine_windowsUnattendedConfig (891.42s)
=== RUN   TestAccAzureRMVirtualMachine_winRMConfig
--- PASS: TestAccAzureRMVirtualMachine_winRMConfig (768.73s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	3800.734s
```
2016-07-20 20:03:54 +01:00
Paul Stack 7ad4220ea9 Update CHANGELOG.md 2016-07-20 20:03:46 +01:00
Peter McAtominey c9138daacc provider/azurerm: dump entire Request/Response in autorest Decorator (#7719) 2016-07-20 20:02:40 +01:00
Paul Stack b4fa54e3c0 provider/aws: Support Import `aws_rds_cluster` (#7366)
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSRDSCluster_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSRDSCluster_importBasic -timeout 120m
=== RUN   TestAccAWSRDSCluster_importBasic
--- FAIL: TestAccAWSRDSCluster_importBasic (122.71s)
    testing.go:255: Step 1 error: ImportStateVerify attributes not
    equivalent. Difference is shown below. Top is actual, bottom is
    expected.

    (map[string]string) {

    }

(map[string]string) (len=1) {
         (string) (len=19) "skip_final_snapshot": (string) (len=4) "true"

}

FAIL
exit status 1
FAIL    github.com/hashicorp/terraform/builtin/providers/aws    122.733s
make: *** [testacc] Error 1
```
2016-07-20 19:53:37 +01:00
Paul Stack 7879450cf3 provider/aws: Fix the import of `aws_redshift_cluster` breaking (#7677)
`skip_final_snapshot`

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_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=TestAccAWSRedshiftCluster_importBasic -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_importBasic
--- PASS: TestAccAWSRedshiftCluster_importBasic (641.87s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    641.888s
```
2016-07-20 19:38:44 +01:00
Paul Stack 4ab654a6f6 Update CHANGELOG.md 2016-07-20 19:37:54 +01:00
Paul Stack 5cd1b6624a provider/aws: Support Tags on `aws_rds_cluster` (#7695)
Fixes #7692

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSCluster_'
==> 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=TestAccAWSRDSCluster_
-timeout 120m
=== RUN   TestAccAWSRDSCluster_basic
--- PASS: TestAccAWSRDSCluster_basic (160.77s)
=== RUN   TestAccAWSRDSCluster_updateTags
--- PASS: TestAccAWSRDSCluster_updateTags (329.20s)
=== RUN   TestAccAWSRDSCluster_encrypted
--- PASS: TestAccAWSRDSCluster_encrypted (227.29s)
=== RUN   TestAccAWSRDSCluster_backupsUpdate
--- PASS: TestAccAWSRDSCluster_backupsUpdate (196.92s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    914.199s
```
2016-07-20 19:37:26 +01:00
Paul Stack 2de5d31819 Update CHANGELOG.md 2016-07-20 19:37:19 +01:00
Paul Stack ee9114bcc4 provider/aws: Fix bug with Updating `aws_autoscaling_group` (#7698)
`enabled_metrics`

Fixes #7693

The metrics_granularity parameter was not being passed to the
`EnableMetricsCollection` when we were calling it from the Update func.
this was causing the API call to silently fail and not update the
metrics for collection - unfortunately the enabled_metrics were still
being added to the state :(

By passing the granularity, we now get the correct metrics for
collection

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAutoScalingGroup_'
==> 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=TestAccAWSAutoScalingGroup_ -timeout 120m
=== RUN   TestAccAWSAutoScalingGroup_importBasic
--- PASS: TestAccAWSAutoScalingGroup_importBasic (166.86s)
=== RUN   TestAccAWSAutoScalingGroup_basic
--- PASS: TestAccAWSAutoScalingGroup_basic (240.23s)
=== RUN   TestAccAWSAutoScalingGroup_autoGeneratedName
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (50.29s)
=== RUN   TestAccAWSAutoScalingGroup_terminationPolicies
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (79.93s)
=== RUN   TestAccAWSAutoScalingGroup_tags
--- PASS: TestAccAWSAutoScalingGroup_tags (270.79s)
=== RUN   TestAccAWSAutoScalingGroup_VpcUpdates
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (77.76s)
=== RUN   TestAccAWSAutoScalingGroup_WithLoadBalancer
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (400.67s)
=== RUN   TestAccAWSAutoScalingGroup_withPlacementGroup
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (134.39s)
=== RUN   TestAccAWSAutoScalingGroup_enablingMetrics
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (305.32s)
=== RUN   TestAccAWSAutoScalingGroup_withMetrics
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (48.56s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws
1774.819s
```
2016-07-20 19:36:45 +01:00
James Bardin 87a5ce8045 Add tests for maps with dots
This adds some unit tests for config maps with dots in the key values.
We check for maps with keys which have overlapping names. There are
however still issues with nested maps which create overlapping flattened
names, as well as nested lists with dots in the key.
2016-07-20 14:08:14 -04:00
Paul Stack c664f57016 Update CHANGELOG.md 2016-07-20 17:01:35 +01:00
Paul Stack 0edf83008c provider/aws: Support `task_role_arn` on `aws_ecs_task_definition` (#7653)
Fixes #7633
2016-07-20 17:00:57 +01:00
Joe Topjian f529cae42a provider/openstack: Documenting resources that support importing (#7716)
Also removing some unneeded region arguments in the examples.
2016-07-20 16:37:17 +01:00
Joe Topjian af26350f49 Update CHANGELOG.md 2016-07-20 08:24:32 -06:00
Joe Topjian 30273faf20 Merge pull request #7649 from jtopjian/openstack-boot-volume-fix
provider/openstack: Fixing boot volume interference
2016-07-20 08:23:09 -06:00
James Bardin 8dcbc0b0a0 Add concat to accept lists of lists and maps
This will allow the concat interpolation function to accept lists of
lists, and lists of maps as well as strings. We still allow bare strings
for backwards compatibility, but remove some of the old comment wording
as it could cause confusion of this function with actual string
concatenation.

Since maps are now supported in the config, this removes the superfluous
(and failing) TestInterpolationFuncConcatListOfMaps.
2016-07-19 17:45:50 -04:00
James Bardin 2bd7cfd5fe Expand list interpolation to lists and maps
Allow lists and maps within the list interpolation function via variable
interpolation. Since this requires setting the variadic type to TypeAny,
we check for non-heterogeneous lists in the callback.
2016-07-19 13:44:37 -04:00
Paul Stack 2559c19c8d Website: Adding an import section to the bottom of the page of importable resources (#7703)
* docs/digitalocean: Adding an import section to the bottom of the DO
importable resources

* docs/azurerm: Adding the Import sections for the AzureRM Importable resources

* docs/aws: Adding the import sections to the AWS provider pages
2016-07-19 17:22:30 +01:00
Paul Hinze e1c3eba144 Update CHANGELOG.md 2016-07-19 09:29:05 -05:00
Paul Hinze 62ec69a66a Merge pull request #7669 from kwilczynski/fix/aws-network-acl-rule
Fix icmp_type and icmp_code in aws_network_acl_rule.
2016-07-19 09:27:42 -05:00
stack72 a44573140b
Merge branch 'master' of github.com:hashicorp/terraform 2016-07-19 09:36:32 +01:00
stack72 fadfea45f4
Website: Change the link to AzureRM ScaleSets as the link was throwing a 404 2016-07-19 09:36:24 +01:00
avichalbadaya 7369c1c9f4 Allowing ap-south-1 (Mumbai) as valid AWS region (#7688)
* Update website_endpoint_url_test.go

Allow ap-south-1 (Mumbai) as valid region

* Update hosted_zones.go

Allowing ap-south-1 (Mumbai) as valid region

* Update website_endpoint_url_test.go

reformatting

* Update hosted_zones.go

reformatting

* Update resource_aws_s3_bucket.go

making changes for ap-south-1 (Mumbai) region
2016-07-19 09:01:49 +01:00
Paul Stack 565733398d provider/aws: Support Import of `aws_cloudwatch_metric_alarm` (#7687)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm_'
==> 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=TestAccAWSCloudWatchMetricAlarm_ -timeout 120m
=== RUN   TestAccAWSCloudWatchMetricAlarm_importBasic
--- PASS: TestAccAWSCloudWatchMetricAlarm_importBasic (17.82s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_basic
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (17.11s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    34.957s
```
2016-07-19 05:52:02 +02:00
James Nugent 58dd41f3b1 core: Add list() interpolation function
The list() interpolation function provides a way to add support for list
literals (of strings) to HIL without having to invent new syntax for it
and modify the HIL parser.

It presents as a function, thus:

    - list() -> []
    - list("a") -> ["a"]
    - list("a", "b") -> ["a", "b"]

Thanks to @wr0ngway for the idea of this approach, fixes #7460.
2016-07-18 18:12:11 -04:00
James Nugent 1cf1b5c9d6 Merge pull request #7689 from hashicorp/f-variables-as-complex-types
core: Convert context vars to map[string]interface{}
2016-07-18 13:50:17 -05:00
James Nugent 3735140286 core: Don't set variables for Atlas until lib is updated 2016-07-18 13:10:33 -05:00
James Nugent 5d18f41f04 core: Convert context vars to map[string]interface{}
This is the first step in allowing overrides of map and list variables.
We convert Context.variables to map[string]interface{} from
map[string]string and fix up all the call sites.
2016-07-18 13:02:54 -05:00