Commit Graph

7354 Commits

Author SHA1 Message Date
Paul Stack 72a14ef2bb provider/aws: Add IPv6 outputs to aws_subnet datasource (#13841)
Fixes: #13595

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccDataSourceAwsSubnet'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/21 13:52:43 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccDataSourceAwsSubnet -timeout 120m
=== RUN   TestAccDataSourceAwsSubnetIDs
--- PASS: TestAccDataSourceAwsSubnetIDs (81.05s)
=== RUN   TestAccDataSourceAwsSubnet
--- PASS: TestAccDataSourceAwsSubnet (57.48s)
=== RUN   TestAccDataSourceAwsSubnetIpv6ByIpv6Filter
--- PASS: TestAccDataSourceAwsSubnetIpv6ByIpv6Filter (82.63s)
=== RUN   TestAccDataSourceAwsSubnetIpv6ByIpv6CidrBlock
--- PASS: TestAccDataSourceAwsSubnetIpv6ByIpv6CidrBlock (82.43s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	303.625s
```
2017-04-21 16:54:55 +03:00
Joshua Spence 2aac8fb8fc Add `aws_ami_ids` and `aws_ebs_snapshot_ids` resources (#13844)
Fixes #12081. Adds new `aws_ami_ids` and `aws_ebs_snapshot_ids` resources.
2017-04-21 16:37:26 +03:00
Julien Pivotto c2a1e688cb Add DigitalOcean datasource digitalocean_image (#13787)
Add a new data source for Digital Ocean that finds snapshots by name.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2017-04-21 16:25:34 +03:00
Paul Stack 0aad5f2c43 provider/aws: Add replica_source_db to the aws_db_instance datasource (#13842)
Fixes: #13471
2017-04-21 14:23:48 +03:00
terraformbot 352a5c753f provider/aws: Changing aws_opsworks_instance should ForceNew (#13839)
Fixes: #13838

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksInstance_UpdateHostNameForceNew'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/21 13:11:08 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksInstance_UpdateHostNameForceNew -timeout 120m
=== RUN   TestAccAWSOpsworksInstance_UpdateHostNameForceNew
--- PASS: TestAccAWSOpsworksInstance_UpdateHostNameForceNew (114.27s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	114.294s
```
2017-04-21 13:21:09 +03:00
Gauthier Wallet 80d940d154 provider/aws: Added Cognito Identity Pool (#13783) 2017-04-21 12:53:48 +03:00
stack72 82293bf59e
Merge branch 'master' of github.com:hashicorp/terraform 2017-04-21 12:52:22 +03:00
stack72 1913d72212
Merge branch 'olakar_g-network-import' of https://github.com/skalle/terraform into skalle-olakar_g-network-import 2017-04-21 12:41:09 +03:00
Pasha Palangpour 2a7b0e7e36 provider/ns1: record documentation improvements (#13786)
* provider/ns1: Adds acctest for SRV type records

* ns1/provider: Adds dns record examples to documentation.
2017-04-21 12:38:05 +03:00
Devin Lundberg 081121d29b Fix invalid MIME formatting in multipart cloudinit userdata (#13752)
* Fix invalid MIME formatting in multipart cloudinit userdata 

Per https://tools.ietf.org/html/rfc822#appendix-B.2, MIME headers and Body need to be separated by two new lines (or CRLFs in this case). 

The email parser in python can handle this which is what cloud-init uses but this bug causes problems if you try to parse the multipart message by languages other than python.

* Fix test cases
2017-04-21 08:30:09 +02:00
Ola Karlsson 3af9aa283d Adding Import to the Google network resource 2017-04-21 01:58:22 +00:00
Stephen Weatherford 21cd620ef9 PR fixes 2017-04-20 23:27:36 +00:00
Joshua Spence f3b5a883b7 Add `bucket_prefix` to `aws_s3_bucket` (#13274)
Adds a `bucket_prefix` parameter to the `aws_s3_bucket` resource.
2017-04-20 23:28:40 +03:00
Stephen Weatherford d378e30b1d Fix crash for outputs of type Object (#7353), and support bool and int outputs
Included in this fix:
1) No crash
2) Debug log indicates problem, otherwise unsupported outputs are ignored
3) String, bool and int outputs are supported
4) Documentation indicates these limitations
What is not included:
5) Array, object, securestring, secureobject still not supported
2017-04-20 20:28:08 +00:00
Jon Oden d5207e17ed Add ability to associate healthcheck to a backend (#13539) 2017-04-20 23:24:19 +03:00
Paddy 600a117301 Merge pull request #13671 from JDiPierro/google_address_name_fix
provider/google: Set name field when reading addresses
2017-04-20 13:14:57 -07:00
Dominik-K 565f0a4e0f `roles` deprecated in docs & code error message (#13622) 2017-04-20 23:02:48 +03:00
Chris Broglie 3f0934bd4e provider/aws: Add aws_kinesis_stream data source (#13562)
This fixes #13521
2017-04-20 22:13:39 +03:00
Jake Champlin 35388cbc31 Merge pull request #13468 from hashicorp/f-oracle-compute
provider/opc: Add Oracle Compute Provider
2017-04-20 14:52:39 -04:00
Paul Stack 195ad5ef02 provider/logentries: Refresh from state when resources not found (#13810)
Fixes: #13805

Before the fix:

```
Error refreshing state: 1 error(s) occurred:

* logentries_logset.logset: logentries_logset.logset: No such log set with key 278e7344-1201-43ba-9804-77b9a72fe7d6
```

After the fix:

```
% terraform plan                                                                                  ✚ ✭
[WARN] /Users/stacko/Code/go/bin/terraform-provider-logentries overrides an internal plugin for logentries-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.

logentries_logset.logset: Refreshing state... (ID: 278e7344-...a72fe7d6)
logentries_log.log: Refreshing state... (ID: 2ae1e8ae-...e932d25c)
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.

+ logentries_log.log
    logset_id:        "${logentries_logset.logset.id}"
    name:             "test-log"
    retention_period: "ACCOUNT_DEFAULT"
    source:           "token"
    token:            "<computed>"

+ logentries_logset.logset
    location: "nonlocation"
    name:     "testing-terraform-destroy"

Plan: 2 to add, 0 to change, 0 to destroy.
```

Test Run:

```
% make testacc TEST=./builtin/providers/logentries                                                ✚ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/20 20:36:20 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/logentries -v  -timeout 120m
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccLogentriesLog_Token
--- PASS: TestAccLogentriesLog_Token (39.03s)
=== RUN   TestAccLogentriesLog_SourceApi
--- PASS: TestAccLogentriesLog_SourceApi (28.46s)
=== RUN   TestAccLogentriesLog_SourceAgent
--- PASS: TestAccLogentriesLog_SourceAgent (6.19s)
=== RUN   TestAccLogentriesLog_RetentionPeriod1M
--- PASS: TestAccLogentriesLog_RetentionPeriod1M (3.04s)
=== RUN   TestAccLogentriesLog_RetentionPeriodAccountDefault
--- PASS: TestAccLogentriesLog_RetentionPeriodAccountDefault (2.71s)
=== RUN   TestAccLogentriesLog_RetentionPeriodAccountUnlimited
--- PASS: TestAccLogentriesLog_RetentionPeriodAccountUnlimited (2.65s)
=== RUN   TestAccLogentriesLogSet_Basic
--- PASS: TestAccLogentriesLogSet_Basic (1.54s)
=== RUN   TestAccLogentriesLogSet_NoLocation
--- PASS: TestAccLogentriesLogSet_NoLocation (1.54s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/logentries	85.177s
```
2017-04-20 21:38:37 +03:00
Andy Lindeman 28d71e6624 provider/github: Implements github_branch_protection (#10476) 2017-04-20 21:11:49 +03:00
Joe Topjian 6262a73de7 provider/rabbitmq: Allow users without tags (#13798)
This commit makes the tags attribute optional for users. It also
handles cases when a user defines a tag as an empty string ("").
2017-04-20 20:10:20 +03:00
Alexander 9bd50a1219 provider/google: BigQuery Dataset (#13436)
* Vendor BigQuery

* Add resource

* Add tests

* Add documentation

* Remove named import

* Remove `retain_on_delete`

* Fix formatting
2017-04-20 09:47:38 -07:00
Tom Harvey 6e698fd5fe Merge pull request #13755 from StephenWeatherford/11625c
Fix another issue from #11625 that's causing null entries in ssh_keys
2017-04-20 14:01:31 +01:00
Tom Harvey 1775d48381 Merge pull request #13791 from whiskeyjay/subnetRTFix
provider/azurerm: Locking route table on subnet create/delete
2017-04-20 12:39:59 +01:00
tombuildsstuff 8706d2181f Fixing the import test by adding missing formatting values 2017-04-20 12:28:33 +01:00
Thomas Poindessous 1fa91dfb4d merge upstream/master 2017-04-20 12:37:18 +02:00
Thomas Poindessous 1b22200c44 Corrected test for snapshot. Simplified tests. Added a new test for source_disk_link 2017-04-20 12:13:17 +02:00
Thomas Poindessous 573da4d729 Added a new attribute : source_disk_link 2017-04-20 12:12:43 +02:00
Daniel Kats 8a70108612 fix a word in aws_iam_role_policy error msg (#13794) 2017-04-20 06:48:58 +01:00
Chris Marchesi d41b806789 core: Restore CountBoundaryTransformer to apply, add/adjust tests
Moving the transformer wholesale looks like it broke some tests, with
some actually doing legit work in normalizing singular resources from a
foo.0 notation to just foo.

Adjusted the TestPlanGraphBuilder to account for the extra
meta.count-boundary nodes in the graph output now, as well as added
another context test that tests this case. It appears the issue happens
during validate, as this is where the state can be altered to a broken
state if things are not properly transformed in the plan graph.
2017-04-19 22:23:52 -07:00
Chris Marchesi 2802d319d2 core: Move CountBoundaryTransformer to the plan graph builder
This fixes interpolation issues on grandchild data sources that have
multiple instances (ie: counts). For example, baz depends on bar, which
depends on foo.

In this instance, after an initial TF run is done and state is saved,
the next refresh/plan is not properly transformed, and instead of the
graph/state coming through as data.x.bar.0, it comes through as
data.x.bar.  This breaks interpolations that rely on splat operators -
ie: data.x.bar.*.out.
2017-04-19 16:56:54 -07:00
clint shryock 7f3c8e4765 move this test to new region 2017-04-19 17:20:44 -05:00
Jake Champlin fe8029e65e
initial attempt 2017-04-19 17:30:58 -04:00
ebilhoo 8ef010440e cleanup and validation, rdpool.order optional with ROUND_ROBIN default 2017-04-19 20:02:27 +00:00
Joseph Anthony Pasquale Holsten c57e0735d1 Merge pull request #13745 from bhood4/master
provider/ultradns: add ultradns_rdpool resource
2017-04-19 10:45:20 -07:00
Christoph Blecker 596f05b881 Fix govet errors (#13774) 2017-04-19 20:21:31 +03:00
Jay Wang c42b2381c6 Added check for empty strings in resource id parsing logic. 2017-04-18 17:17:14 -07:00
Stephen Weatherford 1320347b7b Fix another issue from #11625 that's causing null entries in ssh_keys 2017-04-18 21:38:03 +00:00
Jay Wang f712880fee Lock Route Table / Subnets 2017-04-18 14:18:30 -07:00
Joseph Herlant 507917df43 provider/fastly: upgrade go-fastly to fix #12910 (#13648)
* Adding acceptance tests to reproduce issue #12910

* Upgrade go-fastly and its dependencies and move the Version to int as changed upstream
2017-04-18 13:30:54 -05:00
Tom Harvey 502a744a65 Merge pull request #13637 from hashicorp/azurerm-lock-bugfix
provider/azurerm: Locking around Network Security Group / Subnets
2017-04-18 17:34:04 +01:00
tombuildsstuff 079043d5f8 Checking the type of the subnet before using it 2017-04-18 16:38:36 +01:00
tombuildsstuff fd03d0310e Formatting 2017-04-18 16:12:22 +01:00
tombuildsstuff 3ecb0f4fc4 Locking on the NSG ID 2017-04-18 16:12:22 +01:00
tombuildsstuff b93e6e3af7 Locking on the delete too 2017-04-18 16:12:22 +01:00
tombuildsstuff b6866f2187 Locking the NSG to only operate on one resource at a time in the create 2017-04-18 16:12:22 +01:00
ebilhoo 37810872a0 resourceUltradnsRdpoolRead set rdata 2017-04-18 15:08:18 +00:00
ebilhoo 04553c5d4e add rdpool 2017-04-18 15:08:18 +00:00
ebilhoo 801e7b70e6 support for rdpool resource 2017-04-18 15:08:18 +00:00
Radek Simko 1b841e77de provider/aws: Run all AWSConfig acc tests sequentially (#13658) 2017-04-18 17:59:44 +03:00
Jake Champlin 5b0ea5abff Merge pull request #13715 from hashicorp/b-update-spot-datafeed-test
provider/aws: Run AWS Spot Datafeed Subscription tests in serial
2017-04-18 10:46:26 -04:00
KOJIMA Kazunori 47d255f943 provider/aws: Add aws_kms_alias datasource (#13669) 2017-04-18 15:29:14 +03:00
demonwy 69ec7e12ac provider/alicloud: Add new resource ESS, including scalinggroup scalingconfiguration scalingrule and schedule (#13731)
* add docs

* add new resource ess

* add examples

* update aliyun go

* merge master

* fix ci
2017-04-18 15:18:57 +03:00
Julien Pivotto c2d1a37334 DigitalOcean: Export droplet prices (#13720)
Note: In DO, Droplets are about the only thing you pay. DNS/Float IP are
free.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2017-04-18 14:52:40 +03:00
clint shryock 8939ac2256 provider/aws: randomize some more test 2017-04-17 16:02:01 -05:00
clint shryock a6565555cb provider/aws: Update Lambda tests for randomness 2017-04-17 15:18:19 -05:00
Martin Atkins b21bb7746a Merge #11776: Optionally allow vault_generic_secret resource to detect drift 2017-04-17 11:14:02 -07:00
Martin Atkins d515c2efc4 Merge #12757: local_file resource 2017-04-17 10:48:15 -07:00
Jake Champlin 20b0d9f060
provider/aws: Run AWS Spot Datafeed Subscription tests in serial 2017-04-17 11:35:56 -04:00
= 6f9570b114 Fixes TestAccAWSAutoscalingLifecycleHook_omitDefaultResult 2017-04-17 09:12:42 -06:00
Paul Stack b3cc7ea4cf provider/aws: Add support for aws_dms_replication_task available states (#13697) 2017-04-17 16:00:41 +03:00
Paul Hinze 193c0d80ad
provider/aws: Validate GovCloud KMS ARNs
Fixes validation errors in GovCloud when passing a KMS ARN for
`kms_key_id` in `s3_bucket_object` and `db_instance`.

The region is `us-gov-west-1` which breaks the regexp. Just added the
optional `gov-` in the right place.
2017-04-16 22:35:09 -07:00
Paul Tyng b8b896e11b Update go-newrelic vendor and use new field (#13158)
Fixes #12972
2017-04-17 01:59:11 +03:00
Kent Wang 8927ad5dce provider/alicloud: Fix allocate public ip error (#13267) (#13268)
Wait for instance to be in STOPPED or RUNNING state before invoking
AllocatePublicIP API.

* provider/alicloud: Wait for instance state before allocate public ip

* provider/alicloud: Fix test `TestAccAlicloudInstance_associatePublicIP`

* provider/alicloud: Update alicloud_instance document

Fixes: #13267
2017-04-17 01:52:39 +03:00
Joshua Spence 8d5fdeae57 Add `name_prefix` support to `aws_cloudwatch_log_group` (#13273) 2017-04-17 01:50:52 +03:00
Kit Ewbank da7041f4be Remove aws_network_acl_rule if not found. (#13608) 2017-04-17 01:39:42 +03:00
Tom Harvey f7f800bdfb provider/azurerm: VM Scale Sets - import support + fixes (#13464)
* Ensuring we base64 decode the custom data if it's base64 encoded

* Import support for VM Scale Sets

* Updating the docs to mention Import support

* Fixes #13009, where the SSH Keys would be set at the incorrect index

(leaving a null entry at the start, causing a crash on the second apply)

* Adding tests to cover the updating use-case

* Adding an import linux test

* Storing the base64 encoded value
Making custom_data a force new, since it an't be updated

* Updating the docs
2017-04-17 01:37:28 +03:00
Joe Topjian 1af649ed5a provider/openstack: Ignore fixed_ip when importing ports (#13563) 2017-04-17 01:36:15 +03:00
Kit Ewbank 5c3438e394 Remove aws_vpc_dhcp_options if not found. (#13610) 2017-04-17 01:31:43 +03:00
Kent Wang 4c25e1e269 provider/alicloud: Fix create PrePaid instance (#13661) (#13662)
Fixes: #13661
2017-04-17 01:26:06 +03:00
Gavin Williams c63ad9c0f8 state/remote/swift: Support Openstack request logging (#13583)
* provider/openstack: Expose LogRoundTripper fields externally

* state/remote/swift: Add support for debugging Openstack calls using
OS_DEBUG env variable.

* provider/openstack: Update LogRoundTripper to log headers aswell as body.

* Add `RedactHeaders` function in order to redact sensitive http Headers.
Refactor `logRequest` and `logResponse` to use `RedactHeaders` func.
2017-04-15 17:11:28 +03:00
Radek Simko 9504682831 aws: Increase default number of retries to 25 (#13673) 2017-04-15 07:56:41 +01:00
Sander van Harmelen 10c6c873ed provider/aws: add an option to skip getting the EC2 platforms (#13672)
* Add an option to skip getting the EC2 platforms

Even through this call fails silently in case of an error (usually lack of rights), it’s still a pretty extensive call.

In our region (eu-west-1) this can take up to 3 seconds. And since we have a system that involves doing much planning with the option `-refresh=false` these additional 3 seconds are really very annoying and totally not needed.

So being able to choose to skip them would make our lives a little better 😉

* Update the docs accordingly
2017-04-14 23:41:59 +02:00
Radek Simko 43d5b82f30 provider/aws: Use mutex & retry for WAF change operations (#13656) 2017-04-14 21:12:04 +01:00
clint shryock 46809cc2cc provider/aws: randomize ECS name 2017-04-14 14:13:09 -05:00
Justin DiPierro 046cc9b9aa Google Addresses: Set name field on read 2017-04-14 15:03:31 -04:00
clint shryock 41baf7d811 provider/aws: Wait for snapshotting in delete of ElastiCache cluster 2017-04-14 12:54:38 -05:00
Jake Champlin ac379e19a7 Merge pull request #13279 from joshuaspence/db_param_group_name
Fix DB parameter group name property
2017-04-14 12:16:18 -04:00
Matthew Frahry 2ff8d58020 Merge pull request #13646 from hashicorp/p-aws-route53-test-fix
Update resource_aws_route53_zone_association_test.go
2017-04-14 08:23:53 -06:00
Josh VanderLinden 24e857ae96 azurerm_redis_cache resource missing hostname (#13650)
* Fix Azure Redis Cache hostname attribute

* Fix inaccurate Azure Redis Cache docs
2017-04-14 11:49:49 +03:00
Dana Hoffman ae5332b42c provider/google: Unset the id for resource_google_project if the create operation fails (#13644) 2017-04-13 16:16:47 -07:00
Matthew Frahry c394e5d653 Update resource_aws_route53_zone_association_test.go 2017-04-13 16:44:19 -06:00
Quentin Machu bf8d932d23
provider/local: Implement a new local_file resource
This commit adds the ability to provision files locally.
This is useful for cases where TerraForm generates assets
such as TLS certificates or templated documents that need
to be saved locally.

- While output variables can be used to return values to
the user, it is not extremly suitable for large content or
when many of these are generated, nor is it practical for
operators to manually save them on disk.
- While `local-exec` could be used with an `echo`, this
provider works across platforms and do not require any
convoluted escaping.
2017-04-13 14:57:29 -07:00
Mathieu Herbert 25cbbdea8a provider/google: datasource subnetwork and network (#12442)
* first version of this datasource

* add network and subnetwork datasource and documentation

* modify sidebar reference in documentation

* fix elements after review on network and subnetwork datasources

* fix fmt on Google provider.go

* modify code with the review

* modify documentation layout order

* fix alphabetic order in provider.go

* fix rebase issue and documentation datasource => data
2017-04-13 13:25:29 -07:00
clint shryock aeb97165d6 Merge branch 'master' of github.com:hashicorp/terraform
* 'master' of github.com:hashicorp/terraform:
  provider/google: bump container cluster version in tests.
2017-04-13 15:24:28 -05:00
clint shryock 89edd2859c fix go fmt errors, my bad 2017-04-13 15:24:18 -05:00
Paddy a00dafd2c6 Merge pull request #13635 from hashicorp/paddy_fix_node_version
provider/google: bump container cluster version in tests.
2017-04-13 13:23:47 -07:00
clint shryock 923587a0c9 provider/aws: Randomize and fix Dynamo DB test table names 2017-04-13 15:17:48 -05:00
Clint baaf6f5de6 provider/aws: Fix some acc tests (more, again) (#13639)
* add check destroy to subnet data source tests

* provider/aws: Fix TestAccAWSElasticacheCluster_snapshotsWithUpdates by waiting for snapshots

* provider/aws: Fix TestAccAWSRDSCluster_takeFinalSnapshot

* provider/aws: Fix TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates by specifying instance type
2017-04-13 15:00:41 -05:00
Joe Topjian 6efd0640ec Openstack port update fixes (#13604)
* provider/openstack: Handle 409 Errors Upon Security Group Deletion

If a security group is currently in use, it will throw a 409 error.
This commit catches the 409, allowing other resources to finish
deleting.

* Update openstack_networking_port_v2 resource to pass empty arrays for AllowedAddressPairs and SecurityGroups if not specified. Fixes #13531

* provider/openstack: Port Update comment
2017-04-13 13:37:15 +02:00
Paddy d34006bbbf Merge pull request #13270 from JDiPierro/google_address_importability
Google address importability
2017-04-12 15:46:08 -07:00
Dana Hoffman 11a20ddb53 provider/google: Add node_pool field in resource_container_cluster. (#13402) 2017-04-12 12:57:53 -07:00
Paddy dea8b267a9 provider/google: bump container cluster version in tests.
The version we were using has been deprecated and is no longer
available, making the withVersion test no longer pass. I've bumped it to
the latest available version.
2017-04-12 12:38:45 -07:00
Clint 9ef9501e65 provider/aws: Fix EMR Bootstrap Action Ordering (#13580)
* provider/aws: Add failing test for EMR Bootstrap Actions

* aws_emr_cluster: Fix bootstrap action parameter ordering

* provider/aws: Fix EMR Bootstrap arguments

* provider/aws: Args needs to be ForceNew, because we can't update them
2017-04-12 14:19:38 -05:00
Jake Champlin e676a72d3b Merge pull request #13577 from hashicorp/f-add-codecommit-import
provider/aws: Add import to codecommit_repository
2017-04-12 14:51:52 -04:00
Paul Stack 00e8986357 provider/dnsimple: Handle 404 on DNSimple records (#13131)
When a record was manually deleted from the console, we got an error
saying 404 Record Not Found

//cc @weppos

This PR now handles the usecase:

```
% make testacc TEST=./builtin/providers/dnsimple
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/28 21:48:19 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/dnsimple -v  -timeout 120m
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDNSimpleRecord_Basic
--- PASS: TestAccDNSimpleRecord_Basic (1.81s)
=== RUN   TestAccDNSimpleRecord_CreateMxWithPriority
--- PASS: TestAccDNSimpleRecord_CreateMxWithPriority (1.32s)
=== RUN   TestAccDNSimpleRecord_Updated
--- PASS: TestAccDNSimpleRecord_Updated (4.46s)
=== RUN   TestAccDNSimpleRecord_disappears
--- PASS: TestAccDNSimpleRecord_disappears (1.20s)
=== RUN   TestAccDNSimpleRecord_UpdatedMx
--- PASS: TestAccDNSimpleRecord_UpdatedMx (2.91s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/dnsimple	11.723s
```
2017-04-12 20:49:04 +02:00
Jake Champlin 057c58ccd8 Merge pull request #13581 from hashicorp/b-fix-cloudinit-config-panic
provider/template: Fix panic in cloudinit config
2017-04-12 14:48:15 -04:00
Radek Simko 4606090c32 provider/aws: Add support for api_gateway_method_settings (#13542) 2017-04-12 16:13:33 +01:00
Jake Champlin 82a7d4b4a5
cleanup imports 2017-04-12 10:49:52 -04:00
Jake Champlin 53fe7c2293
provider/template: Fix panic in cloudinit config
Fixes an uncaught panic during an interface cast in the `template_cloudinit_config` data source.

Fixes: #13572

```
$ make test TEST=./builtin/providers/template TESTARGS="-v -run=TestRender_handlePanic"
==> Checking that code complies with gofmt requirements...
==> Checking AWS provider for unchecked errors...
==> NOTE: at this time we only look for uncheck errors in the AWS package
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/12 10:46:33 Generated command/internal_plugin_list.go
go test -i ./builtin/providers/template || exit 1
echo ./builtin/providers/template | \
                xargs -t -n4 go test -v -run=TestRender_handlePanic -timeout=60s -parallel=4
go test -v -run=TestRender_handlePanic -timeout=60s -parallel=4 ./builtin/providers/template
=== RUN   TestRender_handlePanic
--- PASS: TestRender_handlePanic (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/template       0.028s
```
2017-04-12 10:48:53 -04:00
Jake Champlin 3cd125a901
provider/aws: Add import to codecommit_repository
Adds import capability to the `aws_codecommit_repository` resource.

Also fixes an issue in the Read function where both `description` and `resource_name` attributes weren't being updated and set in the Schema.

Fixes: #13559

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run=TestAccAWSCodeCommitRepository"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/12 10:14:44 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCodeCommitRepository -timeout 120m
=== RUN   TestAccAWSCodeCommitRepository_importBasic
--- PASS: TestAccAWSCodeCommitRepository_importBasic (16.11s)
=== RUN   TestAccAWSCodeCommitRepository_basic
--- PASS: TestAccAWSCodeCommitRepository_basic (14.97s)
=== RUN   TestAccAWSCodeCommitRepository_withChanges
--- PASS: TestAccAWSCodeCommitRepository_withChanges (26.71s)
=== RUN   TestAccAWSCodeCommitRepository_create_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_default_branch (14.34s)
=== RUN   TestAccAWSCodeCommitRepository_create_and_update_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_and_update_default_branch (27.90s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    100.071s
```
2017-04-12 10:18:49 -04:00
Jake Champlin c5a87af219 Merge pull request #13548 from hashicorp/b-fix-route-table-panic
provider/aws: Fix panic on nil route configs
2017-04-12 09:25:05 -04:00
Jake Champlin 1cb1342a2b
Clarify test is for panic fix
point to github issue
2017-04-12 09:24:42 -04:00
Tom Harvey 8493155dd0 Merge pull request #13570 from hashicorp/azurerm-eventhub-location
provider/azurerm: Event Hubs making the Location field idempotent
2017-04-12 12:33:03 +01:00
Matthew Frahry a5bb9f1e74 Merge pull request #13554 from hashicorp/p-randomize-triton-tests
Fixes TestAccTritonMachine_addNIC and TestAccTritonMachine_nic
2017-04-12 05:25:34 -06:00
tombuildsstuff 70e69a7387 Ensuring we output the error when things fail 2017-04-12 11:44:07 +01:00
Radek Simko 5f02c0b61a provider/aws: Add support for api_gateway_stage (#13540) 2017-04-12 08:35:00 +01:00
Radek Simko 1cf0cd87cb provider/kubernetes: Add support for persistent_volume_claim (#13527) 2017-04-12 08:33:26 +01:00
tombuildsstuff 01c8b0197c Switching to use the locationSchema for Event Hub Consumer Groups 2017-04-12 00:25:30 +01:00
tombuildsstuff 27e1b28b34 Making use of the Location Schema 2017-04-12 00:11:46 +01:00
= 2e19cf5ad3 Fixes TestAccTritonMachine_addNIC and TestAccTritonMachine_nic 2017-04-11 15:10:13 -06:00
= 4369a6e728 Fixes TestAccDataSourceAwsSubnet 2017-04-11 13:43:21 -06:00
= 3421fa8217 Fixes TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging 2017-04-11 13:02:10 -06:00
Jake Champlin db7fe7fe77
provider/aws: Fix panic on nil route configs
When creating an `aws_route_table`, if a `route` configuration block is left `nil`, Terraform would previously panic. This allows Terraform to catch a faulty interface conversion during the resource create. The resource will still fail to apply, however, since every item in the `route` element is `Optional` we cannot currently catch this error during plan time, via validation.

Fixes: #13545
2017-04-11 14:45:10 -04:00
= 9cd1dbf671 Fix TestAccAWSEcsService_withAlb 2017-04-11 10:52:12 -06:00
Sander van Harmelen 7304fe5c14 Make sure we add new Chef-Vault clients as clients (#13525)
This is possible using the newly released Chef-Vault 3.0 gem. Before we could only add new clients as admins.

Fixes #9137
2017-04-11 10:36:05 +02:00
Joe Topjian 723a6e0860 provider/openstack: Fixing names for import tests (#13523) 2017-04-11 11:11:22 +03:00
Raphael Randschau 41e14baa57 provider/scaleway: improve schema resources (#13522)
improve readability by removing unecessary schema type declarations

this changeset does not include any semantic changes
2017-04-11 11:10:45 +03:00
Radek Simko 71a05e6f67
provider/kubernetes: Add support for persistent_volume 2017-04-11 07:04:57 +01:00
Radek Simko 793ce368fc
kubernetes: Make generatable name optional in metadataSchema 2017-04-11 07:01:50 +01:00
Matthew Frahry 7819a3e6de Merge pull request #13511 from hashicorp/p-aws-test-ecrg
Fixes TestAccAWSElasticacheReplicationGroup_updateParameterGroup
2017-04-10 13:06:22 -06:00
Paul Stack 3574052c8a provider/aws: Add support for EMR clusters to aws_appautoscaling_target (#13368)
```

```
2017-04-10 21:46:51 +03:00
= 424a5cd25e Fixes TestAccAWSElasticacheReplicationGroup_updateParameterGroup 2017-04-10 11:51:49 -06:00
Matthew Frahry 5be2a50b05 Merge pull request #13508 from hashicorp/p-aws-tes-ecs-service
TestAccAWSEcsServiceWithPlacementConstraints_emptyExpression
2017-04-10 11:18:24 -06:00
= 5224940b62 Fixes TestAccAWSEcsServiceWithPlacementConstraints_emptyExpression 2017-04-10 10:27:41 -06:00
stack72 98515a8058
Merge branch 'master' of github.com:hashicorp/terraform 2017-04-10 19:12:37 +03:00
Radek Simko 7a61e1d8e3 provider/kubernetes: Allow defining custom config context (#12958) 2017-04-10 16:13:09 +01:00
Radek Simko 81e184deeb provider/kubernetes: Use PATCH to update namespace (#13114) 2017-04-10 15:01:40 +01:00
stack72 ee9c84cf7f
provider/aws: making the target_group_arn optional for the ecs_service hash func 2017-04-10 16:37:40 +03:00
Tom Harvey 906cd0946a Merge pull request #13223 from tombuildsstuff/azurerm-servicebustopic
provider/azurerm: Setting an optional field on Service Bus Topic
2017-04-10 14:35:22 +01:00
stack72 aac87bf875
Merge branch 'fix/alb-ecs-integration' of https://github.com/KensoDev/terraform into KensoDev-fix/alb-ecs-integration 2017-04-10 15:49:56 +03:00
Rui Gonçalves 0e2a3354be
Add support for StatusCake trigger rate 2017-04-10 15:38:26 +03:00
tombuildsstuff 02ed0e4b09 Updating the error message 2017-04-10 12:28:17 +01:00
tombuildsstuff d9eec24e6b Hooking up the Image List Entry tests 2017-04-10 12:26:22 +01:00
tombuildsstuff bb2afcb38e Refactoring the Complete test / identifying Update as Update 2017-04-10 12:22:16 +01:00
tombuildsstuff bacfefec42 Fixing the import list 2017-04-10 12:19:56 +01:00
Peter Goodman 6ad4b89b8a provider/aws Add support for updating SSM documents (#13491)
* Add schema_version as computed ssm document attribute

* Update the SSM document itself if the content has changed and it has a schema >= 2.0

* Add default_version as DocumentVersion in SSM doc update

* Acceptance test for updating an SSM document

* Better error handling in updating SSM documents

* Add SSM document update documentation

* Better names for SSM input params
2017-04-10 14:13:43 +03:00
Marcin Suterski 8e2ff8e6ca Add support for Sumologic logging to Fastly provider (#12541) 2017-04-10 14:04:14 +03:00
Jake Champlin dec1cc28f0
Merge remote-tracking branch 'origin/master' into f-oracle-compute 2017-04-09 21:58:01 -04:00
Paul Hinze b77d797e85 provider/aws: Fix aws_ami_launch_permission refresh when AMI disappears (#13469)
Launch permissions are implicitly nuked if an AMI is removed for any
reason - Terraform should not error on refresh in this case, but rather
just see the launch permissions as gone and react appropriately.
2017-04-08 20:51:00 +03:00
Pasha Palangpour 8e87b107a9 provider/ns1: No splitting answer on spf records. (#13260)
* provider/ns1: No splitting answer on spf records.

* provider/ns1: Adds acctest for SPF records.
2017-04-08 11:04:57 +01:00
Radek Simko 6e2c758666 Merge pull request #13456 from hashicorp/iam_openid
provider/aws: Add support for iam_openid_connect_provider
2017-04-08 09:56:02 +01:00
Martin Atkins 1d500f57a6 provider/dns: update hard-coded DNS result in acctests
The acctests depend on getting a particular result back from resolving
www.hashicorp.com, which seems to have changed. In the long run we should
probably *not* be depending on the DNS configuration of the main Hashicorp
website, but this is just a quick fix to get the build back to green so
we can continue work on other things.
2017-04-07 17:04:55 -07:00
Radek Simko affdc76d4c
aws: Allow import of OID connect provider + allow disappearance 2017-04-07 22:15:37 +01:00
Radek Simko ab4b06a95d
aws: Fix OID connect provider updates + simplify + add tests 2017-04-07 22:15:36 +01:00
Radek Simko caa82d70ca
provider/aws: Align field names with conventions (lowercase+underscore) 2017-04-07 22:15:35 +01:00
Radek Simko 668a09aa00
provider/aws: Add diff suppression & validation for OpenID URL 2017-04-07 22:15:35 +01:00
Ryan Roberts 3640bdd6e1
AWS IAM OpenID Connect provider
http://docs.aws.amazon.com/cli/latest/reference/iam/create-open-id-connect-provider.html

Tests currently use a personal google account identity
2017-04-07 22:15:34 +01:00
clint shryock f521b15311 provider/aws: Fix DB Option group test by skipping backup 2017-04-07 16:03:26 -05:00
clint shryock d83ecf9e72 remove some manual names to allow the automatic random names, avoid some possible conflicts 2017-04-07 15:15:18 -05:00
Jake Champlin 4db7d69a48
Merge remote-tracking branch 'origin/master' into f-oracle-compute 2017-04-07 15:21:39 -04:00
Jake Champlin 2f88ac2e2b
Cleanup vet errors 2017-04-07 12:06:45 -04:00
Jake Champlin 8d7db2cd38
fixup tests 2017-04-07 11:31:32 -04:00
Gauthier Wallet c44afc4179 provider/aws: Fix DynamoDB issues about GSIs indexes (#13256)
* provider/aws: Fixed DynamoDB GSI update when using multiple indexes

* provider/aws: Fixed DynamoDB GSI set hash function

* Added DynamoDB table state migration
2017-04-07 10:13:00 -05:00
Joshua Spence 488711afef Add `name_prefix` to `aws_alb_target_group` (#13442)
Adds the `name_prefix` parameter to the `aws_alb_target_group` resource.
2017-04-07 18:09:51 +03:00
Jake Champlin 4b281ba051
fixup tests 2017-04-07 11:00:26 -04:00
Jake Champlin 5c742572e4
fix data_source_network_interface test 2017-04-07 10:41:59 -04:00
Clint 0334fb0341 providers/aws: Update ElasticTranscoderPreset to have default for MaxFrameRate (#13422) 2017-04-07 09:10:29 -05:00
Tom Harvey 4f66290ffc Merge pull request #13453 from tombuildsstuff/f-oracle-imports
provider/opc: Import support for IP Networks
2017-04-07 15:06:02 +01:00
Tom Harvey 4129afd884 Merge branch 'f-oracle-compute' into f-oracle-website 2017-04-07 14:52:08 +01:00
Gavin Williams afb8bb27e8 provider/openstack: Add support for 'value_specs' options to (#13380)
`openstack_compute_servergroup_v2`
Refactor to use common `types.go` and `MapValueSpecs function`.
Added supporting website documentation.
2017-04-07 15:15:31 +03:00
Joe Topjian cfd4101055 provider/openstack: Add SOFT_DELETED to delete status (#13444)
This commit allows clean deletion of instances that have a
status of SOFT_DELETED.
2017-04-07 15:13:08 +03:00
tombuildsstuff 8a5379479a Removing the unused ssh key 2017-04-07 13:06:16 +01:00
Radek Simko a4768eb9f9 provider/aws: Raise timeout for attaching/detaching VPN GW (#13457) 2017-04-07 12:30:30 +01:00
Radek Simko 8f7171fc76 provider/aws: Raise timeout for deleting APIG REST API (#13414) 2017-04-07 12:29:24 +01:00
tombuildsstuff 3a084b061a Merge branch 'master' into f-oracle-merge 2017-04-07 11:15:36 +01:00
tombuildsstuff 18dc5559ba Import support for Image Lists 2017-04-07 11:06:51 +01:00
tombuildsstuff 41d4bc1622 Adding tests covering low latency storage 2017-04-07 10:42:27 +01:00
tombuildsstuff 6d859479dd Import support for Storage Volumes 2017-04-07 10:36:04 +01:00
tombuildsstuff 41595582dc adding back in snapshots 2017-04-07 09:23:03 +01:00
tombuildsstuff 2332256af6 Refactoring Bootable Storage Volumes 2017-04-07 09:02:46 +01:00
Matthew Frahry 29d4814992 Merge pull request #13424 from hashicorp/f-add-ip-address-associaitons
provider/opc: Adding ip address associations
2017-04-06 16:29:02 -06:00
= d79b479ad2 final nit fix 2017-04-06 16:28:50 -06:00
= 1d02ed51c1 fixed nits 2017-04-06 16:27:22 -06:00
Jake Champlin e620a0de0d
remove defunct todo item 2017-04-06 14:22:32 -04:00
Jake Champlin 3433850c9c
provider/opc: Add debug logging
Adds debug logging, fixes a failing instance acceptance test, and updates vendored dep
2017-04-06 13:59:16 -04:00
Jake Champlin c51fb79bf3
provider/opc: Remove 'model' from instance networking
Removes `model` as a configurable attribute in instance networking.

Also adds missing `name` attribute from `ip_reservation` docs

```
$ make testacc TEST=./builtin/providers/opc TESTARGS="-run=TestAccOPCInstance_ipNetwork"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/06 12:53:13 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/opc -v -run=TestAccOPCInstance_ipNetwork -timeout 120m
=== RUN   TestAccOPCInstance_ipNetwork
--- PASS: TestAccOPCInstance_ipNetwork (258.69s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/opc    258.721s
```

```
$ make testacc TEST=./builtin/providers/opc TESTARGS="-run=TestAccOPCInstance_sharedNetworking"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/06 12:58:43 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/opc -v -run=TestAccOPCInstance_sharedNetworking -timeout 120m
=== RUN   TestAccOPCInstance_sharedNetworking
--- PASS: TestAccOPCInstance_sharedNetworking (253.15s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/opc    253.180s
```
2017-04-06 13:05:52 -04:00
Matthew Frahry 4bfd0fd15b Merge branch 'f-oracle-compute' into f-add-ip-address-associaitons 2017-04-06 10:48:39 -06:00
= fb89a010af Adding ip address associations 2017-04-06 10:46:14 -06:00
Colin Wood c88b19e5c8 Merge pull request #13390 from cwood/cwood/refactor-bitbucket-provider
Refactoring of bitbucket provider with better error support and general improvments
2017-04-06 09:40:36 -07:00
Jake Champlin bff6f5d609
Remove unnecessary nil check in return 2017-04-06 12:31:33 -04:00
Jake Champlin 3bd582b3d5
Add fixes from comments
- Adds docs to sidebar
- Changes `volume` to `volume_name` in volume snapshot
- Fixes tests
- Changes `parent_volume_bootable` to boolean, and converts to string for API

```
$ make testacc TEST=./builtin/providers/opc TESTARGS="-run=TestAccOPCStorageVolumeSnapshot_basic"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/06 12:26:59 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/opc -v -run=TestAccOPCStorageVolumeSnapshot_basic -timeout 120m
=== RUN   TestAccOPCStorageVolumeSnapshot_basic
--- PASS: TestAccOPCStorageVolumeSnapshot_basic (24.45s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/opc    24.476s
```
2017-04-06 12:29:13 -04:00
Matthew Frahry 924453ea3c Merge pull request #13399 from hashicorp/p-aws-tests
P aws tests
2017-04-06 09:33:11 -06:00
Tom Harvey 6f2551ec33 Merge pull request #12455 from brandontosch/brandontosch/GH-11874
AzureRM Managed Disks
2017-04-06 10:29:40 +01:00
Jake Champlin e569fd3f6c
provider/opc: Add Storage Volume Snapshots
Adds `storage_volume_snapshot` resource, and allows for creating a storage_volume from a storage volume snapshot.
Also adds documentation for additions, and tests.

```
TF_ACC=1 go test ./builtin/providers/opc -v -run=TestAccOPCStorageVolume -timeout 120m
=== RUN   TestAccOPCStorageVolumeSnapshot_importBasic
--- PASS: TestAccOPCStorageVolumeSnapshot_importBasic (24.72s)
=== RUN   TestAccOPCStorageVolumeSnapshot_basic
--- PASS: TestAccOPCStorageVolumeSnapshot_basic (24.01s)
=== RUN   TestAccOPCStorageVolume_Basic
--- PASS: TestAccOPCStorageVolume_Basic (12.99s)
=== RUN   TestAccOPCStorageVolume_Complete
--- PASS: TestAccOPCStorageVolume_Complete (13.91s)
=== RUN   TestAccOPCStorageVolume_MaxSize
--- PASS: TestAccOPCStorageVolume_MaxSize (14.47s)
=== RUN   TestAccOPCStorageVolume_Update
--- PASS: TestAccOPCStorageVolume_Update (22.36s)
=== RUN   TestAccOPCStorageVolume_FromSnapshot
--- PASS: TestAccOPCStorageVolume_FromSnapshot (32.28s)
```
2017-04-06 02:07:38 -04:00
Jake Champlin 871d33d90d
Fix instance attributes 2017-04-05 18:14:11 -04:00
= 1f13ff22a3 TestAccAWSAutoScalingGroup_ALB_TargetGroups passes 2017-04-05 16:07:14 -06:00
Jake Champlin 9062ddded3
Add Storage Volumes to instances
- Adds storage volumes to instances
- Updates go-oracle-terraform vendor
- Adds clarification between ip/shared network in docs
- make 'bootable.image_list' a required parameter in the storage_volume resource
- Add storage volume test + docs
2017-04-05 16:40:05 -04:00
James Bardin e2a428b43f Merge pull request #13384 from hashicorp/s3-state-locks
Unify s3 client code
2017-04-05 16:15:08 -04:00
Clint 092fe7ded6 Merge pull request #13394 from hashicorp/b-aws-redshift-fixes
provider/aws: Fix some Acc tests by skipping final snaphot in Redshift
2017-04-05 15:08:21 -05:00
Clint 7cd0708402 Merge pull request #13281 from ameir/fix-aws_s3_bucket-logging-diff
Fix `aws_s3_bucket` diff of logging options
2017-04-05 14:38:39 -05:00
clint shryock 053dd92937 provider/aws: Fix some Acc tests by skipping final snaphot in Redshift
Redshift was changed to not skip snapshots by default, so our configs
were out of date and causing errors in destroy (thus leaking redshifts)

This changes the configs to skip snapshots, which should at least fix:

- TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates
- TestAccAWSRedshiftCluster_loggingEnabled
2017-04-05 14:33:33 -05:00
Colin Wood 10cda98245 Refactoring of bitbucket provider with betters.
Also doesnt use decode/encode anymore since those methods are more
intended for streams. So this goes to the more standed marshal/unmarshal
of data.

This also adds better error support and will try to give the user
better errors from the api if it can. Or any issues with the bitbucket
service.
2017-04-05 12:09:43 -07:00
clint shryock 95c58269b9 provider/aws: fix TestAccAWSCloudwatchLogSubscriptionFilter_basic by linking the name 2017-04-05 13:48:13 -05:00
clint shryock 403e48f1cf provider/aws: Randomize ElastiCache param group name. Fixes TestAccAWSElasticacheParameterGroupOnly,
TestAccAWSElasticacheParameterGroup_basic, TestAccAWSElasticacheParameterGroup_importBasic
2017-04-05 13:01:17 -05:00
Clint 66124fb343 provider/aws: Fix KMS Key reading with Exists method (#13348)
* provider/aws: Fix KMS Key reading with Exists method

Fixes #13322 by checking if the key Exists and offering to recreate if
not found, or pending delete

* remove redundant code
2017-04-05 12:48:11 -05:00
James Bardin 0ec2a5cfd3 add AWSClient methods to get s3 and dyndb conns
Add getters for the AWSClient s3.S3 and dynamodb.DynamoDB clients so the
s3 remote-state backend can use all the same initialization code as the
aws provider.
2017-04-05 12:29:25 -04:00
Paul Stack 6d9384aeeb provider/aws: Add support for evaluate_low_sample_count_percentiles to cloudwatch_metric_alarm (#13371)
```

```
2017-04-05 19:28:57 +03:00
= e2a1f5e25e Fixed TestAccAWSEcsDataSource_ecsTaskDefinition 2017-04-05 09:07:49 -06:00
Joakim Sernbrant b608f0beca provider/cloudstack: do not force a new resource when updating load balancer members (#11786) 2017-04-05 15:34:35 +02:00
Paul Stack d938d263f6 provider/aws: Add support for treat_missing_data to cloudwatch_metric_alarm (#13358)
* provider/aws: Add support for treat_missing_data to cloudwatch_metric_alarm

Fixes: #13263

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/05 08:51:06 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchMetricAlarm -timeout 120m
=== RUN   TestAccAWSCloudWatchMetricAlarm_importBasic
--- PASS: TestAccAWSCloudWatchMetricAlarm_importBasic (23.93s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_basic
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (27.81s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_treatMissingData
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (43.39s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_extendedStatistic
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (26.80s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_missingStatistic
--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (5.95s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	127.899s
```

* provider/aws: Set cloudwatch_metric_alarm treamt_missing_data to missing

This follows what the AWS API does. We had to add a state migration for
this to make sure that the user doesn't see any unexpected activity on
their Terraform plans

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAWSCloudWatchMetricAlarmMigrateState'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/05 14:51:32 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAWSCloudWatchMetricAlarmMigrateState -timeout 120m
=== RUN   TestAWSCloudWatchMetricAlarmMigrateState
2017/04/05 14:52:13 [INFO] Found AWS CloudWatch Metric Alarm State v0; migrating to v1
2017/04/05 14:52:13 [DEBUG] Attributes before migration: map[string]string{}
2017/04/05 14:52:13 [DEBUG] Attributes after migration: map[string]string{"treat_missing_data":"missing"}
--- PASS: TestAWSCloudWatchMetricAlarmMigrateState (0.00s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	0.018s
```
2017-04-05 13:17:47 +01:00
Radek Simko cd79471ecb provider/aws: Increase Beanstalk 'ready' timeout (#13359) 2017-04-05 13:11:55 +01:00
Radek Simko affce99a8e provider/aws: Increase launch_configuration creation timeout (#13357) 2017-04-05 13:10:46 +01:00
Radek Simko 77150880e0 provider/aws: Increase subnet deletion timeout (#13356) 2017-04-05 13:09:44 +01:00
Radek Simko 1c0cd0dd8f provider/aws: Fix wrong config in ES domain acceptance test (#13362) 2017-04-05 12:27:56 +01:00
Paul Stack 5cad27bb2e provider/aws: Migrate aws_dms_* resources away from AWS waiters (#13291)
The AWS waiter package has changed location in the 1.8.0 version of the
SDK. DMS will need to mitigate a breaking change because of this

Between @radeksimko and myself, we think that we should migrate the DMS
resources to using the Terraform state refresh func pattern that is used
across the entire of the AWS provider. DMS is the *only* resource that
currently uses the AWS waiters, so the LOE to migrate is pretty low
2017-04-05 06:48:37 +01:00
dannytrigo 92cda8f75d Do not error if compute volume attachment is missing (#13342)
https://github.com/hashicorp/terraform/issues/13334
2017-04-05 06:43:16 +01:00
Jake Champlin 74a53f71b1 Merge pull request #13261 from harijayms/whiskeyjay/9198fix
provider/azurerm: Fixing crash when importing Local Network Gateways #13301
2017-04-04 17:03:10 -04:00
Jake Champlin d05af76607
add image_list_entry resource 2017-04-04 16:28:11 -04:00
Jake Champlin 456d43e200
Merge remote-tracking branch 'origin/master' into f-oracle-compute 2017-04-04 16:14:51 -04:00
Jake Champlin fed7b6e781 Merge pull request #13129 from tombuildsstuff/validation
provider/azurerm: Moving Reused JSON Validation -> Core
2017-04-04 16:11:13 -04:00
KensoDev 8ac077022e some comments explaining the reason 2017-04-04 13:02:05 -07:00
KensoDev 169afb2351 tag params as optional based on ELB type 2017-04-04 13:00:08 -07:00
Jake Champlin 1f9cf2f4c3
update tests, fix instances 2017-04-04 14:36:51 -04:00
Matthew Frahry c3175a556f Merge pull request #13337 from hashicorp/p-aws-iam-keybase-test
Removed newline from keybase username
2017-04-04 09:55:39 -06:00
= 92e75ff2cb Removed newline from keybase username 2017-04-04 09:33:49 -06:00
Paul Stack 2686768802 provider/aws: Recreate opsworks_stack on change of service_role_arn (#13325)
Fixes: #13305

From the docs - http://docs.aws.amazon.com/cli/latest/reference/opsworks/update-stack.html

```
--service-role-arn (string)

Do not use this parameter. You cannot update a stack's service role.
```
2017-04-04 16:20:53 +01:00
Radek Simko 77fe5f8746 provider/aws: Increase AMI retry timeouts (#13324) 2017-04-04 15:46:14 +01:00
Radek Simko 275972ca59 provider/aws: Increase timeout for deploying cloudfront distribution (#13319) 2017-04-04 15:44:17 +01:00
Radek Simko 0dddb48239 provider/aws: Improve logging & docs for caller_identity (#13316) 2017-04-04 15:41:30 +01:00
Matthew Frahry 8e470fc01c Merge pull request #13178 from hashicorp/p-aws-randomize-test-names2
provider/aws: Randomize test names
2017-04-04 08:33:24 -06:00
Jasmin Gacic 6c40112946 Changed output type of ips variable of ip_block ProfitBricks resource (#13290) 2017-04-04 15:28:02 +01:00
Jake Champlin 15d93749e8
fix data_source_vnic_test 2017-04-04 10:21:10 -04:00
Jake Champlin 51162119b9
remove old provider naming 2017-04-04 09:36:34 -04:00
Marc Vieira-Cardinal (VA2MVC) 82af03aca5 Fixed typo 2017-04-04 08:57:16 -04:00
Paul Stack 6025967c95 provider/aws: Support ip_address_type for aws_alb (#13227)
Fixes: #11429

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSALB_updatedIpAddressType'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/31 20:12:20 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSALB_updatedIpAddressType -timeout 120m
=== RUN   TestAccAWSALB_updatedIpAddressType
--- PASS: TestAccAWSALB_updatedIpAddressType (284.42s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	284.447s
```
2017-04-04 11:29:47 +01:00
Radek Simko 2697532c8f
aws: Randomize IAM policy name in acc test 2017-04-04 11:07:55 +01:00
KensoDev e9d7d42775 fix integration between ALB and ECS
For our ECS service definition we have this snippet at the
`load_balancer`.

The `target_group_arn` is being pupulated by an external service that
returns the arn based on a simple string from our microservices list.

If the arn changed, this would not cause a recreation of the service and
leaving a dangling pointer to an arn that does not exist anymore.

```
  load_balancer {
    target_group_arn  = "${lookup(var.target_group_mapping, element(values(var.microservices), count.index))}"
    container_name    = "${element(values(var.microservices), count.index)}"
    container_port    = "${var.container_port}"
  }
```

The fix is adding another field to the set that's creating the ELB/ALB
definition. From looking into the git history seems this code was
created prior to ALB thus not having this field available at the time.

Service is being recreated as expected, no other services are affected
(expected behavior)
2017-04-03 20:57:54 -07:00
Jake Champlin 9e823d2bc7
gofmt files 2017-04-03 23:48:35 -04:00
Jake Champlin b1ab082d9b Merge branch 'f-oracle-compute' into f-update-oracle-provider 2017-04-03 18:28:29 -04:00
Jake Champlin edc524df55
provider/opc: Update OPC Provider
Updates the OPC provider to a fully working version.
2017-04-03 18:24:57 -04:00
Martin Atkins 638038428a Merge #13188: aws_subnet_ids data source 2017-04-03 15:17:15 -07:00
Stephen Cross 403801cf68
Initial Oracle Compute Cloud provider 2017-04-03 16:30:36 -04:00
= 35ceeb15f4 final fix after merge with master 2017-04-03 13:27:43 -06:00
Jake Champlin 5cce6b9966 Merge pull request #13092 from hashicorp/f-update-sts-caller-identity
provider/aws: Update calling_identity
2017-04-03 14:29:28 -04:00
Jake Champlin 75e61606bb
dont dereference pointers on Set 2017-04-03 14:10:57 -04:00
Matthew Frahry 02d3e1c12e Merge branch 'master' into p-aws-randomize-test-names2 2017-04-03 11:34:16 -06:00
= 1b2653b0bd randomizes all bgp_asn values 2017-04-03 11:17:59 -06:00
= e2d7d5fc68 Removed random provider frm iam policy attachment test 2017-04-03 08:11:54 -06:00
Paul Stack b80d3e5701 provider/aws: Set stickiness to computed in alb_target_group (#13278)
The Default values set by AWS were breaking the AWS ALB Listener Rule
tests. The stickiness parameter needed to be set to be Computed: true to
remove this discrepancy

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSALBListenerRule_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/03 01:23:47 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSALBListenerRule_basic -timeout 120m
=== RUN   TestAccAWSALBListenerRule_basic
--- PASS: TestAccAWSALBListenerRule_basic (235.36s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	235.397s
```
2017-04-03 12:11:45 +03:00
Ameir Abdeldayem 2e5abb1e84 If `aws_s3_bucket` logging options are cleared on the AWS side, Terraform does not detect this, and changes must be made out-of-band or through a recreation of the resource. This PR addresses this issue.
Fixes #8576.
2017-04-03 03:00:51 -04:00
Joshua Spence f15b74b4a4 Fix DB parameter group name property
It appears that #13232 doesn't work properly if you actually try to set any `parameter`s. Specifically, I was getting the following error:

```
* aws_db_parameter_group.test: 1 error(s) occurred:

* aws_db_parameter_group.test: Error modifying DB Parameter Group: InvalidParameterValue: The parameter DBParameterGroupName must be provided and must not be blank.
	status code: 400, request id: 5783e396-17ff-11e7-87d5-e3fd4c7025ce
```
2017-04-03 09:57:14 +10:00
stack72 d209dc1a32
provider/aws: Fixup AWS db instance acceptance tests with default security group 2017-04-03 01:48:45 +03:00
Justin DiPierro 8092d90f25 Importability for Google Compute Global Address 2017-04-01 13:25:34 -04:00
Justin DiPierro 8d8d3a728a Google Compute Address Importability 2017-04-01 13:22:39 -04:00
Masayuki Morita 4b9ec9c920 provider/aws: Validate aws_ecs_task_definition.container_definitions (#12161) 2017-04-01 17:31:32 +01:00
Jonathan Camp b8f6e2a70a provider/aws: handle aws_lambda_function missing s3 key error (#10960)
* ensure NoSuchKey is not a retryable error

* Simplify err handling + lower log msg severity
2017-04-01 15:39:46 +01:00
Doug Neal 0c4c578552 provider/aws: Implement aws_ses_domain_identity (#13098)
* provider/aws: New resource: aws_ses_domain_identity

Provide a resource to manage domain identities in SES. Exports the
verification_code attribute which can be used to add the TXT record to
the domain to complete the domain verification.

* provider/aws: Acceptance tests for aws_ses_domain_identity

* Resource aws_ses_domain_identity: Documentation update

Provide documentation for the new resource type.
2017-04-01 06:57:34 +01:00
Seth Vargo e1be539868 Merge pull request #13182 from hashicorp/sethvargo/create_or_update
Handle the case when issue labels already exist
2017-03-31 16:38:51 -04:00