Commit Graph

3283 Commits

Author SHA1 Message Date
Paul Stack 6649b938da provider/aws: Provide the option to skip_destroy on aws_volume_attachment (#9792)
* provider/aws: Provide the option to skip_destroy on
aws_volume_attachment

When you want to attach and detach pre-existing EBS volumes to an
instance, we would do that as follows:

```
resource "aws_instance" "web" {
	ami = "ami-21f78e11"
  availability_zone = "us-west-2a"
	instance_type = "t1.micro"
	tags {
		Name = "HelloWorld"
	}
}

data "aws_ebs_volume" "ebs_volume" {
  filter {
  	name = "size"
  	values = ["${aws_ebs_volume.example.size}"]
  }
  filter {
  	name = "availability-zone"
  	values = ["${aws_ebs_volume.example.availability_zone}"]
  }
  filter {
  	name = "tag:Name"
  	values = ["TestVolume"]
  }
}

resource "aws_volume_attachment" "ebs_att" {
  device_name = "/dev/sdh"
	volume_id = "${data.aws_ebs_volume.ebs_volume.id}"
	instance_id = "${aws_instance.web.id}"
	skip_destroy = true
}
```

The issue here is that when we run a terraform destroy command, the volume tries to get detached from a running instance and goes into a non-responsive state. We would have to force_destroy the volume at that point and risk losing any data on it.

This PR introduces the idea of `skip_destroy` on a volume attachment. tl;dr:

We want the volume to be detached from the instane when the instance itself has been destroyed. This way the normal shut procedures will happen and protect the disk for attachment to another instance

Volume Attachment Tests:

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVolumeAttachment_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/02 00:47:27 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVolumeAttachment_ -timeout 120m
=== RUN   TestAccAWSVolumeAttachment_basic
--- PASS: TestAccAWSVolumeAttachment_basic (133.49s)
=== RUN   TestAccAWSVolumeAttachment_skipDestroy
--- PASS: TestAccAWSVolumeAttachment_skipDestroy (119.64s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	253.158s
```

EBS Volume Tests:

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEBSVolume_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/02 01:00:18 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEBSVolume_ -timeout 120m
=== RUN   TestAccAWSEBSVolume_importBasic
--- PASS: TestAccAWSEBSVolume_importBasic (26.38s)
=== RUN   TestAccAWSEBSVolume_basic
--- PASS: TestAccAWSEBSVolume_basic (26.86s)
=== RUN   TestAccAWSEBSVolume_NoIops
--- PASS: TestAccAWSEBSVolume_NoIops (27.89s)
=== RUN   TestAccAWSEBSVolume_withTags
--- PASS: TestAccAWSEBSVolume_withTags (26.88s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	108.032s
```

* Update volume_attachment.html.markdown
2016-11-02 15:29:37 +00:00
Daisuke Fujita bfeccfe669 Document about ElastiCache Replication Group port (#9800) 2016-11-02 10:09:15 +00:00
Mitchell Hashimoto 13483b574e
website: clarify ".terraform" location for #7301 2016-11-01 23:01:18 -07:00
Christoph Blecker af7cd57a4a Search configured project image families (#9243)
* Search configured project image families

* Clarify documentation around google_compute_instance image families

* Acceptance test for private instance family creation
2016-11-01 21:00:12 +00:00
Andreas Kyrris b8e4b1c4af Update loadbalancer docs with private ip allocation type. (#9780) 2016-11-01 20:12:06 +00:00
stack72 4d033aa189
docs/aws: Fixing the AWS WAF Documentation 2016-11-01 19:42:56 +00:00
clint f61ff7d005
v0.7.8 2016-11-01 18:45:37 +00:00
alexis-turpin f16309630e Update the PowerShell example to set the PATH (#9771)
`set PATH=%PATH%;C:\terraform` is the old fashioned CMD ways to do which doesn't work in a PowerShell command line.
Moreover, the change made in the CMD console would not be permanent.

The solution proposed here uses .NET Framework’s System.Environment class in PowerShell to properly edit the path.
Source : https://technet.microsoft.com/en-us/library/ff730964.aspx
2016-11-01 14:56:18 +00:00
Paul Stack aaece37ec9 provider/aws: Adding a datasource for aws_ebs_volume (#9753)
This will allows us to filter a specific ebs_volume for attachment to an
aws_instance

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEbsVolumeDataSource_'✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/01 12:39:19 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSEbsVolumeDataSource_ -timeout 120m
=== RUN   TestAccAWSEbsVolumeDataSource_basic
--- PASS: TestAccAWSEbsVolumeDataSource_basic (28.74s)
=== RUN   TestAccAWSEbsVolumeDataSource_multipleFilters
--- PASS: TestAccAWSEbsVolumeDataSource_multipleFilters (28.37s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws57.145s
```
2016-11-01 14:15:31 +00:00
Seth Vargo d5af44cfd7 Add security page (#9717) 2016-11-01 13:56:08 +00:00
Christoph Blecker 45f441fdb4 Add support for default-internet-gateway alias for google_compute_route (#9676) 2016-11-01 13:45:36 +00:00
Joe Topjian 266b5ab598 provider/openstack: Openstack Provider Updates (#9725)
* provider/openstack: Adding Identity v3 compatible environment variables

* provider/openstack: Adding missing environment variables

* provider/openstack: line spacing for provider options

* provider/openstack: Making password sensitive

* provider/openstack: Adding descriptions to provider options

* provider/openstack: Clean up provider documentation

* provider/openstack: clean up EndpointType check
2016-11-01 13:16:39 +00:00
Christoph Blecker ca8cd4b1f0 Add support for using source_disk to google_compute_image (#9614) 2016-11-01 10:32:47 +00:00
Joe Topjian b269b417b0 provider/openstack: LoadBalancer v2 VIP Port ID (#9727)
This commit adds vip_port_id as an exported attribute to the
lb_loadbalancer_v2 resource.
2016-11-01 10:25:18 +00:00
Nicholas P. Cole ae65c3acd9 docs: Update DigitalOcean resource pages
Specifically:

- User data is available in all regions, so remove the sentence saying
  to check for supported features in each region.

- Clarify domain vs. DNS record resources.

- Explain which DNS record types the `weight`, `port`, and `priority`
  arguments are applicable for.
2016-11-01 02:14:43 +00:00
Mitchell Hashimoto 278f4eae12
Merge branch 'master' into sethvargo/docker_website 2016-10-31 17:43:19 -07:00
Jason Costello 65fa85bdb8 Merge remote-tracking branch 'origin/website-update' into website-update 2016-10-31 16:16:29 -07:00
Kevin Fishner 52ebbf2d67 final copy edits 2016-10-31 15:52:32 -07:00
Seth Vargo 606e7ca429
Use Docker-based deploys 2016-10-31 18:37:52 -04:00
Jason Costello 64b75faec4 Merge remote-tracking branch 'hashicorp/master' into website-update 2016-10-31 15:26:47 -07:00
Jason Costello c82137c7ea tighten up spacing under CTA 2016-10-31 15:21:39 -07:00
Jason Costello 0e18a8e406 margin tweaks 2016-10-31 15:08:20 -07:00
Jason Costello f289f823fb margins 2016-10-31 15:03:59 -07:00
Jason Costello 42487320fd wide screen for real 2016-10-31 15:02:48 -07:00
Jason Costello e66fad07d1 ensure skews always overlap for larger displays 2016-10-31 14:12:01 -07:00
Jason Costello 43f94873f3 add skewed div below jumbotron
this is a temp fix until the logos are approved and added back in
2016-10-31 13:48:12 -07:00
Arthur Burkart 03a44b5687 Tiny typo (#9755)
Just a teeny tiny typo fix

"delgation" => "delegation"
2016-10-31 20:46:13 +00:00
Jason Costello 8d97491e23 cleanup 2016-10-31 12:37:51 -07:00
Jason Costello 83fb7fa204 make feature cards links 2016-10-31 12:18:45 -07:00
Jason Costello b74f12dd28 fix webkit rendering issue
this once fixed aliasing issues related to the css transform: skew in
webkit browsers. a recent release causes it to render artifacts and bug
out. removing the declaration fixes it.
2016-10-31 11:52:03 -07:00
Jason Costello b8f17b4df4 optimized svg 2016-10-31 11:36:43 -07:00
Mitchell Hashimoto bac66430cb
terraform: consistent variable values for booleans
Fixes #6447

This ensures that all variables of type string are consistently
converted to a string value upon running Terraform.

The place this is done is in the `Variables()` call within the
`terraform` package. This is the function responsible for loading and
merging the variables from the various sources and seems ideal for
proper conversion to consistent values for various types. We actually
already had tests to this effect.

This also adds docs that talk about the fake-ish boolean variables
Terraform currently has and about how in future versions we'll likely
support them properly, which can cause BC issues so beware.
2016-10-31 11:22:26 -07:00
Manoj 2e639cb506 Very minor fix in the docs (#9748) 2016-10-31 18:00:04 +00:00
Anshul Sharma 6432bb546c Added AWS Resource WAF SqlInjectionMatchSet (#9709) 2016-10-31 17:51:47 +00:00
Paul Stack fdabf59380 provider/aws: Expose ARN suffix on ALB Target Group (#9734)
When creating a CloudWatch Metric for an Application Load Balancer Target Group  it is
neccessary to use the suffix of the ARN as the reference to the load
balancer TG . This commit exposes that as an attribute on the `aws_alb_target_group`
resource to prevent the need to use regular expression substitution to
make the reference.
2016-10-31 17:05:06 +00:00
Jason Costello c81121a1bb reduce tagline font-size to fit 2016-10-31 09:53:26 -07:00
Paul Stack ed49da8bb1 provider/aws: Add support for reference_name to aws_route53_health_check (#9737)
Fixes #8679

The CallerReference attribute we passed to AWS in route53_health_checks
was `time.Now().Format(time.RFC3339Nano)`

When creating multiple resources with the Count meta-parameter, this was
causing issues as follows:

```
* aws_route53_health_check.healthstate.0: HealthCheckAlreadyExists: A different health check has already been created with the specified caller reference.
```

We have now exposed a new attribute called `reference_name` that can be set to pass multiple resources to the request

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRoute53HealthCheck_'                              130 ↵ ✹
==> Cecking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/31 10:41:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRoute53HealthCheck_ -timeout 120m
=== RUN   TestAccAWSRoute53HealthCheck_importBasic
--- PASS: TestAccAWSRoute53HealthCheck_importBasic (17.08s)
=== RUN   TestAccAWSRoute53HealthCheck_basic
--- PASS: TestAccAWSRoute53HealthCheck_basic (28.17s)
=== RUN   TestAccAWSRoute53HealthCheck_withSearchString
--- PASS: TestAccAWSRoute53HealthCheck_withSearchString (28.07s)
=== RUN   TestAccAWSRoute53HealthCheck_withChildHealthChecks
--- PASS: TestAccAWSRoute53HealthCheck_withChildHealthChecks (20.71s)
=== RUN   TestAccAWSRoute53HealthCheck_IpConfig
--- PASS: TestAccAWSRoute53HealthCheck_IpConfig (16.09s)
=== RUN   TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck
--- PASS: TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck (22.42s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	132.568s
```
2016-10-31 16:00:40 +00:00
James Turnbull 41b91f365d website: Quick pass over some docs pages (#9705)
* Pass over the Fastly docs

* Pass over the file provisioner docs
2016-10-31 08:52:27 +00:00
Anshul Sharma 625e747359 Added AWS Resource WAF XssMatchSet (#9710) 2016-10-31 08:51:08 +00:00
Masayuki Morita eb1a58d966 Update doc: aws_iam_user with force_destroy deletes IAM User Login Profile (#9716)
refs: https://github.com/hashicorp/terraform/pull/9583
2016-10-29 16:20:18 +01:00
James Turnbull 0dfc7a19c7 Cleanup and expansion of the S3 remote state documentation (#9708) 2016-10-29 12:11:43 +01:00
Raphael Randschau 98d84680b7 provider/scaleway server volume property (#9695)
* provider/scaleway: extract volume validation helpers

* provider/scaleway: add server volume property

fixes #9499

* provider/scaleway: update `scaleway_server` docu

* provider/scaleway: fix volume handling

this actually broken when merging the latest SDK update :(

* provider/scaleway: fix volume attachment

* provider/scaleway: fix volume expectation
2016-10-29 12:07:35 +01:00
James Turnbull 18b3736ba4 Pass over the Interpolation page (#9703)
* Pass over the Interpolation page

Fixes some grammar, typos and structure. Updated some headings and fixed
a couple of spelling mistakes.

* Added proper note syntax

* Turned some notes into actual notes

* Couple of minor typos just noticed
2016-10-29 01:13:09 +01:00
Mitchell Hashimoto 0d921cf8e7 Merge pull request #9692 from jszwedko/add-basic-math-interpolation
Add some basic math interpolation functions
2016-10-28 19:30:59 -04:00
Anshul Sharma cc8f11138f Added AWS Resource WAF SizeConstraintSet (#9689) 2016-10-29 00:58:37 +02:00
Jesse Szwedko 0fbd72a355 Add some basic math interpolation functions
Support the following math functions for interpolation:

* ceil
* floor
* max
* min

Fixes #7409
2016-10-28 17:49:31 +00:00
Dan Wendorf 781725348e provider/google Support MySQL 5.7 instances (#9673)
* provider/google Document MySQL versions for second generation instances

Google Cloud SQL has first-gen and second-gen instances with different
supported versions of MySQL.

* provider/google Increase SQL Admin operation timeout to 10 minutes

Creating SQL instances for MySQL 5.7 can take over 7 minutes,
so the timeout needs to be increased to allow the
google_sql_database_instance resource to successfully create.
2016-10-28 14:41:03 +02:00
Andras Ferencz-Szabo 46cb7b4710 Allow underscores in IAM user and group names (#9684)
* Allow underscores in IAM user and group names

* Add notes to iam_user and iam_group docs that names are not distinguished by case
2016-10-28 14:40:04 +02:00
Anshul Sharma afc603c0f8 Added AWS Resource WAF ByteMatchSet (#9681) 2016-10-28 14:36:16 +02:00
Liam Bennett 8fee7642a9 New AWS resource `ssm_activation` (#9111)
Adding a new resource to support activation of managed instances for
on-premise virtual-machines.
2016-10-28 11:59:12 +02:00