Commit Graph

16734 Commits

Author SHA1 Message Date
Mitchell Hashimoto 2676425816 Merge pull request #12381 from hashicorp/b-hook-ui-fix
command: cancel still applying goroutine with channel
2017-03-02 11:26:10 -08:00
Mitchell Hashimoto e30604e59d
update CHANGELOG 2017-03-02 11:25:52 -08:00
Mitchell Hashimoto d1b930d5b5
command: remove unused test 2017-03-02 11:21:48 -08:00
Mitchell Hashimoto 0224a12a00
command: fix go vet 2017-03-02 11:19:54 -08:00
Mitchell Hashimoto 5086f9f568
command: remove log 2017-03-02 11:15:38 -08:00
Mitchell Hashimoto 866de2776e
command: trigger still applying cancellations from a channel 2017-03-02 11:15:02 -08:00
Radek Simko 17c9a403f2
WIP 2017-03-02 18:43:27 +00:00
Mitchell Hashimoto dd8a93ec8d Merge pull request #12370 from hashicorp/b-hook-ui-fix
command: Fix crash caused by empty state (data source PostApply)
2017-03-02 09:20:29 -08:00
Clint 84a1485ab4 Update CHANGELOG.md 2017-03-02 11:12:29 -06:00
Clint 2fe5976aec helper/schema: Add configurable Timeouts (#12311)
* helper/schema: Add custom Timeout block for resources

* refactor DefaultTimeout to suuport multiple types. Load meta in Refresh from Instance State

* update vpc but it probably wont last anyway

* refactor test into table test for more cases

* rename constant keys

* refactor configdecode

* remove VPC demo

* remove comments

* remove more comments

* refactor some

* rename timeKeys to timeoutKeys

* remove note

* documentation/resources: Document the Timeout block

* document timeouts

* have a test case that covers 'hours'

* restore a System default timeout of 20 minutes, instead of 0

* restore system default timeout of 20 minutes, refactor tests, add test method to handle system default

* rename timeout key constants

* test applying timeout to state

* refactor test

* Add resource Diff test

* clarify docs

* update to use constants
2017-03-02 11:07:49 -06:00
James Bardin e5e37b0025 Merge pull request #12340 from hashicorp/jbardin/GH-12253
return 0 from resourceCountMax with a nil Resource
2017-03-02 11:59:32 -05:00
Mitchell Hashimoto d2f09d0db7 Merge pull request #12366 from hashicorp/f-state-docs
website: document state environments
2017-03-02 08:51:48 -08:00
Mitchell Hashimoto 45ca69e09f Merge pull request #12367 from hashicorp/f-consul-state
backend/consul: support named states
2017-03-02 08:51:05 -08:00
Mitchell Hashimoto 7c45e57f6b Merge pull request #12368 from hashicorp/b-gosched
terraform: run Gosched in test so other goroutines run
2017-03-02 08:45:56 -08:00
Radek Simko 08283f077b
command: Fix crash caused by empty state 2017-03-02 10:58:01 +00:00
stack72 0fa3c71d09
Merge branch 'master' of github.com:hashicorp/terraform 2017-03-02 10:40:02 +00:00
stack72 280f115b95
Merge branch 'myoung34-master' 2017-03-02 10:39:46 +00:00
stack72 0d4f4cac18
provider/aws: Adding a test that covers the new IAM Instance Profile
association to AWS Instance
2017-03-02 10:38:33 +00:00
Mitchell Hashimoto 19a594ba3d
terraform: run Gosched in test so other goroutines run
Starting with Go 1.8 betas, we've periodically received SIGQUITs on our
tests in Travis. The stack trace looks like this:

https://gist.github.com/mitchellh/abf09b0980f8ea01269f8d9d6133884d

The tests are timing out! This is a test that hasn't been touched really
in a very long time and has always passed. I've **reproduced this
locally** by setting `GOMAXPROCS=1` and running the test. By yielding
the scheduler in the hot loop, it now passes almost instantly every
time.

Perhaps the test can be written in a different way, but this gets tests
passing and I think will fix our periodic errors.
2017-03-01 23:12:41 -08:00
Mitchell Hashimoto a519f89968 Merge pull request #12354 from hashicorp/f-bump-plugin
plugin: bump protocol version
2017-03-01 23:06:40 -08:00
Mitchell Hashimoto 35afb7bc86
backend/consul: some comments 2017-03-01 23:01:28 -08:00
Mitchell Hashimoto b842fd0c27
backend/consul: support named states 2017-03-01 22:58:51 -08:00
Mitchell Hashimoto 3db55cf747
backend/consul: build your own backend 2017-03-01 22:19:36 -08:00
Mitchell Hashimoto 44d7d2d5b8
website: update backends changing state env behavior 2017-03-01 21:54:47 -08:00
Mitchell Hashimoto 4b1dc53cc1
website: env switch => select 2017-03-01 21:51:40 -08:00
Mitchell Hashimoto d892b436f5
website: document env CLI 2017-03-01 21:50:08 -08:00
stack72 185b59f125
Merge branch 'master' of https://github.com/myoung34/terraform into myoung34-master 2017-03-02 05:26:54 +00:00
Joe Topjian 1ab3750085 provider/openstack: Redesign openstack_blockstorage_volume_attach_v2 (#12071)
* provider/openstack: Redesign openstack_blockstorage_volume_attach_v2

The current design of openstack_blockstorage_volume_attach_v2 does
not correctly implement the Block Storage API attachment call. It
was only partially implemented, only marking volumes as being
attached, while never actually attaching them.

This redesign is a closer alignment to how creating attachments
to a standalone Block Storage service works.

For creating attachments specifically in the case of OpenStack
Compute instances, the openstack_compute_volume_attach_v2 resource
is required.

* provider/openstack: re-adding instance_id for backwards compatibility
2017-03-02 05:20:56 +00:00
Joe Topjian 1dba855daf provider/openstack: openstack_compute_floatingip_associate_v2 resource (#12190)
This commit adds the openstack_compute_floatingip_associate_v2
resource which specifically handles associating a floating IP
address to an instance. This can be used instead of the existing
floating_ip options in the openstack_compute_instance_v2 resource.
2017-03-02 05:18:57 +00:00
stack72 bb7b6d1088
Update CHANGELOG.md 2017-03-02 05:14:07 +00:00
Simone Carletti 8ae31740e3 Upgrade DNSimple provider to API v2 (#10760)
* Replace DNSimple API client with the official Go client

* Upgrade DNSimple provider to use the new API v2

Acceptance tests pass:

```
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDNSimpleRecord_Basic
--- PASS: TestAccDNSimpleRecord_Basic (2.67s)
=== RUN   TestAccDNSimpleRecord_Updated
--- PASS: TestAccDNSimpleRecord_Updated (1.88s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/dnsimple
```

Note that the code still has to be updated to pass the account ID
dynamically in place of "TODO-ACCOUNT".

* Refactor DNSimple provider to expose both client and config

The config is required as the new API wants to know the identifier of
the account you are operating to. The account is not stored in the
client (as the client can talk with different accounts), hence I need
to pass it as part of the config.

* Identify Terraform requests to DNSimple via UserAgent

* Upgrade to the latest dnsimple-go version

* Update docs

Provide upgrade instructions and update the docs for API v2.

* Remove rendundant type declaration
2017-03-02 05:12:34 +00:00
Peter McAtominey cbed463b44 state/azure: add environment option for non-public cloud usage (#12364) 2017-03-02 04:58:24 +00:00
netjunki 72a8b1d62f aws/provider: redshift cluster exercise invalid password char path (#12359)
* aws/provider: redshift cluster exercise invalid password char path

* we need the password to be valid except for the one problem character
2017-03-02 04:55:42 +00:00
Mitchell Hashimoto aeb3d1879f
website: document state environments 2017-03-01 17:06:31 -08:00
Alexander 59d1d7056c provider/pagerduty: Updated implementation of pagerduty_vendor & pagerduty_service_integration (#12357)
* Vendor update

* Updated implementation of pagerduty_vendor

* Update pagerduty_vendor tests

* Update pagerduty_vendor documentation

* Updated implementation of pagerduty_service_integration

* Update pagerduty_service_integration tests

* Update pagerduty_service_integration documentation
2017-03-01 23:59:16 +00:00
netjunki 2cfe385653 provider/aws: improve redshift cluster validation (#12313)
* provider/aws: improve redshift cluster validation

* aws/provider: redshift cluster mixed case name should be an invalid name
2017-03-01 23:56:22 +00:00
Paul Stack c5da896d22 provider/aws: Add support for import of aws_elasticsearch_domain (#12330)
Fixes: #12180
2017-03-01 23:53:35 +00:00
Jasmin Gacic 73006a243a Acceptance tests volume password change (#12356) 2017-03-01 23:05:11 +00:00
netjunki 8e48a5bbcb provider/aws: more details on which s3 bucket had an error (#12314)
* provider/aws: more details on which s3 bucket had an error

* provider/aws: s3 bucket data source adjust error output
2017-03-01 23:00:47 +00:00
Mitchell Hashimoto 7a366c58d2 Merge pull request #12355 from hashicorp/b-alb
website: clarify elb vs alb
2017-03-01 14:53:10 -08:00
Mitchell Hashimoto a4c56b5056
website: clarify elb vs alb 2017-03-01 14:52:12 -08:00
Mitchell Hashimoto 700c74bdd0
plugin: bump protocol version
We changed the type of InstanceState.Meta and this will break
pre-existing plugins. They simply have to recompile to work.
2017-03-01 14:42:33 -08:00
Radek Simko 320e99f26e Update CHANGELOG.md 2017-03-01 22:19:38 +00:00
Nick Walke 9a383432d8 Fixed typo (#12351) 2017-03-01 22:18:01 +00:00
Radek Simko 2e2b8686dd command: Display state ID in PreApply+PostApply (#12261) 2017-03-01 22:16:22 +00:00
Paul Stack 185c3dffe0 provider/aws: Refresh cloudwatch log subscription filter on 404 (#12333)
Fixes:#11750

Before this change, adding a log_subscription_filter and then deleting
it manually would yield this error on terraform plan/apply:

```
% terraform plan                                                                                                             ✹ ✭
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_role.iam_for_lambda: Refreshing state... (ID: test_lambdafuntion_iam_role_example123)
aws_cloudwatch_log_group.logs: Refreshing state... (ID: example_lambda_name)
aws_iam_role_policy.test_lambdafunction_iam_policy: Refreshing state... (ID: test_lambdafuntion_iam_role_example123:test_lambdafunction_iam_policy)
aws_lambda_function.test_lambdafunction: Refreshing state... (ID: example_lambda_name_example123)
aws_lambda_permission.allow_cloudwatch_logs: Refreshing state... (ID: AllowExecutionFromCloudWatchLogs)
aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Refreshing state... (ID: cwlsf-992677504)
Error refreshing state: 1 error(s) occurred:

* aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Subscription filter for log group example_lambda_name with name prefix test_lambdafunction_logfilter not found!

```

After this patch, we get the following behaviour:

```
% terraform plan                                                                                                             ✹ ✭
[WARN] /Users/stacko/Code/go/bin/terraform-provider-aws overrides an internal plugin for aws-provider.
  If you did not expect to see this message you will need to remove the old plugin.
  See https://www.terraform.io/docs/internals/internal-plugins.html
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_role.iam_for_lambda: Refreshing state... (ID: test_lambdafuntion_iam_role_example123)
aws_cloudwatch_log_group.logs: Refreshing state... (ID: example_lambda_name)
aws_lambda_function.test_lambdafunction: Refreshing state... (ID: example_lambda_name_example123)
aws_iam_role_policy.test_lambdafunction_iam_policy: Refreshing state... (ID: test_lambdafuntion_iam_role_example123:test_lambdafunction_iam_policy)
aws_lambda_permission.allow_cloudwatch_logs: Refreshing state... (ID: AllowExecutionFromCloudWatchLogs)
aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Refreshing state... (ID: cwlsf-992677504)
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed. Cyan entries are data sources to be read.

Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.

+ aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter
    destination_arn: "arn:aws:lambda:us-west-2:187416307283:function:example_lambda_name_example123"
    filter_pattern:  "logtype test"
    log_group_name:  "example_lambda_name"
    name:            "test_lambdafunction_logfilter"
    role_arn:        "<computed>"

Plan: 1 to add, 0 to change, 0 to destroy.
```
2017-03-01 22:12:50 +00:00
Paul Stack 26926aca77 provider/aws: reading multiple pages of aws_efs_file_system tags (#12328)
Fixes: #12232

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEFSFileSystem_pagedTags'
==> 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=TestAccAWSEFSFileSystem_pagedTags -timeout 120m
=== RUN   TestAccAWSEFSFileSystem_pagedTags
--- PASS: TestAccAWSEFSFileSystem_pagedTags (39.51s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    39.537s
```
2017-03-01 22:09:13 +00:00
Mitchell Hashimoto e7a88ce089 Merge pull request #12352 from hashicorp/f-atlas-backend
backend/atlas: convert to new style
2017-03-01 13:37:29 -08:00
Mitchell Hashimoto 08b47cf73b
backend/atlas: adhere to new multi-state interface 2017-03-01 13:31:52 -08:00
Mitchell Hashimoto e6a87cf8de
backend/atlas: adhere to backend.CLI 2017-03-01 13:29:16 -08:00