Commit Graph

7671 Commits

Author SHA1 Message Date
James Bardin 5303137b8c udpate test configs to work with hcl2
The last 2 broken tests will be hanlded later
2018-10-16 19:14:54 -07:00
Martin Atkins 9f1098ac5f builtin/providers/terraform: Fix tests
Various things drifted since these tests were originally written. This
catches them up to the latest implementations of state decoding,
upgrading, etc.
2018-10-16 19:14:11 -07:00
Martin Atkins 8c67fd52b0 builtin/providers: Don't panic if requested remote state isn't present 2018-10-16 19:14:11 -07:00
Martin Atkins d11dd20bf3 builtin/providers/test: use new API for root module address
terraform.RootModulePath is no longer present, but
addrs.RootModuleInstance is equivalent to it.
2018-10-16 19:14:11 -07:00
Martin Atkins 630b0d147d providers/terraform: Always produce correctly-typed result
We need to produce values for all of the attributes implied by our schema,
even if some of them are null.
2018-10-16 19:14:11 -07:00
Martin Atkins 235f582ae5 core: Re-implement EvalReadDataApply against new provider interface 2018-10-16 19:14:11 -07:00
James Bardin faa46d4727 add Close method to the terraform provider
Close is now part of the plugin interfaces, so needs to be implemented
by the terraform provider.
2018-10-16 19:11:09 -07:00
Martin Atkins a3403f2766 terraform: Ugly huge change to weave in new State and Plan types
Due to how often the state and plan types are referenced throughout
Terraform, there isn't a great way to switch them out gradually. As a
consequence, this huge commit gets us from the old world to a _compilable_
new world, but still has a large number of known test failures due to
key functionality being stubbed out.

The stubs here are for anything that interacts with providers, since we
now need to do the follow-up work to similarly replace the old
terraform.ResourceProvider interface with its replacement in the new
"providers" package. That work, along with work to fix the remaining
failing tests, will follow in subsequent commits.

The aim here was to replace all references to terraform.State and its
downstream types with states.State, terraform.Plan with plans.Plan,
state.State with statemgr.State, and switch to the new implementations of
the state and plan file formats. However, due to the number of times those
types are used, this also ended up affecting numerous other parts of core
such as terraform.Hook, the backend.Backend interface, and most of the CLI
commands.

Just as with 5861dbf3fc49b19587a31816eb06f511ab861bb4 before, I apologize
in advance to the person who inevitably just found this huge commit while
spelunking through the commit history.
2018-10-16 19:11:09 -07:00
Kristin Laemmert 52ae93cf97 builtin/providers: terraform remote state datasource (#18446)
* builtin/providers: implement terraform remote state datasource as providers.Interface

* append and return diags separately (to match the idiomatic usage
elsewhere in Terraform)
* diagnostic summary style improvements
* update tests to pass config to schema.CoerceValue
* trust that the schema will be enforced and there is no need to check
that a given attribute exists
* added dataSourceRemoteStateGetSchema() (effectively replacing a
function that was inappropriately removed) for consistency with other
terraform providers
* builtin/provider terraform test: added InternalValidate() test for dataSourceRemoteStateGetSchema
2018-10-16 18:53:51 -07:00
Martin Atkins 5782357c28 backend: Update interface and implementations for new config loader
The new config loader requires some steps to happen in a different
order, particularly in regard to knowing the schema in order to
decode the configuration.

Here we lean directly on the configschema package, rather than
on helper/schema.Backend as before, because it's generally
sufficient for our needs here and this prepares us for the
helper/schema package later moving out into its own repository
to seed a "plugin SDK".
2018-10-16 18:39:12 -07:00
Sander van Harmelen 3e935c846f terraform/terraform_remote_state: accept complex configs
The `remote` backend config contains an attribute that is defined as a `*schema.Set`, but currently only `string` values are accepted as the `config` attribute is defined as a `schema.TypeMap`.

Additionally the `b.Validate()` method wasn’t called to prevent a possible panic in case of unexpected configurations being passed to `b.Configure()`.

This commit is a bit of a hack to be able to support this in the 0.11 series. The 0.12 series will have proper support, so when merging 0.12 this should be reverted again.
2018-08-29 20:21:47 +02:00
Sander van Harmelen 7fb2d1b8de Implement the Enterprise enhanced remote backend 2018-08-03 22:22:55 +02:00
Sander van Harmelen 97d1c46602 Update the backend import names
It’s a purely cosmetic change, but I find it easier to read them like this.
2018-08-03 11:29:11 +02:00
James Bardin e011dd95f3 don't let default workspace override environment
The workspace attribute should only override the environment if it's not
the default value.
2018-03-09 10:27:06 -05:00
James Bardin 13433687cb filter null output values from state
While null values should not normally appear in a state file, we should
filter the values rather than crash.
2018-03-08 11:39:29 -05:00
Nic Cope 5c58ef16f7 provider/terraform: deprecate "environment" in favor of "workspace" 2017-12-05 10:18:28 -08:00
Radek Simko 2974d63e75
Merge pull request #16588 from hashicorp/f-panic-on-invalid-rd-set
helper/schema: Opt-in panic on invalid ResourceData.Set
2017-11-08 19:17:46 +00:00
Radek Simko e93d64b18c
helper/schema: Opt-in panic on invalid ResourceData.Set 2017-11-08 10:05:11 +00:00
Martin Atkins bcc5dffea2 provider/terraform: import terraform provider back into core 2017-11-02 10:48:20 -07:00
Martin Atkins a3ced1a367 provider/terraform: reorganize for merge into core
The "terraform" provider was previously split out into its own repository,
but that turned out to be a mistake due to how tightly it depends on
aspects of Terraform Core.

Here we prepare to bring it back into the core repository by reorganizing
the directory layout to conform with what's expected there.
2017-11-02 10:46:31 -07:00
Chris Marchesi 5d5a670d69 provider/test: Added complex-ish list testing
Added a list SetNew test to try and reproduce issues testing diff
customization with the Nomad provider. We are running into "diffs didn't
match during apply", with the plan diff exhibiting a strange
off-by-one-type error in a list diff:

  datacenters.#:         "1" => "2"
  datacenters.0:         "dc1" => "dc2"
  datacenters.1:         "" => "dc3"
  datacenters.2:         "" => "dc3"

The test here does not reproduce that issue, unfortunately, but should
help pinpoint the root cause through elimination.
2017-11-01 14:25:32 -07:00
Chris Marchesi 529d7e6dae helper/schema: Review -> CustomizeDiff
Restoring the naming of this field in the resource back to
CustomizeDiff, as this is generally more descriptive of the process
that's happening, despite the lengthy name.
2017-11-01 14:25:32 -07:00
Chris Marchesi c6647a3bb7 helper/schema: CustomizeDiff -> Review
To keep with the current convention of most other schema.Resource
functional fields being fairly short, CustomizeDiff has been changed to
"Review". It would be "Diff", however it is already used by existing
functions in schema.Provider and schema.Resource.
2017-11-01 14:25:32 -07:00
Chris Marchesi 8af9610b87 helper/schema: Hook CustomizeDiffFunc into diff logic
It's alive! CustomizeDiff logic now has been inserted into the diff
process. The test_resource_with_custom_diff resource provides some basic
testing and a reference implementation.

There should now be plenty of test coverage for this feature via the
tests added for ResourceDiff, and the basic test added to the
schemaMap.Diff test, and the test resource, but more can be added to
test any specific case that comes up otherwise.
2017-11-01 14:25:32 -07:00
James Bardin 1ab40eae35 remove builtin providers
All providers moved to new repos.

Added README, which also serves to preserve the directory in git in
cacse we want to add select providers back into core (e.g. null,
template, test)
2017-06-12 13:42:06 -04:00
Martin Atkins 33a266d61c provider/terraform: "workspace" argument instead of "environment"
We are moving away from using the term "environment" to describe separate
named states for a single config, using "workspace" instead. The old
attribute name remains supported for backward compatibility, but is
marked as deprecated.
2017-06-09 15:01:39 -07:00
Martin Atkins f695e8b330 provider/test: allow test_resource to be imported
When working on the core import code, it's useful to have a zero-cost
local resource to work with for quick iteration.
2017-06-09 14:03:59 -07:00
stack72 6e7ee05392 Merge branch 'gh3424-vgw-route-prop' 2017-06-09 14:13:27 +03:00
stack72 c7d6dfd7e7 provider/aws: go vet issue with aws_vpn_gateway_route_propagation 2017-06-09 14:12:18 +03:00
Puneeth Nanjundaswamy 4d7c0d4924 fix aws cidr validation error (#15158) 2017-06-09 13:38:34 +03:00
Dana Hoffman 93c6c0de25 provider/google: Add an additional delay when checking for sql operations (#15170) 2017-06-09 13:33:29 +03:00
Jay Wang b465b01355 [MS] provider/azurerm: Data Source for Azure Resource Group (#15022)
* Data Source support for Resource Group

* Better message for mismatching locations.

* Reuse existing read code

* Adds documentation

* Adds test

* Adds a function for composing ID strings

* Change location to computed.
2017-06-09 13:10:42 +03:00
clint shryock d587b68863 provider/aws: Add an explicit depends on for the internet gateway, should help this test pass 2017-06-08 16:44:22 -05:00
clint shryock cd2a0b476b provider/heroku: Update app test to use new Heroku Space 2017-06-08 15:28:19 -05:00
Clint 8c52df5526 provider/heroku: Add support for special HEROKU_SPACES_ORGANIZATION env var for the TestAccHerokuSpace_Basic test (#15191) 2017-06-08 11:57:31 -05:00
Ashish Kumar Thakur a5c208ef68 provider/kubernetes: Add support for pod (#13571)
Add support for K8s pod
2017-06-08 14:58:10 +01:00
Bill Maxwell 305ae18d2c Rancher V2 provider updates (#13908)
* Move to v2 client in vendor directory

* Move to v2 api and project IDs for environments

* add host label support to registration command

* Update go-rancher/catalog

* Allow go-rancher to handle URL versioning
2017-06-08 12:24:53 +03:00
Riley Karson 45d193101c provider/google: Add support for draining_timeout_sec to compute_backend_service. (#14559) 2017-06-07 15:17:49 -07:00
Jan Škrášek 70e8d2d33f provider/aws/spot_fleet_request: fixed reading network associate_public_ip_address configuration (#13748) 2017-06-07 15:14:00 -05:00
Shinichi TAMURA 0b6518a29b provider/google: Changed network argument in google_compute_instance_group as optional (#13493) 2017-06-07 11:20:17 -07:00
Riley Karson f5cccc6b7f Added private_ip_google_access update support to google_compute_subnetwork. (#15125) 2017-06-07 16:52:14 +03:00
Paul Stack 75842077da provider/aws: Add gov and cn hosted zone Ids to aws_elb_hosted_zone data source (#15149)
Fixes: #15128
2017-06-07 13:18:26 +03:00
Gavin Williams a281a29cb6 provider/openstack: Optimize the printing of request/response headers… (#15086)
* provider/openstack: Optimize the printing of request/response headers when debugging Openstack HTTP requests

* provider/openstack: Log the response code aswell
2017-06-06 21:34:44 -06:00
Martin Atkins 1aff439c3d provider/aws: aws_vpn_gateway_route_propagation resource
This is a separate resource that serves a similar purpose to the
propagating_vgws argument on aws_route_table, but allows route
propagations to be created independently of the route table, which in
turn allows the VPN gateway to be created after the route table it will
contribute to, possibly in a separate Terraform module.

To make this work, propagating_vgws on aws_route_table is now marked
as Computed, meaning that it won't try to delete any existing propagation
edges if there is no setting for it in configuration at all. This allows
the user to choose whether to use the argument or the separate resource,
though using both together will not work, as explained in the docs.
2017-06-06 17:56:31 -07:00
Vasily Tarasov 677a418e78 provider/aws: Filter acm certificates by type (#15064)
* Filter ACM certificates by type

* Add schema tests for certificate types
2017-06-06 15:08:52 -05:00
Anthony Stanton 8acd5641eb Librato Alerts fixes (#15118)
* Improve UpdateAlert

* Check for non-nil values before d.Set()

* Initialize struct with required values

* Improve use of d.Set()

* Rely on Terraform MaxItems check

* Simplify Read method

* Catch Retry errors

* Improve test coverage
2017-06-06 19:29:29 +03:00
Clint 372a80bc42 provider/aws: Add Sweeper setup, Sweepers for DB Option Group, Key Pair (#14773)
* provider/aws: Add Sweeper setup, Sweepers for DB Option Group, Key Pair

* provider/google: Add sweeper for any leaked databases
* more recursion and added LC sweeper, to test out the Dependency path

* implement a dependency example

* implement sweep-run flag to filter runs

* stub a test for TestMain

* test for multiple -sweep-run list
2017-06-06 10:34:17 -05:00
Clint 3d1e60b504 provider/google: Update compute_disk to read after update, always set size (#15095) 2017-06-06 09:44:23 -05:00
Radek Simko 3f3664a4e4 provider/aws: Expose reason of EMR cluster termination (#15117) 2017-06-06 13:55:13 +01:00
Riley Karson d4dd0fcdac provider/google: Make google_compute_autoscaler use Update instead of Patch. (#15101)
* Updated google_compute_autoscaler tests so that update fails as expected.

* Changed google_compute_autoscaler's Update function from using Patch to Update.
2017-06-06 15:20:29 +03:00
Riley Karson 0523ccfad2 provider/google: Update health check tests (#15102)
* Made resource_compute_health_check_test perform updates.

* Made resource_compute_http_health_check_test perform updates.

* Made resource_compute_https_health_check_test perform updates.
2017-06-06 15:11:19 +03:00
Abhijeet Gaiha 1819303e65 provider/azurerm: Adding data source support for Public IP (#15110)
* Added support for public IP data source. Tested manually.

* WIP: Update to implementation, basic test added.

* WIP: Updates to implementation, basic test added.

* WIP: Added support for idle timeout

* Completed implementation and basic test

* Added documentation.

* Updated the example so it makes a little more sense.
2017-06-06 14:48:37 +03:00
He Guimin cfc15e030b fix security group rules bug (#15114) 2017-06-06 14:34:07 +03:00
Radek Simko aac988da93 provider/aws: Fix race condition in Beanstalk acc test (#15116) 2017-06-06 12:28:13 +01:00
Joel Thompson 1812ce2ff3 Add task_parameters parameter to aws_ssm_maintenance_window_task resource (#15104)
* Add task_parameters support to aws_ssm_maintenance_window_task

task_parameters weren't supported yet. This adds support for them. It
also corrects a documentation typo in the maintenance_window resource.

* Respond to internal feedback
2017-06-06 14:11:05 +03:00
Paul Morton e4899de13e provider/aws: New SSM Parameter resource (#15035)
* New SSM Parameter resource

Can be used for creating parameters in AWS' SSM Parameter Store that can then be used by other applications that have access to AWS and necessary IAM permissions.

* Add docs for new SSM Parameter resource

* Code Review and Bug Hunt and KMS Key
- Addressed all issues in #14043
- Added ForceNew directive to type
- Added the ability to specify a KMS key for encryption and decryption

* Add SSM Parameter Data Source

* Fix bad merge

* Fix SSM Parameter Integration Tests

* docs/aws: Fix typo in SSM sidebar link
2017-06-06 09:55:25 +01:00
grayaii 42133f2077 ISSUE-10272 Lets not look at the requestor id. (#11849)
* ElastiCache replication group support

- Additional API coverage for ElastiCache replication groups.
- Update rep group error handling.
- ElastiCache rep group -- additional update coverage.
- Response to pull-request feedback for ElastiCache rep groups.
- Fix the replication group deletion code.
- Add rep group test coverage.
- Add preferred az support in elasticcache replication group
- Add PrimaryClusterID to Elasticache Replication Group
- AWS Elasticache Replication Group check if available

* Added ClearCare version number.

* NOJIRA Cherry pick lambda latest s3 version

* NOJIRA fixed merge issue that i missed before.

* NOJIRA fixed merge issue that i missed before.

* NOJIRA fixed merge issue that i missed before.

* NOJIRA fixed merge issue that i missed before.

* Add missing genRandInt function

* NOJIRA fixed merge issue that i missed before.

* Trying to get gofrmt to work...

* CS-157 Increase timeout of elasticsearch creation resource.

* Lambda ENI cleanup added to security group delete

* ISSUE-10272 Lets not look at the requestor id.

* provider/aws: Add test for VPC-enabled lambda w/ invocation
2017-06-06 09:19:23 +01:00
Paul Stack df11150a6a provider/aws: Revoke default ipv6 egress rule for aws_security_group (#15075)
Fixes: #14522

To follow similar work in IPv4, we are now going to revoke the default
IPv6 egress rule from an empty AWS security group

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSSecurityGroup_ipv4andipv6Egress'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/05 14:01:52 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSSecurityGroup_ipv4andipv6Egress -timeout 120m
=== RUN   TestAccAWSSecurityGroup_ipv4andipv6Egress
--- PASS: TestAccAWSSecurityGroup_ipv4andipv6Egress (63.39s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	63.423s
```
2017-06-06 00:53:04 +03:00
Radek Simko d7f54ed68d provider/aws: Raise timeout for DHCP opts creation (#15084) 2017-06-05 20:34:59 +01:00
Radek Simko a464e97979 provider/aws: Fix Beanstalk App Version acceptance test (#15083) 2017-06-05 20:34:39 +01:00
He Guimin 4c16fa9dbb provider/alicloud: Fix allocating public ip bug (#15049)
* fix allocating public ip bug

* modify
2017-06-05 20:27:32 +03:00
He Guimin 0b63007142 fix vpc and vswitch bug while creating vpc and vswitch (#15082) 2017-06-05 20:24:25 +03:00
Sam Bashton b0f815cc58 Allow resizing of Google Cloud persistent disks (#15077) 2017-06-05 20:19:57 +03:00
Patrick Van Stee 27dcc3ba11 Allow heroku spaces to be imported (#14973) 2017-06-05 12:15:14 -05:00
Radek Simko 7323b4d7eb provider/aws: Retry DB param grp delete on InvalidDBParameterGroupState (#15071) 2017-06-05 15:38:23 +01:00
Benjamin Lau ef4e89c7be [provider/aws] check that we actually have NodeGroupMembers (#13488) 2017-06-05 09:07:46 -05:00
Radek Simko cf58139378 provider/aws: Retry ECS svc update on ServiceNotFoundException (#15073) 2017-06-05 13:20:19 +01:00
Radek Simko 149bef4b4c provider/kubernetes: Allow sourcing config_path from KUBECONFIG env var (#14889) 2017-06-05 13:18:45 +01:00
Roman Laguta bc83cae0e4 fixed tests. should fail (#14878)
* fixed tests. should fail

* fixed dd monitor evaluation_delay parameter

* updated go-datadog-api.v2

* updated vendor.json
2017-06-05 14:47:15 +03:00
Christian Pearce 09dcb78b11 Make os_profile optional #11147 (#14176)
* Make os_profile optional #11147

* Test for optional os_profile and fix resourceArmVirtualMachineRead

* Updating to match other optionally-required fields
2017-06-05 10:55:50 +01:00
Paul Stack 2aba79fa96 provider/aws: Add support for a configurable timeout in db_option_group (#15023)
Fixes: #14995

Adds a timeout block to configure deletes

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSDBOptionGroup'                                                       ✹ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/02 19:54:18 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSDBOptionGroup -timeout 120m
=== RUN   TestAccAWSDBOptionGroup_importBasic
--- PASS: TestAccAWSDBOptionGroup_importBasic (57.03s)
=== RUN   TestAccAWSDBOptionGroup_basic
--- PASS: TestAccAWSDBOptionGroup_basic (32.69s)
=== RUN   TestAccAWSDBOptionGroup_timeoutBlock
--- PASS: TestAccAWSDBOptionGroup_timeoutBlock (31.59s)
=== RUN   TestAccAWSDBOptionGroup_namePrefix
--- PASS: TestAccAWSDBOptionGroup_namePrefix (28.24s)
=== RUN   TestAccAWSDBOptionGroup_generatedName
--- PASS: TestAccAWSDBOptionGroup_generatedName (30.91s)
=== RUN   TestAccAWSDBOptionGroup_defaultDescription
--- PASS: TestAccAWSDBOptionGroup_defaultDescription (54.13s)
=== RUN   TestAccAWSDBOptionGroup_basicDestroyWithInstance
--- PASS: TestAccAWSDBOptionGroup_basicDestroyWithInstance (612.01s)
=== RUN   TestAccAWSDBOptionGroup_OptionSettings
--- PASS: TestAccAWSDBOptionGroup_OptionSettings (54.34s)
=== RUN   TestAccAWSDBOptionGroup_sqlServerOptionsUpdate
--- PASS: TestAccAWSDBOptionGroup_sqlServerOptionsUpdate (53.86s)
=== RUN   TestAccAWSDBOptionGroup_multipleOptions
--- PASS: TestAccAWSDBOptionGroup_multipleOptions (33.72s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	956.958s
```
2017-06-05 12:36:41 +03:00
Paul Stack 89aedb4802 provider/aws: Guard against panic when no aws_default_vpc found (#15070)
Found as part of #15065, when there is no default VPC, Terraform will
throw a panic. This prevents that as a user should never get that

```
% make testacc TEST=./builtin/providers/aws/ TESTARGS='-run=TestAccAWSDefaultVpc_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/05 12:16:09 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws/ -v -run=TestAccAWSDefaultVpc_basic -timeout 120m
=== RUN   TestAccAWSDefaultVpc_basic
--- PASS: TestAccAWSDefaultVpc_basic (44.65s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	44.669s
```
2017-06-05 12:28:12 +03:00
Paul Hinze 110eba294c provider/datadog: make datadog_user verified a computed attribute (#15034)
* provider/datadog: make datadog_user verified a computed attribute

It's read-only and generates supurious diffs for verified users.

* Update resource_datadog_user.go
2017-06-05 12:09:10 +03:00
Radek Simko f24396b904 provider/aws: Retry ECS svc creation on ClusterNotFoundException (#15066) 2017-06-05 09:50:23 +01:00
Chris Johnson 9000f2fc31 provider/librato: Update based on Librato API changes (#15060)
* Update the vendored librato client

* Update librato API endpoints

- update API methods
- fix a few lint errors
2017-06-05 11:50:00 +03:00
Radek Simko b14b81f27d provider/aws: Retry Lambda func creation on IAM error (#15067) 2017-06-05 09:49:29 +01:00
Radek Simko 4baaada826 provider/aws: Retry Redshift cluster deletion on InvalidClusterState (#15068) 2017-06-05 09:48:33 +01:00
He Guimin 87562be855 provider/alicloud: Add the function of replacing ecs instance's system disk (#15048)
* add replacing system disk function for ecs

* remove ForceNew of system_disk_size
2017-06-05 11:27:49 +03:00
Radek Simko ed4678fa95 Merge pull request #15057 from mattyjones/master
fix simple spelling mistake
2017-06-05 06:17:36 +01:00
Matt Jones 41dd795335 fix simple spelling mistake 2017-06-04 21:01:04 -04:00
He Guimin c70c54bd7e fix access_key NOT FOUND bug and nat_gateway diff bug (#15050) 2017-06-05 00:06:58 +03:00
Radek Simko a4c9c40c32 Merge pull request #15019 from hashicorp/f-k8s-pvc-unbound-reason
provider/kubernetes: Provide more details about why PVC failed to bind
2017-06-03 08:21:14 +01:00
Radek Simko f090f0f5f6 Merge pull request #15017 from hashicorp/b-k8s-upgrade-1.6-fix
provider/kubernetes: Fix acc tests after upgrading to 1.6
2017-06-03 08:19:17 +01:00
johnthedev97 de78838cd4 Fix issues in Cloudwatch Log Group tag (#14886)
* Fix issues in Cloudwatch Log Group tag
    1) Removing tags from terraform doesn’t actually get removed in AWS
    2) Trying to update a tag with empty value (“”) to a non-empty value
causes terraform to loop forever

The issue was caused by a mixup of using tag values where tag name
should have used and is corrected in this patch.
This patch also removes the comparison of old and new tag values,
because AWS api takes care of updates by itself and there is no need to
perform an unnecessary UnTag API to update an existing tag value

* Updated the test cases to cover the removal and empty update scenarios
2017-06-02 22:18:27 +03:00
Paul Stack e9aaf58098 provider/google: Set instances to computed in compute_instance_group (#15025)
Fixes: #15024

```
% make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeInstanceGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/02 20:48:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeInstanceGroup_ -timeout 120m
=== RUN   TestAccComputeInstanceGroup_basic
--- PASS: TestAccComputeInstanceGroup_basic (123.64s)
=== RUN   TestAccComputeInstanceGroup_update
--- PASS: TestAccComputeInstanceGroup_update (150.37s)
=== RUN   TestAccComputeInstanceGroup_outOfOrderInstances
--- PASS: TestAccComputeInstanceGroup_outOfOrderInstances (103.71s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/google	377.737s
```
2017-06-02 22:15:10 +03:00
Will May 971eabb547 provider/vault: Support remounting in the vault_mount resource 2017-06-02 10:41:55 -07:00
Will May 1d294aeb45 provider/vault: vault_mount resource 2017-06-02 10:41:55 -07:00
Raphaël Pinson 1c56db5ffa rancher_host: error on nil or removed host (#15015) 2017-06-02 20:04:25 +03:00
Tom Harvey 13583b4b8b provider/azurerm: Upgrading to AutoRest v8 (#15006)
* Upgrading to AutoRest 8

* Upgrading to AutoRest v8

* Updating the Remote State to v8
2017-06-02 15:30:41 +01:00
Radek Simko b6abf1f2bb
provider/kubernetes: Provide more details about why PVC failed to bind 2017-06-02 14:19:38 +01:00
Radek Simko 7552331f50
provider/kubernetes: Mark HPA's target_cpu_utilization_percentage as computed 2017-06-02 14:17:30 +01:00
Radek Simko d0d3f37795
provider/kubernetes: Fix failing tests after upgrading to 1.6 2017-06-02 14:16:53 +01:00
Radek Simko 8a002b937a
provider/kubernetes: Ignore k8s internal labels
Fixes #13716
2017-06-02 14:15:30 +01:00
Jake Champlin 7d06a9bf43 Merge pull request #13123 from UKCloud/master
provider/vcd: Adding VPN Support to vCloud Provider
2017-06-02 09:14:11 -04:00
Bobby DeVeaux d84dfd6904 changes plus acceptance tests for vpn 2017-06-02 09:52:35 +01:00
Gavin Williams 401c6a95a7 provider/openstack: Add Terraform version to UserAgent string (#14955)
* core: Add 'UserAgentString' helper function to generate a standard UserAgent string. Example generation: 'Terraform 0.9.7-dev (go1.8.1)'

* provider/openstack: Add Terraform version to UserAgent string
2017-06-01 22:12:25 -06:00
clint shryock 29444aee87 bump the time we wait for RunInstances to succeed 2017-06-01 16:05:14 -05:00
Jake Champlin 802eae3b4b Merge pull request #14992 from hashicorp/b-fix-modify-instance-attribute
provider/aws: Fix ModifyInstanceAttribute on new instances
2017-06-01 13:11:43 -04:00
Eugene Chuvyrov acd586adf2 [MS] provider/azurerm: fixes for bug #8227 and bug #11226 (#13877)
* Resolved merge conflicts

* Changes conforming to HashiCorp guidelines and additional bug fixes

* Rebase merge

* Rebase merge

* Merging changes

* Changes to tests and code constructs
2017-06-01 17:40:30 +01:00
Jake Champlin acb38e3782
provider/aws: Fix ModifyInstanceAttribute on new instances
Previously `ModifyInstanceAttribute` permissions were required on creating a new instance with an unmodified `source_dest_check` attribute, as we forced the `ModifyInstanceAttribute` set on a new AWS instance.

This change only calls `ModifyInstanceAttribute` if `source_dest_check` was changed from default on a new instance, or if `source_dest_check` was modified.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run=TestAccAWSInstance_sourceDestCheck"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/06/01 11:18:31 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInstance_sourceDestCheck -timeout 120m
=== RUN   TestAccAWSInstance_sourceDestCheck
--- PASS: TestAccAWSInstance_sourceDestCheck (172.28s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    172.308s
```
2017-06-01 11:52:22 -04:00