Commit Graph

4505 Commits

Author SHA1 Message Date
Radek Simko df40b91fb8 provider/aws: Allow importing iam_saml_provider (#7605) 2016-07-12 17:04:01 +01:00
Derek Abdine 7bdc060d24 provider/logentries: Implementing logentries provider (#7067)
* logentries provider

* logentries vendoring

* logentries docs
2016-07-12 14:14:39 +01:00
Paul Stack 4582cbeb5e provider/digitalocean: Add Test for DO Tag Import (#7602)
```
% make testacc TEST=./builtin/providers/digitalocean TESTARGS='-run=TestAccDigitalOceanTag_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/digitalocean -v
-run=TestAccDigitalOceanTag_ -timeout 120m
=== RUN   TestAccDigitalOceanTag_importBasic
--- PASS: TestAccDigitalOceanTag_importBasic (2.42s)
=== RUN   TestAccDigitalOceanTag_Basic
--- PASS: TestAccDigitalOceanTag_Basic (1.72s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/digitalocean
4.151s
```
2016-07-12 13:16:34 +01:00
Paul Stack 7a58ad95f5 provider/aws: Support Import for `aws_simpledb_domain` (#7601)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSimpleDBDomain_'
==> 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=TestAccAWSSimpleDBDomain_ -timeout 120m
=== RUN   TestAccAWSSimpleDBDomain_importBasic
--- PASS: TestAccAWSSimpleDBDomain_importBasic (19.59s)
=== RUN   TestAccAWSSimpleDBDomain_basic
--- PASS: TestAccAWSSimpleDBDomain_basic (19.93s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    39.535s
```
2016-07-12 13:15:47 +01:00
Martin Häger 32abd937f1 SimpleDB domain resource (#7600) 2016-07-12 12:55:58 +01:00
Joe Topjian 8b80d05103 provider/openstack: Support Import of OpenStack Block Storage Volumes (#7347) 2016-07-12 09:13:52 +01:00
Paul Stack 303ba86cf6 provider/aws: Allow `port` on `aws_db_instance` to be updated (#7441)
Fixes #2439

Port used to ForceNew, it has now been changed to allow it to be
updated. 2 changes were needed:

1. Setting the port back to state
2. Adding the wait for state function to the Update func

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBInstance_portUpdate'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSDBInstance_portUpdate -timeout 120m
=== RUN   TestAccAWSDBInstance_portUpdate
--- PASS: TestAccAWSDBInstance_portUpdate (699.84s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    699.861s
```
2016-07-12 09:07:25 +01:00
dkalleg 9cbdc80937 vSphere Provider - Fix destroy when vm is powered off or has networks (#7206)
This patch adds a wait when powering on a vm so setupVirtualMachine does
not return until the vm is actually powered on.  This allows other
functions to work off the assumption that the current state of the vm
is not in flux. During resourceVSphereVirtualMachineRead(), the wait for
IP would cause a hang for any VM with no network interfaces or for vms
that had been powered off for any reason.  This also means that the user
could not delete a vm with no network interfaces or that is powered off.
Checking power state before trying to check for network interfaces.
Resolves https://github.com/hashicorp/terraform/issues/7168
2016-07-12 09:05:02 +01:00
dkalleg 71c694cc5f Additional SCSI controller types support (#7525)
This allows the user to specify new controller types.  Before when
specifying 'scsi', govmomi defaults to lsilogic-parallel. This patch
allows the user to now specify 'scsi-lsi-parallel', 'scsi-buslogic',
scsi-paravirtual', and 'scsi-lsi-sas'. Resolves issue
https://github.com/hashicorp/terraform/issues/7202
2016-07-12 09:02:41 +01:00
Radek Simko 8fa75ea383 provider/aws: Allow import of KMS key (#7599) 2016-07-12 08:49:33 +01:00
Radek Simko 40e05ecc33 provider/aws: Allow import of glacier_vault (#7596) 2016-07-12 08:49:26 +01:00
Radek Simko d69256dcb4 Merge pull request #7594 from TimeIncOSS/f-aws-efs-mt
provider/aws: Allow import of efs_mount_target
2016-07-12 00:26:30 +01:00
Clint 8cb2a482a8 provider/triton: Update base packages in tests (#7593) 2016-07-11 17:23:09 -06:00
Radek Simko 86c1661205 provider/aws: Allow import of efs_mount_target 2016-07-12 00:18:13 +01:00
Radek Simko f5ef8f36c2 provider/aws: Allow import of efs_file_system 2016-07-12 00:02:47 +01:00
clint shryock edd67547bc remove debug statements 2016-07-11 15:12:15 -06:00
stack72 ceeab2ad12 provider/aws: Support Import for `aws_api_gateway_key`
Previously, the `stage_key` were not being set back to state in the Read
func. Changing this means the tests now run as follows:

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayApiKey_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSAPIGatewayApiKey_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayApiKey_importBasic
--- PASS: TestAccAWSAPIGatewayApiKey_importBasic (42.42s)
=== RUN   TestAccAWSAPIGatewayApiKey_basic
--- PASS: TestAccAWSAPIGatewayApiKey_basic (42.11s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    84.549s
```
2016-07-11 15:11:30 -06:00
Paul Stack ea4483d8b6 provider/aws: Support Import `aws_rds_cluster_instance` (#7522)
We were not setting all the values in the read Func. One other issue, we
were setting the *wrong* db_parameter_name value to state

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSClusterInstance_import'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSRDSClusterInstance_import -timeout 120m
=== RUN   TestAccAWSRDSClusterInstance_importBasic
--- PASS: TestAccAWSRDSClusterInstance_importBasic (1201.80s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws
1201.814s
```
2016-07-11 14:59:14 -06:00
Paul Stack 38e3d3ba87 provider/aws: Support Import `aws_cloudfront_origin_access_identity` (#7506)
* provider/aws: Support Import `aws_cloudfront_origin_access_identity`

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudFrontOriginAccessIdentity_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSCloudFrontOriginAccessIdentity_ -timeout 120m
=== RUN   TestAccAWSCloudFrontOriginAccessIdentity_importBasic
--- PASS: TestAccAWSCloudFrontOriginAccessIdentity_importBasic (17.07s)
=== RUN   TestAccAWSCloudFrontOriginAccessIdentity_basic
--- PASS: TestAccAWSCloudFrontOriginAccessIdentity_basic (15.34s)
=== RUN   TestAccAWSCloudFrontOriginAccessIdentity_noComment
--- PASS: TestAccAWSCloudFrontOriginAccessIdentity_noComment (16.29s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    48.717s
```

* Update import_aws_cloudfront_origin_access_identity_test.go
2016-07-11 14:58:25 -06:00
Paul Stack 743be7914d provider/aws: Refresh CloudWatch Group from state on 404 (#7576)
Fixes #7543 where creating a CloudWatch Group, then deleting it from the
console will cause no action on refresh / plan

```
% make testacc TEST=./builtin/providers/aws  TESTARGS='-run=TestAccAWSCloudWatchLogGroup_'
==> 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=TestAccAWSCloudWatchLogGroup_ -timeout 120m
=== RUN   TestAccAWSCloudWatchLogGroup_importBasic
--- PASS: TestAccAWSCloudWatchLogGroup_importBasic (18.10s)
=== RUN   TestAccAWSCloudWatchLogGroup_basic
--- PASS: TestAccAWSCloudWatchLogGroup_basic (17.34s)
=== RUN   TestAccAWSCloudWatchLogGroup_retentionPolicy
--- PASS: TestAccAWSCloudWatchLogGroup_retentionPolicy (49.81s)
=== RUN   TestAccAWSCloudWatchLogGroup_multiple
--- PASS: TestAccAWSCloudWatchLogGroup_multiple (23.74s)
=== RUN   TestAccAWSCloudWatchLogGroup_disappears
--- PASS: TestAccAWSCloudWatchLogGroup_disappears (15.78s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    124.789s
```
2016-07-11 12:06:44 -06:00
James Nugent 29c1d36cf4 Merge pull request #7571 from hashicorp/import-arm-availset
provider/azurerm: Support Import for `azurerm_availability_set`
2016-07-11 10:35:52 -06:00
James Nugent 4798b13937 Merge pull request #7574 from hashicorp/import-arm-rg
provider/azurerm: Support Import of `azurerm_resource_group`
2016-07-11 10:35:41 -06:00
James Nugent 6cc2a52810 Merge pull request #7578 from hashicorp/import-arm-publicip
provider/azurerm: Support Import for `azurerm_public_ip`
2016-07-11 10:35:18 -06:00
stack72 c28b100233
provider/vsphere: Fix the `vsphere_virtual_machine` tests
The PR that was merged to add `keep_on_destroy` was showing a green
build so was merged but that build happened before another merge adding
another parameter to the tests

FYI @dkalleg - fixes #7169
2016-07-11 16:15:28 +01:00
JB Arsenault fc838be69e Add `destroy_grace_seconds` option to stop container before delete (#7513) 2016-07-11 16:03:02 +01:00
Paul Stack 784a1060e9 Revert "Revert "Adding disk keep_on_remove support on delete case"" 2016-07-11 15:48:34 +01:00
stack72 c9476ea65b
provider/azurerm: Support Import for `azurerm_public_ip`
Had to make some changes to this resource. Params were not being set in
the Read func - also added a statefunc to the IPAddressAllocation as
that was coming back in a different case to how we were sending it. We
need to treat that property as case-insensitive

```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMPublicIpStatic_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMPublicIpStatic_ -timeout 120m
=== RUN   TestAccAzureRMPublicIpStatic_importBasic
--- PASS: TestAccAzureRMPublicIpStatic_importBasic (128.06s)
=== RUN   TestAccAzureRMPublicIpStatic_basic
--- PASS: TestAccAzureRMPublicIpStatic_basic (126.25s)
=== RUN   TestAccAzureRMPublicIpStatic_withTags
--- PASS: TestAccAzureRMPublicIpStatic_withTags (145.99s)
=== RUN   TestAccAzureRMPublicIpStatic_update
--- PASS: TestAccAzureRMPublicIpStatic_update (192.32s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
592.648s
```
2016-07-11 14:36:23 +01:00
Paul Stack f989009448 Update import_arm_resource_group_test.go 2016-07-11 13:33:39 +01:00
stack72 ef707a89a8
provider/azurerm: Support Import of `azurerm_resource_group`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMResourceGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMResourceGroup_ -timeout 120m
=== RUN   TestAccAzureRMResourceGroup_importBasic
--- PASS: TestAccAzureRMResourceGroup_importBasic (92.84s)
=== RUN   TestAccAzureRMResourceGroup_basic
--- PASS: TestAccAzureRMResourceGroup_basic (91.56s)
=== RUN   TestAccAzureRMResourceGroup_withTags
--- PASS: TestAccAzureRMResourceGroup_withTags (110.42s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
294.832s
```
2016-07-11 12:30:22 +01:00
Tommy Murphy 0c6856f85c digitalocean tag support (#7500)
* vendor: update godo to support tags

* digitalocean: introduce tag resource

* website: update for digitalocean_tag resource
2016-07-11 12:09:06 +01:00
Paul Stack d70b9d334b Revert "Adding disk keep_on_remove support on delete case" (#7572) 2016-07-11 00:50:09 +03:00
dkalleg 95c0a74df7 Adding disk keep_on_remove support on delete case (#7169)
This both fixes the keep_on_remove reference in the disk update case
as well as adds logic to safely eject disks in the destroy case.
2016-07-11 00:36:59 +03:00
stack72 f78f0434cd
provider/azurerm: Support Import for `azurerm_availability_set`
```
% make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMAvailabilitySet_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/azurerm -v
-run=TestAccAzureRMAvailabilitySet_ -timeout 120m
=== RUN   TestAccAzureRMAvailabilitySet_importBasic
--- PASS: TestAccAzureRMAvailabilitySet_importBasic (150.75s)
=== RUN   TestAccAzureRMAvailabilitySet_basic
--- PASS: TestAccAzureRMAvailabilitySet_basic (103.37s)
=== RUN   TestAccAzureRMAvailabilitySet_withTags
--- PASS: TestAccAzureRMAvailabilitySet_withTags (137.65s)
=== RUN   TestAccAzureRMAvailabilitySet_withDomainCounts
--- PASS: TestAccAzureRMAvailabilitySet_withDomainCounts (88.78s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/azurerm
480.564s
```
2016-07-10 22:33:02 +01:00
James Nugent 8beafe25ae provisioner/file: Clean up temporary files 2016-07-08 19:35:00 +01:00
jorge.marey 9b065f32e2 Include content option for file provisioner
- Include new option in file provisioner. Now content or source can be
  provided. Content will create a temp file and copy there the contents.
- Later that file will be used as source.
- Include test to check that changes are working correctly.
2016-07-08 19:34:59 +01:00
Martin Atkins 861ac536dd provider/template: convert resources to data sources
The template resources don't actually need to retain any state, so they
are good candidates to be data sources.

This includes a few tweaks to the acceptance tests -- now configured to
run as unit tests -- since it seems that they have been slightly broken
for a while now. In particular, the "update" cases are no longer tested
because updating is not a meaningful operation for a data source.
2016-07-08 17:11:17 +01:00
James Nugent 46e3cacee3 Merge pull request #7469 from hashicorp/f-tls-data-source
Convert tls_cert_request to be a data source
2016-07-08 17:06:43 +01:00
James Nugent 4c05fddd9b Merge pull request #7530 from hashicorp/aws-codedeployment-manual
provider/aws: Remove `aws_codedeploy_deployment_group` from state on 404
2016-07-08 11:05:06 +01:00
James Nugent 73682c93a7 Merge pull request #7541 from hashicorp/import-aws-redshiftcluster
provider/aws: Support Import of `aws_redshift_cluster`
2016-07-08 11:01:28 +01:00
James Nugent 66a2fe61a4 Merge pull request #7540 from hashicorp/import-aws-receiptfilter
provider/aws: Support Import of `aws_ses_receipt_filter`
2016-07-08 11:00:36 +01:00
James Nugent f5bb652bd6 Merge pull request #7539 from hashicorp/import-aws-receiptruleset
provider/aws: Support Import of `aws_ses_receipt_rule_set`
2016-07-08 11:00:17 +01:00
James Nugent a89fd9d0de Merge pull request #7537 from hashicorp/import-aws-dboption
provider/aws: Support Import of `aws_db_option_group`
2016-07-08 10:59:00 +01:00
James Nugent dfe2ee5a30 Merge pull request #7536 from hashicorp/import-aws-db_instance
provider/aws: Support Import of `aws_db_instance`
2016-07-08 10:58:37 +01:00
David Tolnay db627798e6 provider/aws: Handle spurious failures in resourceAwsSecurityGroupRuleRead (#7377)
Previously, any old HTTP error would be treated as the security_group_rule being
deleted. In reality there are only a few cases where this is the right
assumption.
2016-07-07 16:06:02 -05:00
James Bardin 4c602d1eb9 Merge pull request #7521 from hashicorp/jbardin/GH-7509
Revert #7464 and allow an empty state
2016-07-07 17:00:08 -04:00
David Tolnay a86d766bd2 provider/aws: internetgateway timing tweaks (again) (#7447)
This workaround is originally from 71b30c633f.
According to the commit message from Mitchell Hashimoto:

    So I think the AWS API is just broken here. In the case that the state
    doesn't update, just assume it did after 5 seconds.

Based on my experience, this AWS API is still broken in the same way.

The timeout was later increased from 5 seconds to 10 seconds in
265cc4fffa.

The timeout (but not the timer) was removed inexplicably in GH-1325.

The symptom is this error from `terraform apply`:

    aws_internet_gateway.test: Error waiting for internet gateway (igw-553b4731) to attach: timeout while waiting for state to become '[available]'

followed by all subsequent `terraform apply` commands failing with this error:

    aws_internet_gateway.test: Resource.AlreadyAssociated: resource igw-553b4731 is already attached to network vpc-61bc7606
2016-07-07 15:45:28 -05:00
David Tolnay 2943a1c978 Retry creation of IAM role depending on new IAM user (#7324) 2016-07-07 15:24:17 -05:00
James Bardin 2c27dd41bf Fix panic when there is no remote state
- Check for an empty state. If nothing is referenced from that state in
  the config, there's nothing to do here.
2016-07-07 16:20:35 -04:00
stack72 a746b28fc1
provider/aws: Support Import of `aws_redshift_cluster`
```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSRedshiftCluster_importBasic -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_importBasic
--- PASS: TestAccAWSRedshiftCluster_importBasic (623.52s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    623.546s
```
2016-07-07 18:27:13 +01:00
Clint 17931c7099 Merge pull request #7511 from hashicorp/pr-7319
provider/aws: AWS prefix lists to enable security group egress to a VPC Endpoint (supersedes #7319)
2016-07-07 12:10:10 -05:00