Commit Graph

4326 Commits

Author SHA1 Message Date
stack72 3332f757cb provider/aws: Support Import for `aws_vpc_endpoint`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpcEndpoint_
-timeout 120m
=== RUN   TestAccAWSVpcEndpoint_importBasic
--- PASS: TestAccAWSVpcEndpoint_importBasic (45.90s)
=== RUN   TestAccAWSVpcEndpoint_basic
--- PASS: TestAccAWSVpcEndpoint_basic (46.64s)
=== RUN   TestAccAWSVpcEndpoint_withRouteTableAndPolicy
--- PASS: TestAccAWSVpcEndpoint_withRouteTableAndPolicy (91.91s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    184.470s
```
2016-06-23 02:48:59 +01:00
Clint f4a1833baf provider/aws: Bundle IOPs and Allocated Storage update for DB Instances (#7203) 2016-06-21 14:53:13 -05:00
clint shryock 005d9a12e0 provider/aws: Update IAM / ELB server certs from expired ones 2016-06-21 13:54:40 -05:00
Radek Simko 6fed5eb8f0 aws: Use new STS endpoint to validate creds (#6536) 2016-06-20 23:14:07 +01:00
David Harris c7eb8a2022 provider/aws: elastic beanstalk invalid setting crash (#7222)
* Only check the `cnamePrefix` if the CNAME is not nil

* Get Elastic Beanstalk error messages
2016-06-20 16:21:15 -05:00
clint shryock ecc455ebb4 provider/aws: Guard against nil values in EC2 Tags 2016-06-20 15:53:04 -05:00
David Tolnay 0b9fb1d8f8
Stop swallowing errors from DescribeAlarms
This caused alarms to be created repeatedly if Terraform is running without
DescribeAlarms permission.
2016-06-18 15:57:52 -07:00
James Bardin 2a2f7cbc52 Merge pull request #7205 from hashicorp/jbardin/GH-2027
core: don't check any parts of a computed set in InstanceDiff.Same
2016-06-17 11:00:29 -04:00
Radek Simko 2cdb5a367e aws/route53_zone: Make delegation_set_id conflict w/ vpc_id (#7213)
- as per the API reference it is not possible to use delegation sets w/ private hosted zones
   - http://docs.aws.amazon.com/Route53/latest/APIReference/API-create-hosted-zone-private.html
   - http://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html
 - if you specify both AWS returns confusing error "InvalidInput" with no further details so this should reduce potential confusions & improve UX
2016-06-17 12:35:49 +01:00
stack72 7b482cca9b provider/mysql: Empty Provider Credentials Caused Panic
There are currently no checks on username and endpoint in the provider
schema from being an empty value. This PR adds support to make sure that
endpoint and username are not empty strings as that can cause a panic

Results of the PR:

```
 % terraform apply
There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

  * provider.mysql: Endpoint must not be an empty string
```
2016-06-17 11:32:30 +01:00
James Bardin a3e2c99219 Add a failing acceptance test from GH-2027 2016-06-16 18:43:15 -04:00
James Bardin f65a898a51 Merge pull request #7188 from hashicorp/jbardin/GH-7017
provider/aws: Check for unassigned AWS Cookie Stickiness Policy
2016-06-16 11:35:05 -04:00
Clint 24bcac42be provider/aws: Retry EIP association (#7186) 2016-06-16 10:03:16 -05:00
James Bardin cfd8254db8 Check for existing but unassigned LB policies
If an AWS Cookie Stickiness Policy is removed from the listener in
the AWS console the policy isn't deleted. Cross reference the policy
name with those assigned to the listener to determine if the policy
is actually being used.
2016-06-16 10:10:52 -04:00
Brian Edwards d79879dba4 provider/datadog: add timeboard resource. upgrade vendored go-datadog-api to support read-only option. (#6900) 2016-06-15 18:44:49 +02:00
James Nugent 14ff584cc6 Merge pull request #7150 from hashicorp/arm-maxitems
provider/azurerm: Change `azurerm_virtual_machine` to use MaxItems
2016-06-15 18:21:32 +02:00
Martin Atkins ce447e8e2a aws_availability_zones output as "names" rather than "instance" (#7162)
Since this resource produces a list it feels more intuitive to give its
attribute a plural name, and since the noun "instance" already means
something specific in the AWS provider that doesn't apply here we use
"names" to indicate that these are availability zone names.

Also includes updating the docs to not show a dynamic count example for
now, since we don't support that yet.
2016-06-15 15:17:12 +02:00
James Bardin e2d257372a Merge pull request #7166 from hashicorp/jbardin/GH-7065
provider/aws: Check for LoadBalancerNotFound when reading AppCookieStickinessPolicy
2016-06-15 08:59:58 -04:00
James Bardin d4d8a99ba4 Check for LoadBalancerNotFound
When reading an AppCookieStickinessPolicy check for LoadBalancerNotFound
as well as PolicyNotFound. This prevents errors when when destroying a
policy on an ELB that no longer exists.
2016-06-14 17:58:48 -04:00
Clint 627efa21f4 provider/aws: Retry RouteTable Route/Assocation creation (#7156)
* provider/aws: Retry RouteTable Assocation creation

* provider/aws: retry route creation

* remove extra string check
2016-06-14 15:39:52 -05:00
clint shryock 4796e27d1a provider/aws: Randomize Cluser Param group name to avoid collision 2016-06-14 10:42:36 -05:00
clint shryock 8f216563aa provider/aws: Fix db instance snapshot tests 2016-06-13 10:05:01 -05:00
stack72 e57ee0a067 provider/azurerm: Change `azurerm_virtual_machine` to use MaxItems
There were lots of hacky checks in the ARM VM resource to check for a
length of 1 param block

MaxItems was introduced so this PR updates to use MaxItems
2016-06-13 13:25:32 +02:00
James Nugent 25dbdc5187 Merge pull request #7127 from hashicorp/b-remote-state-fix
core + provider/terraform: Fix outputs in remote state
2016-06-11 17:16:19 +01:00
James Nugent bdc6a49ae3 provider/terraform: Fix outputs from remote state
The work integrated in hashicorp/terraform#6322 silently broke the
ability to use remote state correctly. This commit adds a fix for that,
making use of the work integrated in hashicorp/terraform#7124.

In order to deal with outputs which are complex structures, we use a
forked version of the flatmap package - the difference in the version
this commit vs the github.com/hashicorp/terraform/flatmap package is
that we add in an additional key for map counts which state requires.
Because we bypass the normal helper/schema mechanism, this is not set
for us.

Because of the HIL type checking of maps, values must be of a homogenous
type. This is unfortunate, as it means we can no longer refer to outputs
as:

    ${terraform_remote_state.foo.output.outputname}

Instead we had to bring them to the top level namespace:

    ${terraform_remote_state.foo.outputname}

This actually does lead to better overall usability - and the BC
breakage is made better by the fact that indexing would have broken the
original syntax anyway.

We also add a real-world test and assert against specific values. Tests
which were previously acceptance tests are now run as unit tests, so
regression should be identified at a much earlier stage.
2016-06-11 16:53:45 +01:00
Joe Topjian 8d78f9c4e1 Merge pull request #7120 from jtopjian/openstack-lbaas-updates
provider/openstack: lbaas v2 updates
2016-06-11 09:05:51 -06:00
Paul Stack ab721e2ffc provider/azurerm: Fix `azurerm_virtual_machine` windows_config (#7123)
When using winrm config block, we had an address issue. This is no
longer a set but a list (As a list fits it more approp)

    ```
    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 (587.80s)
    === RUN   TestAccAzureRMVirtualMachine_tags
    --- PASS: TestAccAzureRMVirtualMachine_tags (554.53s)
    === RUN   TestAccAzureRMVirtualMachine_updateMachineSize
    --- PASS: TestAccAzureRMVirtualMachine_updateMachineSize (612.52s)
    === RUN   TestAccAzureRMVirtualMachine_basicWindowsMachine
    --- PASS: TestAccAzureRMVirtualMachine_basicWindowsMachine (765.90s)
    === RUN   TestAccAzureRMVirtualMachine_windowsUnattendedConfig
    --- PASS: TestAccAzureRMVirtualMachine_windowsUnattendedConfig
    (770.53s)
    === RUN   TestAccAzureRMVirtualMachine_winRMConfig
    --- PASS: TestAccAzureRMVirtualMachine_winRMConfig (827.90s)
    PASS
    ok      github.com/hashicorp/terraform/builtin/providers/azurerm
    4119.192s
    ```
2016-06-11 13:28:18 +02:00
Paul Stack b4ed5dfba3 provider/azurerm: VMSS Tests still used old naming convention (#7121) 2016-06-11 10:12:20 +02:00
Joe Topjian f563b24002 provider/openstack: lbaas v2 updates
This commit cleans up the acceptance test formatting for the lbaas v2
resources. It also modifies the devstack script to enable the lbaas
v2 service for testing. Finally, this commit increases the timeout
for load balancer creation since it takes some time to do within
devstack.
2016-06-11 04:20:44 +00:00
Paul Stack 514d8422f3 provider/azurerm: Add `azurerm_virtual_machine_scale_set` resource (#6711) 2016-06-11 00:37:14 +02:00
Paul Stack 5e23e87c30 provider/aws: `aws_db_instance` change to the default for (#7118)
`publicly_accessible` to be false
2016-06-11 00:13:53 +02:00
Paul Hinze bba5a38c95 Merge pull request #7116 from hashicorp/b-aws-map-list-test-merrymaking
provider/aws: Clean up some map/set test checks
2016-06-10 16:57:24 -05:00
Paul Stack 5ecc8e3169 provider/aws: `aws_db_instance` now defaults `publicly_accessible` to (#7117)
false

Fixes #7035

A known issue in Terraform means that d.GetOk() on a bool which is false
will mean it doesn't get evaulated. Therefore, when people set
publicly_accessible to false, it will never get evaluated on the Create

We are going to make it default to false now
2016-06-10 23:55:36 +02:00
Paul Stack 5644545680 provider/azurerm: DNS CNAME resource wasn't posting records (#7113)
* provider/azurerm: DNS CNAME resource wasn't posting records

Azure changed the API for CNAME at some point and since then we haven't
been creating CNAME records. The API changes from []records to a single
record

This PR changes the schema for dns cnames to have a record parameter and
adds a deprecation warning around records. Talked with @jen20 on this
and we decided that it's currently broken and we should handle this as
part of 0.7 where there are other breaking changes

```
TF_LOG=1 make testacc TEST=./builtin/providers/azurerm
TESTARGS='-run=TestAccAzureRMDnsCNameRecord' 2>~/tf.log
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMDnsCNameRecord -timeout 120m
=== RUN   TestAccAzureRMDnsCNameRecord_basic
--- PASS: TestAccAzureRMDnsCNameRecord_basic (97.22s)
=== RUN   TestAccAzureRMDnsCNameRecord_subdomain
--- PASS: TestAccAzureRMDnsCNameRecord_subdomain (94.94s)
=== RUN   TestAccAzureRMDnsCNameRecord_updateRecords
--- PASS: TestAccAzureRMDnsCNameRecord_updateRecords (116.62s)
```

* Change DNS Records to removed rather than deprecated
2016-06-10 23:53:32 +02:00
Paul Hinze 81a436e956 Merge pull request #7105 from hashicorp/b-arm-vm-winconfig
provider/azurerm: `azurerm_virtual_machine` Windows_config
2016-06-10 16:17:09 -05:00
Paul Hinze 757aae538b Merge pull request #7012 from hpcloud/lbaas-v2
OpenStack LBaaS v2 Support
2016-06-10 16:07:10 -05:00
stack72 155a47fa80 provider/azurerm: `azurerm_virtual_machine` Windows_config
Fixes #7053 where, when using `additional_unattend_config` in
`os_profile_windows_config` we got an error as follows:

```
azurerm_virtual_machine.test: [DEBUG] Error setting Virtual Machine
Storage OS Profile Windows Configuration: &errors.errorString{s:"Invalid
address to set: []string{\"os_profile_windows_config\", \"1534614206\",
\"additional_unattend_config\"}"}
```
2016-06-10 19:33:09 +01:00
clint shryock 88ed387bd6 fix up cloudformation test checks 2016-06-10 12:52:10 -05:00
clint shryock 0530cf963d provider/aws: revert # -> % for tests 2016-06-10 12:45:24 -05:00
clint shryock fad26ec59e provider tests: Update to match new tags map in state 2016-06-10 10:07:02 -05:00
Clint 19eb0079db provider/aws: update asg placement group test name, to fix import test (#7095) 2016-06-10 09:01:30 -05:00
Clint 6318b8fd4c provider/aws: Rename parameter_group_name to db_cluster_parameter_group_name (supersedes #7068) (#7083)
* modify parameter_group_name to db_cluster_parameter_group_name #7046

* provider/aws: Deprecate parameter_group_name in RDS Cluster

Use db_cluster_parameter_group_name instead
2016-06-09 16:45:29 -05:00
Clint 5e26cb9960 provider/aws: Update Lambda functions on name change (#7081)
Allows the updating of Lambda functions on name change alone
2016-06-09 16:44:10 -05:00
clint shryock 253a46b573 provider/aws: Randomize names in code deploy test to reduce chances of name collision on tests 2016-06-09 15:39:35 -05:00
dkalleg 8467f5219e OpenStack LBaaS v2 Support
CRUD, tests and Docs for managing a LoadBalancer, Listener,
Pool, Member, and Monitor resources.
2016-06-09 13:19:52 -07:00
James Nugent 57cf9fd295 Merge pull request #7082 from hashicorp/b-empty-map-types
core: Make lists and maps distinguishable in state
2016-06-09 12:36:24 +02:00
James Nugent 75ef7ab636 provider/test: Add more variants of maps
This commit adds a binary for the test provider, and adds a variety of
different types of map to the schema.
2016-06-09 10:49:49 +01:00
Benjamin Chelli cc22cef085 DigitalOcean - droplet always being recreated (#7044)
The region returned by the API is always lowercase therefore when you specify a region uppercase in your config file it forces the droplet to be regenerated on every ```terraform apply``` (even when it is not needed).
2016-06-09 10:23:44 +02:00
dkalleg fb6f2bc750 provider/vSphere - Add DiskEnableUUID option (#7088)
Since the custom_configuration_parameters can't take dots, we cannot
set 'disk.EnableUUID'.  This adds a parameter for this options that gets
added to a configSpec. This option causes the vm to mount disks by uuid
on the guest OS.
2016-06-09 10:19:10 +02:00
Paul Forman 391a7f85b0 provider/aws: Fix issue with Root Block Devices and encrypted flag in Launch Configurations [GH-6512]
Fixed the problem where the root_block_device could cause an apply error
by reading back an "encrypted" parameter that was meant for an
ebs_block_device.  "encrypted" is not part of the root_block_device
schema, since it can't be set explicitly.

Added a check in Create to fail when the root device is incorrectly
specified as an ebs_block_device, as this causes continual refreshing
due to mismatched state between root_block_device and ebs_block_device.

"encrypted" and "snapshot_id" should be guarded with ConflictsWith, but
that doesn't appear to work on nested resources despite #1926.
2016-06-08 15:56:27 -05:00