Commit Graph

3979 Commits

Author SHA1 Message Date
Martin Atkins 6cd22a4c9a helper/schema: emit warning when using data source resource shim
For backward compatibility we will continue to support using the data
sources that were formerly logical resources as resources for the moment,
but we want to warn the user about it since this support is likely to
be removed in future.

This is done by adding a new "deprecation message" feature to
schema.Resource, but for the moment this is done as an internal feature
(not usable directly by plugins) so that we can collect additional
use-cases and design a more general interface before creating a
compatibility constraint.
2016-05-14 08:26:36 -07:00
Martin Atkins 3eb4a89104 provider/terraform: remote state resource becomes a data source
As a first example of a real-world data source, the pre-existing
terraform_remote_state resource is adapted to be a data source. The
original resource is shimmed to wrap the data source for backward
compatibility.
2016-05-14 08:26:36 -07:00
James Nugent f331240601 Merge pull request #6574 from uber/b-gcp-acc-test-env
provider/google: correct error messages in acceptance tests
2016-05-13 17:29:56 -04:00
Paul Stack cf37c3adaa provider/aws: Add support for `kms_key_id` to `aws_db_instance` (#6651)
As requested in #4822, add support for a KMS Key ID (ARN) for Db
Instance

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSDBInstance_kmsKey' 2>~/tf.log
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSDBInstance_kmsKey -timeout 120m
=== RUN   TestAccAWSDBInstance_basic
--- PASS: TestAccAWSDBInstance_basic (587.37s)
=== RUN   TestAccAWSDBInstance_kmsKey
--- PASS: TestAccAWSDBInstance_kmsKey (625.31s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    1212.684s
```
2016-05-13 11:20:29 -05:00
clint shryock 2047da21d5 provider/aws: Update hash in Redshift Security Group test 2016-05-13 10:52:21 -05:00
thetuxkeeper 279eead08e disable unsupported customization parameters (#6656) 2016-05-13 15:56:15 +01:00
thetuxkeeper 390b0d5ab9 provider/vsphere: govmomi v0.6.1 update and fixes (#6479)
* vendor: Update dependency vmware/govmomi

* fixed data types

* fixed RemoveDevice

* fixed CreateDisk usage
2016-05-13 15:27:45 +01:00
David Harris 0cb7496b3a provider/aws: fix Elastic Beanstalk `cname_prefix` (#6653)
Fixes an issue where the `cname_prefix` attribute isn't correctly read
in some regions.
2016-05-13 11:27:56 +01:00
Anton Koldaev 266e98eb30 Make the OpsWorks app_source SSH key write only
Similarly to https://github.com/hashicorp/terraform/pull/4241 prevent ssh_key in OpsWorks application app_source key from re-applying every time.
2016-05-12 16:35:25 -07:00
clint shryock f70f778a5a provider/aws: Randomize DB Option Group Name to avoid name conflicts in Travis CI 2016-05-12 11:15:36 -05:00
clint shryock baed5dda36 provider/aws: Remove empty config in test 2016-05-12 09:34:16 -05:00
thetuxkeeper 510b2934f0 fix gateway for dhcp (#6635) 2016-05-12 13:54:29 +01:00
Paul Stack 61b5176fbe provider/aws: Updating state when `aws_sns_topic_subscription` is (#6629)
missing

Fixes #6625

When an SNS topic subscription was created with TF and then removed via
the AWS Console, Terraform threw an error:

```
* aws_sns_topic_subscription.testme: NotFound: Subscription does not
* exist
    status code: 404, request id: a22e7ed7-3630-5a8a-b767-317ac1440e24
```

This PR will remove the topic subscription from state on a NotFound and
will then readd the subscripton
2016-05-12 13:46:22 +01:00
Evan Brown 55742acf12 providers/google: support optionial uuid naming for Instance Template (#6604)
Auto-generating an Instance Template name (or just its suffix) allows the
create_before_destroy lifecycle option to function correctly on the
Instance Template resource. This in turn allows Instance Group Managers
to be updated without being destroyed.
2016-05-11 22:54:47 +01:00
stack72 cb4c8e6864 Merge branch 'Ticketmaster-db_option_group_settings' 2016-05-11 22:44:27 +01:00
stack72 420b24fa90 provider/aws: Fix `aws_db_option_group` `option_settings` test for
correct hash value
2016-05-11 22:43:17 +01:00
Mitchell Hashimoto 1c81aa3471
providers/aws: aws_security_group import test 2016-05-11 13:02:37 -07:00
James Nugent bf8d788489
provider/triton: Import triton_machine resources 2016-05-11 13:02:36 -07:00
James Nugent 03fe5a7467
provider/triton: Import triton_vlan resources 2016-05-11 13:02:36 -07:00
James Nugent 655bb4b286
provider/triton: import triton_firewall_rule 2016-05-11 13:02:36 -07:00
James Nugent e1e1a08569
provider/triton: support importing triton_key 2016-05-11 13:02:36 -07:00
Mitchell Hashimoto 6bdab07174
providers/aws: security group import imports rules 2016-05-11 13:02:36 -07:00
Mitchell Hashimoto 84fa3e5c9e
providers/aws: security group import 2016-05-11 13:02:36 -07:00
Mitchell Hashimoto eb9cb46256
providers/aws: enable aws_eip importing 2016-05-11 13:02:34 -07:00
Albert Choi 01fc4b9cdd [clc] add missing ForceNew on several fields 2016-05-11 11:39:35 -07:00
Paul Stack 06b5cf737c provider/aws: `aws_codedeploy_deployment_group` Panics when setting (#6617)
`on_premises_instance_tag_filter`

When setting `on_premises_instance_tag_filter`, Terraform was not
pushing the changes on the cReate (due to a spelling mistake). A second
apply would push the tags and then cause a panic. Terraform was building
a ec2.Tagfilter struct without checking for optional values. When the
TagFilter was being dereferenced, it caused a panic
2016-05-11 18:38:03 +01:00
clint shryock e33847c8a8 Merge branch 'master' of github.com:hashicorp/terraform
* 'master' of github.com:hashicorp/terraform:
  Update CHANGELOG.md
  provider/vsphere: read gateway and ipv6_gateway
  provider/aws: Fix cloudtrail_tags config formatting in test (#6615)
  build: "make fmt" to ignore vendor packages
2016-05-11 10:39:21 -05:00
clint shryock 8344b4fb4b provider/aws: Format and correct IAM region for Cloudwatch test 2016-05-11 10:39:14 -05:00
thetuxkeeper 5984f84c12 provider/vsphere: read gateway and ipv6_gateway
read gateway and ipv6_gateway information for vsphere_virtual_machine resources.
2016-05-11 11:21:54 -04:00
Clint 250ee8d089 provider/aws: Fix cloudtrail_tags config formatting in test (#6615) 2016-05-11 10:18:45 -05:00
stack72 87d4fd7e0c Merge branch 'db_option_group_settings' of https://github.com/Ticketmaster/terraform into Ticketmaster-db_option_group_settings 2016-05-10 22:37:14 +01:00
Paul Stack 8fce851878 provider/azurerm: Fixing Acceptance Test for VM tags (#6589) 2016-05-10 22:31:56 +01:00
James Nugent 6aac79e194 state: Add support for outputs of multiple types
This commit adds the groundwork for supporting module outputs of types
other than string. In order to do so, the state version is increased
from 1 to 2 (though the "public-facing" state version is actually as the
first state file was binary).

Tests are added to ensure that V2 (1) state is upgraded to V3 (2) state,
though no separate read path is required since the V2 JSON will
unmarshal correctly into the V3 structure.

Outputs in a ModuleState are now of type map[string]interface{}, and a
test covers round-tripping string, []string and map[string]string, which
should cover all of the types in question.

Type switches have been added where necessary to deal with the
interface{} value, but they currently default to panicking when the input
is not a string.
2016-05-10 14:40:12 -04:00
Bill Fumerola 7dcb4974a1 Correct error messages in google provider test library 2016-05-10 10:59:11 -07:00
Albert Choi 94a7c69153 [clc] additional server types + docs 2016-05-10 10:36:52 -07:00
Albert Choi 8ab63c2d52 [clc] add packages to server at create 2016-05-10 10:36:52 -07:00
Albert Choi eb4963a853 [clc] password now computed+optional 2016-05-10 10:36:49 -07:00
Kraig Amador dc4dd764e6 Adding option_settings to aws_db_option_group 2016-05-09 12:40:38 -07:00
Kevin DeJong 0cec1c19d7 Add support for the Base URL endpoint so the GitHub provider can support GitHub Enterprise (#6434) 2016-05-09 19:22:53 +01:00
Clint 3eee40cd98 provider/fastly: Add support for Conditions for Fastly Services (#6481)
* provider/fastly: Add support for Conditions for Fastly Services

Docs here:

- https://docs.fastly.com/guides/conditions/

Also Bump go-fastly version for domain support in S3 Logging
2016-05-09 14:08:13 -04:00
Antoine Rouaze a105de19c0 [azurerm] Add os_type and image_uri in azurerm_virtual_machine (#6553)
Fix #6372

Partial fix of #6526
2016-05-09 18:51:19 +01:00
Paul Stack af29a61748 provider/aws: Change `aws_elastic_ip_association` to have computed parameters (#6552)
* New top level AWS resource aws_eip_association

* Add documentation for aws_eip_association

* Add tests for aws_eip_association

* provider/aws: Change `aws_elastic_ip_association` to have computed
parameters

The AWS API was send ing more parameters than we had set. Therefore,
Terraform was showing constant changes when plans were being formed
2016-05-09 18:40:45 +01:00
James Nugent 2d19957d8b Merge pull request #6558 from hashicorp/b-aws-db-option-group-name
provider/aws: Update paramter for DB Option Group
2016-05-09 13:33:25 -04:00
clint shryock f8d59b9e97 provider/aws: Update paramter for DB Option Group 2016-05-09 12:16:26 -05:00
Paul Stack d3939db0a1 provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine` (#6556)
provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine`
2016-05-09 18:14:02 +01:00
Clint 4d66f1ca94 provider/aws: Opsworks Agent has a default, needs to be computed (#6555) 2016-05-09 11:26:16 -05:00
Felivel Camilo 156d2916d8 Adding private ip address reference to azurerm network interface (#6538)
* Adding private ip address reference

* adding private ip address reference
* Updating the docs.

* Removing optional attrib from private_ip_address

Removing optional attribute from private_ip_address, this element is only being used in the read.

* Selecting the first element instead of using a loop for now.
Change this to a loop when https://github.com/Azure/azure-sdk-for-go/issues/259 is fixed
2016-05-09 15:21:15 +01:00
James Nugent a3d1e9d9b7 Merge pull request #6543 from hashicorp/arm-vm-data_disk
provider/azurerm: Error creating `azurerm_virtual_machine` data_disk
2016-05-08 19:55:19 -04:00
stack72 8dc47ac799 provider/azurerm: Error creating `azurerm_virtual_machine` data_disk
The `storage_data_disk` was trying to use vhd_url rather than vhd_uri.
This was causing an error on creating a new data_disk as part of a VM

Also added validation as data_disks can only be 1 - 1023 GB in size
2016-05-09 00:48:01 +01:00
James Nugent affd2b3f3b Merge pull request #6505 from hashicorp/b-cloudfront-cookies
provider/aws: Require cookies for Cloudfront Distributions
2016-05-08 19:45:37 -04:00