Commit Graph

7764 Commits

Author SHA1 Message Date
Martin Atkins 6a4498ba76 provisioner/salt-masterless: add "_file" suffix to "minion_config"
In #15870 we got good feedback that it'd be more useful to have the
various filename-accepting arguments on this provisioner instead accept
strings that represent the contents of such files, so that they can be
generated from elsewhere in the Terraform config.

This change does not achieve that, but it does make room for doing this
later by renaming "minion_config" to "minion_config_file" so that we
can later add a "minion_config" option alongside that takes the file
content, and deprecate "minion_config_file".

Ideally we'd just implement the requested change immediately, but
unfortunately the release schedule doesn't have time for this so this is
a pragmatic change to allow us to make the full requested change at a
later date without backward incompatibilities.

This change is safe because the salt-masterless provisioner has not yet
been included in a release at the time of this commit.
2017-08-30 13:55:28 -07:00
Martin Atkins 4aa67f0bfc provisioner/salt-masterless: fix crash processing connection config
The code here was previously assuming that d.State() was equivalent to
the schema.ProvRawStateKey due to them both being of type InstanceState,
but that is in fact not true since a state object contains some transient
information that is _not_ part of the persisted state, including the
connection information we need here.

Calling ResourceData.State() constructs a _new_ state based on its stored
values, so the constructed object is lacking this transient information.
We need to use the specific state object provided by the caller in order
to get access to the transient connection configuration.

Unfortunately there is no automated test coverage for this because we have
no good story for testing provisioners that use "communicator". While such
tests could potentially be written, we'd like to get this in somewhat
quickly to unblock a release, rather than delaying to design and implement
some sort of mocking system for this.
2017-08-30 13:50:30 -07:00
Stephen Weatherford 5d5f8224d2 provisioner/local-exec: allow user to specify interpreter 2017-08-22 10:16:36 -07:00
Lars Lehtonen 47484e23fe provisioner/local-exec: Drop untestable error
TestResourceProvider_stop uses a goroutine, which means that any function with *testing.T as its receiver within that goroutine will silently fail.

Now the test to accepts that an error that occurs within the goroutine is lost. It also adds some more verbose logs to explain what is happening.
2017-08-21 19:05:49 -07:00
James Bardin 18af7750d4 Merge pull request #14720 from sevagh/master
Add salt-masterless provisioner
2017-08-16 16:47:46 -04:00
James Bardin db42015342 backoff retries in remote-exec provisioner
Add a simple backoff to the remote-exec retryFunc.
Backoff between tries, up to a 10s max.
2017-08-09 15:54:08 -04:00
Sevag Hanssian 3477868804 PR feedback 2017-08-07 12:21:27 -04:00
Sevag Hanssian 867760ed56 Add salt-masterless provisioner 2017-08-07 10:00:29 -04:00
Sander van Harmelen b01f68f343 provisioner/chef: fix panic
Fixes #15431
Fixes #15500
2017-07-22 09:58:58 +02:00
Sander van Harmelen 7e180aec92 Refactor the provisioner validation function (#15273)
It turns out that `d.GetOk` also returns `false` when the user _did_ actually supply a value for it in the config, but the value itself needs to be evaluated before it can be used.

So instead of passing a `ResourceData` we now pass a `ResourceConfig`
which makes much more sense for doing the validation anyway.
2017-06-15 19:57:04 +02:00
Sander van Harmelen 21a646f6fe Use the InstanceState to query any connection details (#15271)
Fixes #15205 #15270
2017-06-14 21:40:31 +02:00
James Bardin 7cc2f020ef remove provider bins 2017-06-12 13:43:51 -04: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