Merge pull request #13701 from kavu/kavu-docs_hcl_addition

Massively add HCL source tag in docs Markdown files
This commit is contained in:
Jake Champlin 2017-04-17 09:48:25 -04:00 committed by GitHub
commit ebc89e9426
555 changed files with 679 additions and 699 deletions

View File

@ -19,7 +19,7 @@ most likely expect.
To view a list of the available commands at any time, just run terraform with no arguments: To view a list of the available commands at any time, just run terraform with no arguments:
``` ```text
$ terraform $ terraform
Usage: terraform [--version] [--help] <command> [args] Usage: terraform [--version] [--help] <command> [args]
@ -58,7 +58,7 @@ All other commands:
To get help for any specific command, pass the -h flag to the relevant subcommand. For example, To get help for any specific command, pass the -h flag to the relevant subcommand. For example,
to see help about the graph subcommand: to see help about the graph subcommand:
``` ```text
$ terraform graph -h $ terraform graph -h
Usage: terraform graph [options] PATH Usage: terraform graph [options] PATH

View File

@ -48,7 +48,7 @@ resource_type.resource_name[N]
Given a Terraform config that includes: Given a Terraform config that includes:
``` ```hcl
resource "aws_instance" "web" { resource "aws_instance" "web" {
# ... # ...
count = 4 count = 4
@ -57,7 +57,6 @@ resource "aws_instance" "web" {
An address like this: An address like this:
``` ```
aws_instance.web[3] aws_instance.web[3]
``` ```
@ -68,5 +67,4 @@ Refers to only the last instance in the config, and an address like this:
aws_instance.web aws_instance.web
``` ```
Refers to all four "web" instances. Refers to all four "web" instances.

View File

@ -12,7 +12,7 @@ Use this data source to get the Account ID of the [AWS Billing and Cost Manageme
## Example Usage ## Example Usage
``` ```hcl
data "aws_billing_service_account" "main" {} data "aws_billing_service_account" "main" {}
resource "aws_s3_bucket" "billing_logs" { resource "aws_s3_bucket" "billing_logs" {

View File

@ -18,7 +18,7 @@ public IP as an input variable and needs to determine the other.
The following example shows how one might accept a public IP as a variable The following example shows how one might accept a public IP as a variable
and use this data source to obtain the allocation ID. and use this data source to obtain the allocation ID.
``` ```hcl
variable "instance_id" {} variable "instance_id" {}
variable "public_ip" {} variable "public_ip" {}

View File

@ -48,7 +48,7 @@ AWS provider block:
Usage: Usage:
``` ```hcl
provider "aws" { provider "aws" {
region = "us-west-2" region = "us-west-2"
access_key = "anaccesskey" access_key = "anaccesskey"

View File

@ -16,7 +16,7 @@ thing.
## Example Usage ## Example Usage
``` ```hcl
# Create a new load balancer # Create a new load balancer
resource "aws_alb" "test" { resource "aws_alb" "test" {
name = "test-alb-tf" name = "test-alb-tf"

View File

@ -12,7 +12,7 @@ Provides an Application Load Balancer Listener resource.
## Example Usage ## Example Usage
``` ```hcl
# Create a new load balancer # Create a new load balancer
resource "aws_alb" "front_end" { resource "aws_alb" "front_end" {
# ... # ...

View File

@ -12,7 +12,7 @@ Provides an Application Load Balancer Listener Rule resource.
## Example Usage ## Example Usage
``` ```hcl
# Create a new load balancer # Create a new load balancer
resource "aws_alb" "front_end" { resource "aws_alb" "front_end" {
# ... # ...

View File

@ -14,7 +14,7 @@ resources.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_alb_target_group" "test" { resource "aws_alb_target_group" "test" {
name = "tf-example-alb-tg" name = "tf-example-alb-tg"
port = 80 port = 80

View File

@ -14,7 +14,7 @@ target group
## Example Usage ## Example Usage
``` ```hcl
resource "aws_alb_target_group_attachment" "test" { resource "aws_alb_target_group_attachment" "test" {
target_group_arn = "${aws_alb_target_group.test.arn}" target_group_arn = "${aws_alb_target_group.test.arn}"
target_id = "${aws_instance.test.id}" target_id = "${aws_instance.test.id}"

View File

@ -19,7 +19,7 @@ it's better to use `aws_ami_launch_permission` instead.
## Example Usage ## Example Usage
``` ```hcl
# Create an AMI that will start a machine whose root device is backed by # Create an AMI that will start a machine whose root device is backed by
# an EBS volume populated from a snapshot. It is assumed that such a snapshot # an EBS volume populated from a snapshot. It is assumed that such a snapshot
# already exists with the id "snap-xxxxxxxx". # already exists with the id "snap-xxxxxxxx".

View File

@ -22,7 +22,7 @@ block until the new AMI is available for use on new instances.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ami_copy" "example" { resource "aws_ami_copy" "example" {
name = "terraform-example" name = "terraform-example"
description = "A copy of ami-xxxxxxxx" description = "A copy of ami-xxxxxxxx"

View File

@ -28,7 +28,7 @@ to produce a fresh snapshot.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ami_from_instance" "example" { resource "aws_ami_from_instance" "example" {
name = "terraform-example" name = "terraform-example"
source_instance_id = "i-xxxxxxxx" source_instance_id = "i-xxxxxxxx"

View File

@ -12,7 +12,7 @@ Adds launch permission to Amazon Machine Image (AMI) from another AWS account.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ami_launch_permission" "example" { resource "aws_ami_launch_permission" "example" {
image_id = "ami-12345678" image_id = "ami-12345678"
account_id = "123456789012" account_id = "123456789012"

View File

@ -14,7 +14,7 @@ Provides a settings of an API Gateway Account. Settings is applied region-wide p
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_account" "demo" { resource "aws_api_gateway_account" "demo" {
cloudwatch_role_arn = "${aws_iam_role.cloudwatch.arn}" cloudwatch_role_arn = "${aws_iam_role.cloudwatch.arn}"
} }

View File

@ -14,7 +14,7 @@ Provides an API Gateway API Key.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
} }

View File

@ -12,7 +12,7 @@ Provides an API Gateway Authorizer.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_authorizer" "demo" { resource "aws_api_gateway_authorizer" "demo" {
name = "demo" name = "demo"
rest_api_id = "${aws_api_gateway_rest_api.demo.id}" rest_api_id = "${aws_api_gateway_rest_api.demo.id}"

View File

@ -14,7 +14,7 @@ custom domain name.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_deployment" "example" { resource "aws_api_gateway_deployment" "example" {
# See aws_api_gateway_rest_api_docs for how to create this # See aws_api_gateway_rest_api_docs for how to create this
rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}" rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}"

View File

@ -12,7 +12,7 @@ Provides an API Gateway Client Certificate.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_client_certificate" "demo" { resource "aws_api_gateway_client_certificate" "demo" {
description = "My client certificate" description = "My client certificate"
} }

View File

@ -15,7 +15,7 @@ you might need to add an explicit `depends_on = ["aws_api_gateway_integration.na
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"

View File

@ -27,7 +27,7 @@ traditional CNAME) to the Cloudfront domain name exported in the
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_domain_name" "example" { resource "aws_api_gateway_domain_name" "example" {
domain_name = "api.example.com" domain_name = "api.example.com"

View File

@ -12,7 +12,7 @@ Provides an HTTP Method Integration for an API Gateway Integration.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"
@ -54,7 +54,7 @@ EOF
## Lambda integration ## Lambda integration
``` ```hcl
# Variables # Variables
variable "myregion" {} variable "myregion" {}
variable "accountId" {} variable "accountId" {}

View File

@ -15,7 +15,7 @@ you might need to add an explicit `depends_on` for clean runs.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"

View File

@ -12,7 +12,7 @@ Provides a HTTP Method for an API Gateway Resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"

View File

@ -12,7 +12,7 @@ Provides an HTTP Method Response for an API Gateway Resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"

View File

@ -12,7 +12,7 @@ Provides a Model for a API Gateway.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"

View File

@ -12,7 +12,7 @@ Provides an API Gateway Resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"

View File

@ -12,7 +12,7 @@ Provides an API Gateway REST API.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "MyDemoAPI" { resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI" name = "MyDemoAPI"
description = "This is my API for demonstration purposes" description = "This is my API for demonstration purposes"

View File

@ -12,7 +12,7 @@ Provides an API Gateway Usage Plan.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "myapi" { resource "aws_api_gateway_rest_api" "myapi" {
name = "MyDemoAPI" name = "MyDemoAPI"
} }

View File

@ -12,7 +12,7 @@ Provides an API Gateway Usage Plan Key.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_api_gateway_rest_api" "test" { resource "aws_api_gateway_rest_api" "test" {
name = "MyDemoAPI" name = "MyDemoAPI"
} }

View File

@ -12,7 +12,7 @@ Provides an application cookie stickiness policy, which allows an ELB to wed its
## Example Usage ## Example Usage
``` ```hcl
resource "aws_elb" "lb" { resource "aws_elb" "lb" {
name = "test-lb" name = "test-lb"
availability_zones = ["us-east-1a"] availability_zones = ["us-east-1a"]

View File

@ -11,7 +11,8 @@ description: |-
Provides an Application AutoScaling Policy resource. Provides an Application AutoScaling Policy resource.
## Example Usage ## Example Usage
```
```hcl
resource "aws_appautoscaling_target" "ecs_target" { resource "aws_appautoscaling_target" "ecs_target" {
max_capacity = 4 max_capacity = 4
min_capacity = 1 min_capacity = 1
@ -53,7 +54,7 @@ The following arguments are supported:
* `service_namespace` - (Required) The AWS service namespace of the scalable target. Valid values are `ecs` for Amazon ECS services and `ec2` Amazon EC2 Spot fleet requests. * `service_namespace` - (Required) The AWS service namespace of the scalable target. Valid values are `ecs` for Amazon ECS services and `ec2` Amazon EC2 Spot fleet requests.
* `step_adjustment` - (Optional) A set of adjustments that manage scaling. These have the following structure: * `step_adjustment` - (Optional) A set of adjustments that manage scaling. These have the following structure:
``` ```hcl
step_adjustment { step_adjustment {
metric_interval_lower_bound = 1.0 metric_interval_lower_bound = 1.0
metric_interval_upper_bound = 2.0 metric_interval_upper_bound = 2.0

View File

@ -11,7 +11,8 @@ description: |-
Provides an Application AutoScaling ScalableTarget resource. Provides an Application AutoScaling ScalableTarget resource.
## Example Usage ## Example Usage
```
```hcl
resource "aws_appautoscaling_target" "ecs_target" { resource "aws_appautoscaling_target" "ecs_target" {
max_capacity = 4 max_capacity = 4
min_capacity = 1 min_capacity = 1

View File

@ -19,7 +19,7 @@ conflict and will overwrite attachments.
## Example Usage ## Example Usage
``` ```hcl
# Create a new load balancer attachment # Create a new load balancer attachment
resource "aws_autoscaling_attachment" "asg_attachment_bar" { resource "aws_autoscaling_attachment" "asg_attachment_bar" {
autoscaling_group_name = "${aws_autoscaling_group.asg.id}" autoscaling_group_name = "${aws_autoscaling_group.asg.id}"
@ -27,7 +27,7 @@ resource "aws_autoscaling_attachment" "asg_attachment_bar" {
} }
``` ```
``` ```hcl
# Create a new ALB Target Group attachment # Create a new ALB Target Group attachment
resource "aws_autoscaling_attachment" "asg_attachment_bar" { resource "aws_autoscaling_attachment" "asg_attachment_bar" {
autoscaling_group_name = "${aws_autoscaling_group.asg.id}" autoscaling_group_name = "${aws_autoscaling_group.asg.id}"

View File

@ -12,7 +12,7 @@ Provides an AutoScaling Group resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_placement_group" "test" { resource "aws_placement_group" "test" {
name = "test" name = "test"
strategy = "cluster" strategy = "cluster"

View File

@ -24,7 +24,7 @@ but take care to not duplicate those hooks with this resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_autoscaling_group" "foobar" { resource "aws_autoscaling_group" "foobar" {
availability_zones = ["us-west-2a"] availability_zones = ["us-west-2a"]
name = "terraform-test-foobar5" name = "terraform-test-foobar5"

View File

@ -16,7 +16,7 @@ Services, and are applied to each AutoScaling Group you supply.
Basic usage: Basic usage:
``` ```hcl
resource "aws_autoscaling_notification" "example_notifications" { resource "aws_autoscaling_notification" "example_notifications" {
group_names = [ group_names = [
"${aws_autoscaling_group.bar.name}", "${aws_autoscaling_group.bar.name}",

View File

@ -17,7 +17,8 @@ or [dynamic](https://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-sc
(policy-based) scaling. (policy-based) scaling.
## Example Usage ## Example Usage
```
```hcl
resource "aws_autoscaling_policy" "bat" { resource "aws_autoscaling_policy" "bat" {
name = "foobar3-terraform-test" name = "foobar3-terraform-test"
scaling_adjustment = 4 scaling_adjustment = 4
@ -59,7 +60,7 @@ The following arguments are only available to "StepScaling" type policies:
* `step_adjustments` - (Optional) A set of adjustments that manage * `step_adjustments` - (Optional) A set of adjustments that manage
group scaling. These have the following structure: group scaling. These have the following structure:
``` ```hcl
step_adjustment { step_adjustment {
scaling_adjustment = -1 scaling_adjustment = -1
metric_interval_lower_bound = 1.0 metric_interval_lower_bound = 1.0

View File

@ -11,7 +11,8 @@ description: |-
Provides an AutoScaling Schedule resource. Provides an AutoScaling Schedule resource.
## Example Usage ## Example Usage
```
```hcl
resource "aws_autoscaling_group" "foobar" { resource "aws_autoscaling_group" "foobar" {
availability_zones = ["us-west-2a"] availability_zones = ["us-west-2a"]
name = "terraform-test-foobar5" name = "terraform-test-foobar5"

View File

@ -12,7 +12,7 @@ Provides a CloudFormation Stack resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudformation_stack" "network" { resource "aws_cloudformation_stack" "network" {
name = "networking-stack" name = "networking-stack"

View File

@ -24,7 +24,7 @@ want to wait, you need to use the `retain_on_delete` flag.
The following example below creates a CloudFront distribution with an S3 origin. The following example below creates a CloudFront distribution with an S3 origin.
``` ```hcl
resource "aws_s3_bucket" "b" { resource "aws_s3_bucket" "b" {
bucket = "mybucket" bucket = "mybucket"
acl = "private" acl = "private"

View File

@ -19,7 +19,7 @@ origin access identities, see
The following example below creates a CloudFront origin access identity. The following example below creates a CloudFront origin access identity.
``` ```hcl
resource "aws_cloudfront_origin_access_identity" "origin_access_identity" { resource "aws_cloudfront_origin_access_identity" "origin_access_identity" {
comment = "Some comment" comment = "Some comment"
} }
@ -55,7 +55,7 @@ The `cloudfront_access_identity_path` allows this to be circumvented.
The below snippet demonstrates use with the `s3_origin_config` structure for the The below snippet demonstrates use with the `s3_origin_config` structure for the
[`aws_cloudfront_web_distribution`][3] resource: [`aws_cloudfront_web_distribution`][3] resource:
``` ```hcl
s3_origin_config { s3_origin_config {
origin_access_identity = "${aws_cloudfront_origin_access_identity.origin_access_identity.cloudfront_access_identity_path}" origin_access_identity = "${aws_cloudfront_origin_access_identity.origin_access_identity.cloudfront_access_identity_path}"
} }
@ -68,7 +68,7 @@ principal into an `AWS` IAM ARN principal when supplied in an
[`aws_s3_bucket`][4] bucket policy, causing spurious diffs in Terraform. If [`aws_s3_bucket`][4] bucket policy, causing spurious diffs in Terraform. If
you see this behaviour, use the `iam_arn` instead: you see this behaviour, use the `iam_arn` instead:
``` ```hcl
data "aws_iam_policy_document" "s3_policy" { data "aws_iam_policy_document" "s3_policy" {
statement { statement {
actions = ["s3:GetObject"] actions = ["s3:GetObject"]

View File

@ -11,7 +11,8 @@ description: |-
Provides a CloudTrail resource. Provides a CloudTrail resource.
## Example Usage ## Example Usage
```
```hcl
resource "aws_cloudtrail" "foobar" { resource "aws_cloudtrail" "foobar" {
name = "tf-trail-foobar" name = "tf-trail-foobar"
s3_bucket_name = "${aws_s3_bucket.foo.id}" s3_bucket_name = "${aws_s3_bucket.foo.id}"

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Event Rule resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_event_rule" "console" { resource "aws_cloudwatch_event_rule" "console" {
name = "capture-aws-sign-in" name = "capture-aws-sign-in"
description = "Capture each AWS Console Sign In" description = "Capture each AWS Console Sign In"

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Event Target resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_event_target" "yada" { resource "aws_cloudwatch_event_target" "yada" {
target_id = "Yada" target_id = "Yada"
rule = "${aws_cloudwatch_event_rule.console.name}" rule = "${aws_cloudwatch_event_rule.console.name}"

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Logs destination resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_log_destination" "test_destination" { resource "aws_cloudwatch_log_destination" "test_destination" {
name = "test_destination" name = "test_destination"
role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}" role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}"

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Logs destination policy resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_log_destination" "test_destination" { resource "aws_cloudwatch_log_destination" "test_destination" {
name = "test_destination" name = "test_destination"
role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}" role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}"

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Log Group resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_log_group" "yada" { resource "aws_cloudwatch_log_group" "yada" {
name = "Yada" name = "Yada"

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Log Metric Filter resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_log_metric_filter" "yada" { resource "aws_cloudwatch_log_metric_filter" "yada" {
name = "MyAppAccessCount" name = "MyAppAccessCount"
pattern = "" pattern = ""

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Log Stream resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_log_group" "yada" { resource "aws_cloudwatch_log_group" "yada" {
name = "Yada" name = "Yada"
} }

View File

@ -12,7 +12,7 @@ Provides a CloudWatch Logs subscription filter resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_cloudwatch_log_subscription_filter" "test_lambdafunction_logfilter" { resource "aws_cloudwatch_log_subscription_filter" "test_lambdafunction_logfilter" {
name = "test_lambdafunction_logfilter" name = "test_lambdafunction_logfilter"
role_arn = "${aws_iam_role.iam_for_lambda.arn}" role_arn = "${aws_iam_role.iam_for_lambda.arn}"

View File

@ -11,7 +11,8 @@ description: |-
Provides a CloudWatch Metric Alarm resource. Provides a CloudWatch Metric Alarm resource.
## Example Usage ## Example Usage
```
```hcl
resource "aws_cloudwatch_metric_alarm" "foobar" { resource "aws_cloudwatch_metric_alarm" "foobar" {
alarm_name = "terraform-test-foobar5" alarm_name = "terraform-test-foobar5"
comparison_operator = "GreaterThanOrEqualToThreshold" comparison_operator = "GreaterThanOrEqualToThreshold"
@ -27,7 +28,8 @@ resource "aws_cloudwatch_metric_alarm" "foobar" {
``` ```
## Example in Conjunction with Scaling Policies ## Example in Conjunction with Scaling Policies
```
```hcl
resource "aws_autoscaling_policy" "bat" { resource "aws_autoscaling_policy" "bat" {
name = "foobar3-terraform-test" name = "foobar3-terraform-test"
scaling_adjustment = 4 scaling_adjustment = 4
@ -98,7 +100,6 @@ The following attributes are exported:
* `id` - The ID of the health check * `id` - The ID of the health check
## Import ## Import
Cloud Metric Alarms can be imported using the `alarm_name`, e.g. Cloud Metric Alarms can be imported using the `alarm_name`, e.g.

View File

@ -16,7 +16,7 @@ in all regions - available regions are listed
## Example Usage ## Example Usage
``` ```hcl
resource "aws_codecommit_repository" "test" { resource "aws_codecommit_repository" "test" {
repository_name = "MyTestRepository" repository_name = "MyTestRepository"
description = "This is the Sample App Repository" description = "This is the Sample App Repository"

View File

@ -16,7 +16,7 @@ in all regions - available regions are listed
## Example Usage ## Example Usage
``` ```hcl
resource "aws_codecommit_trigger" "test" { resource "aws_codecommit_trigger" "test" {
depends_on = ["aws_codecommit_repository.test"] depends_on = ["aws_codecommit_repository.test"]
repository_name = "my_test_repository" repository_name = "my_test_repository"

View File

@ -12,7 +12,7 @@ Provides a CodeBuild Project resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_iam_role" "codebuild_role" { resource "aws_iam_role" "codebuild_role" {
name = "codebuild-role-" name = "codebuild-role-"

View File

@ -12,7 +12,7 @@ Provides a CodeDeploy application to be used as a basis for deployments
## Example Usage ## Example Usage
``` ```hcl
resource "aws_codedeploy_app" "foo" { resource "aws_codedeploy_app" "foo" {
name = "foo" name = "foo"
} }

View File

@ -12,7 +12,7 @@ Provides a CodeDeploy deployment config for an application
## Example Usage ## Example Usage
``` ```hcl
resource "aws_codedeploy_deployment_config" "foo" { resource "aws_codedeploy_deployment_config" "foo" {
deployment_config_name = "test-deployment-config" deployment_config_name = "test-deployment-config"

View File

@ -12,7 +12,7 @@ Provides a CodeDeploy deployment group for an application
## Example Usage ## Example Usage
``` ```hcl
resource "aws_codedeploy_app" "foo_app" { resource "aws_codedeploy_app" "foo_app" {
name = "foo_app" name = "foo_app"
} }

View File

@ -14,7 +14,7 @@ Provides a CodePipeline.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_s3_bucket" "foo" { resource "aws_s3_bucket" "foo" {
bucket = "test-bucket" bucket = "test-bucket"
acl = "private" acl = "private"

View File

@ -14,7 +14,7 @@ Provides an AWS Config Rule.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_config_config_rule" "r" { resource "aws_config_config_rule" "r" {
name = "example" name = "example"

View File

@ -14,7 +14,7 @@ Provides an AWS Config Configuration Recorder. Please note that this resource **
## Example Usage ## Example Usage
``` ```hcl
resource "aws_config_configuration_recorder" "foo" { resource "aws_config_configuration_recorder" "foo" {
name = "example" name = "example"
role_arn = "${aws_iam_role.r.arn}" role_arn = "${aws_iam_role.r.arn}"

View File

@ -14,7 +14,7 @@ Manages status (recording / stopped) of an AWS Config Configuration Recorder.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_config_configuration_recorder_status" "foo" { resource "aws_config_configuration_recorder_status" "foo" {
name = "${aws_config_configuration_recorder.foo.name}" name = "${aws_config_configuration_recorder.foo.name}"
is_enabled = true is_enabled = true

View File

@ -14,7 +14,7 @@ Provides an AWS Config Delivery Channel.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_config_delivery_channel" "foo" { resource "aws_config_delivery_channel" "foo" {
name = "example" name = "example"
s3_bucket_name = "${aws_s3_bucket.b.bucket}" s3_bucket_name = "${aws_s3_bucket.b.bucket}"

View File

@ -14,7 +14,7 @@ Provides a customer gateway inside a VPC. These objects can be connected to VPN
## Example Usage ## Example Usage
``` ```hcl
resource "aws_customer_gateway" "main" { resource "aws_customer_gateway" "main" {
bgp_asn = 65000 bgp_asn = 65000
ip_address = "172.83.124.10" ip_address = "172.83.124.10"

View File

@ -10,7 +10,7 @@ Provides a DB event subscription resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_db_instance" "default" { resource "aws_db_instance" "default" {
allocated_storage = 10 allocated_storage = 10
engine = "mysql" engine = "mysql"

View File

@ -30,7 +30,7 @@ for more information.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_db_instance" "default" { resource "aws_db_instance" "default" {
allocated_storage = 10 allocated_storage = 10
storage_type = "gp2" storage_type = "gp2"

View File

@ -10,7 +10,7 @@ Provides an RDS DB option group resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_db_option_group" "bar" { resource "aws_db_option_group" "bar" {
name = "option-group-test-terraform" name = "option-group-test-terraform"
option_group_description = "Terraform Option Group" option_group_description = "Terraform Option Group"

View File

@ -10,7 +10,7 @@ Provides an RDS DB parameter group resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_db_parameter_group" "default" { resource "aws_db_parameter_group" "default" {
name = "rds-pg" name = "rds-pg"
family = "mysql5.6" family = "mysql5.6"

View File

@ -15,7 +15,7 @@ attribute instead.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_db_security_group" "default" { resource "aws_db_security_group" "default" {
name = "rds_sg" name = "rds_sg"

View File

@ -12,7 +12,7 @@ Provides an RDS DB subnet group resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_db_subnet_group" "default" { resource "aws_db_subnet_group" "default" {
name = "main" name = "main"
subnet_ids = ["${aws_subnet.frontend.id}", "${aws_subnet.backend.id}"] subnet_ids = ["${aws_subnet.frontend.id}", "${aws_subnet.backend.id}"]

View File

@ -39,7 +39,7 @@ The following config gives the Default Network ACL the same rules that AWS
includes, but pulls the resource under management by Terraform. This means that includes, but pulls the resource under management by Terraform. This means that
any ACL rules added or changed will be detected as drift. any ACL rules added or changed will be detected as drift.
``` ```hcl
resource "aws_vpc" "mainvpc" { resource "aws_vpc" "mainvpc" {
cidr_block = "10.1.0.0/16" cidr_block = "10.1.0.0/16"
} }
@ -72,7 +72,7 @@ resource "aws_default_network_acl" "default" {
The following denies all Egress traffic by omitting any `egress` rules, while The following denies all Egress traffic by omitting any `egress` rules, while
including the default `ingress` rule to allow all traffic. including the default `ingress` rule to allow all traffic.
``` ```hcl
resource "aws_vpc" "mainvpc" { resource "aws_vpc" "mainvpc" {
cidr_block = "10.1.0.0/16" cidr_block = "10.1.0.0/16"
} }
@ -97,7 +97,7 @@ This config denies all traffic in the Default ACL. This can be useful if you
want a locked down default to force all resources in the VPC to assign a want a locked down default to force all resources in the VPC to assign a
non-default ACL. non-default ACL.
``` ```hcl
resource "aws_vpc" "mainvpc" { resource "aws_vpc" "mainvpc" {
cidr_block = "10.1.0.0/16" cidr_block = "10.1.0.0/16"
} }

View File

@ -42,7 +42,7 @@ a conflict of rule settings and will overwrite routes.
## Example usage with tags: ## Example usage with tags:
``` ```hcl
resource "aws_default_route_table" "r" { resource "aws_default_route_table" "r" {
default_route_table_id = "${aws_vpc.foo.default_route_table_id}" default_route_table_id = "${aws_vpc.foo.default_route_table_id}"

View File

@ -40,7 +40,7 @@ The following config gives the Default Security Group the same rules that AWS
provides by default, but pulls the resource under management by Terraform. This means that provides by default, but pulls the resource under management by Terraform. This means that
any ingress or egress rules added or changed will be detected as drift. any ingress or egress rules added or changed will be detected as drift.
``` ```hcl
resource "aws_vpc" "mainvpc" { resource "aws_vpc" "mainvpc" {
cidr_block = "10.1.0.0/16" cidr_block = "10.1.0.0/16"
} }
@ -69,7 +69,7 @@ resource "aws_default_security_group" "default" {
The following denies all Egress traffic by omitting any `egress` rules, while The following denies all Egress traffic by omitting any `egress` rules, while
including the default `ingress` rule to allow all traffic. including the default `ingress` rule to allow all traffic.
``` ```hcl
resource "aws_vpc" "mainvpc" { resource "aws_vpc" "mainvpc" {
cidr_block = "10.1.0.0/16" cidr_block = "10.1.0.0/16"
} }

View File

@ -15,7 +15,7 @@ Provides a Simple or Managed Microsoft directory in AWS Directory Service.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_directory_service_directory" "bar" { resource "aws_directory_service_directory" "bar" {
name = "corp.notexample.com" name = "corp.notexample.com"
password = "SuperSecretPassw0rd" password = "SuperSecretPassw0rd"

View File

@ -15,7 +15,7 @@ Provides a DMS (Data Migration Service) certificate resource. DMS certificates c
## Example Usage ## Example Usage
``` ```hcl
# Create a new certificate # Create a new certificate
resource "aws_dms_certificate" "test" { resource "aws_dms_certificate" "test" {
certificate_id = "test-dms-certificate-tf" certificate_id = "test-dms-certificate-tf"

View File

@ -15,7 +15,7 @@ Provides a DMS (Data Migration Service) endpoint resource. DMS endpoints can be
## Example Usage ## Example Usage
``` ```hcl
# Create a new endpoint # Create a new endpoint
resource "aws_dms_endpoint" "test" { resource "aws_dms_endpoint" "test" {
certificate_arn = "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012" certificate_arn = "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012"

View File

@ -12,7 +12,7 @@ Provides a DMS (Data Migration Service) replication instance resource. DMS repli
## Example Usage ## Example Usage
``` ```hcl
# Create a new replication instance # Create a new replication instance
resource "aws_dms_replication_instance" "test" { resource "aws_dms_replication_instance" "test" {
allocated_storage = 20 allocated_storage = 20

View File

@ -12,7 +12,7 @@ Provides a DMS (Data Migration Service) replication subnet group resource. DMS r
## Example Usage ## Example Usage
``` ```hcl
# Create a new replication subnet group # Create a new replication subnet group
resource "aws_dms_replication_subnet_group" "test" { resource "aws_dms_replication_subnet_group" "test" {
replication_subnet_group_description = "Test replication subnet group" replication_subnet_group_description = "Test replication subnet group"

View File

@ -12,7 +12,7 @@ Provides a DMS (Data Migration Service) replication task resource. DMS replicati
## Example Usage ## Example Usage
``` ```hcl
# Create a new replication task # Create a new replication task
resource "aws_dms_replication_task" "test" { resource "aws_dms_replication_task" "test" {
cdc_start_time = 1484346880 cdc_start_time = 1484346880

View File

@ -15,7 +15,7 @@ Provides a DynamoDB table resource
The following dynamodb table description models the table and GSI shown The following dynamodb table description models the table and GSI shown
in the [AWS SDK example documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html) in the [AWS SDK example documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html)
``` ```hcl
resource "aws_dynamodb_table" "basic-dynamodb-table" { resource "aws_dynamodb_table" "basic-dynamodb-table" {
name = "GameScores" name = "GameScores"
read_capacity = 20 read_capacity = 20

View File

@ -12,7 +12,7 @@ Creates a Snapshot of an EBS Volume.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ebs_volume" "example" { resource "aws_ebs_volume" "example" {
availability_zone = "us-west-2a" availability_zone = "us-west-2a"
size = 40 size = 40

View File

@ -12,7 +12,7 @@ Manages a single EBS volume.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ebs_volume" "example" { resource "aws_ebs_volume" "example" {
availability_zone = "us-west-2a" availability_zone = "us-west-2a"
size = 40 size = 40

View File

@ -16,7 +16,7 @@ in all regions - available regions are listed
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ecr_repository" "foo" { resource "aws_ecr_repository" "foo" {
name = "bar" name = "bar"
} }

View File

@ -18,7 +18,7 @@ in all regions - available regions are listed
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ecr_repository" "foo" { resource "aws_ecr_repository" "foo" {
name = "bar" name = "bar"
} }

View File

@ -12,7 +12,7 @@ Provides an ECS cluster.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ecs_cluster" "foo" { resource "aws_ecs_cluster" "foo" {
name = "white-hart" name = "white-hart"
} }

View File

@ -16,7 +16,7 @@ See [ECS Services section in AWS developer guide](https://docs.aws.amazon.com/Am
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ecs_service" "mongo" { resource "aws_ecs_service" "mongo" {
name = "mongodb" name = "mongodb"
cluster = "${aws_ecs_cluster.foo.id}" cluster = "${aws_ecs_cluster.foo.id}"

View File

@ -12,7 +12,7 @@ Provides an ECS task definition to be used in `aws_ecs_service`.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_ecs_task_definition" "service" { resource "aws_ecs_task_definition" "service" {
family = "service" family = "service"
container_definitions = "${file("task-definitions/service.json")}" container_definitions = "${file("task-definitions/service.json")}"

View File

@ -12,7 +12,7 @@ Provides an Elastic File System (EFS) resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_efs_file_system" "foo" { resource "aws_efs_file_system" "foo" {
creation_token = "my-product" creation_token = "my-product"

View File

@ -12,7 +12,7 @@ Provides an Elastic File System (EFS) mount target.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_efs_mount_target" "alpha" { resource "aws_efs_mount_target" "alpha" {
file_system_id = "${aws_efs_file_system.foo.id}" file_system_id = "${aws_efs_file_system.foo.id}"
subnet_id = "${aws_subnet.alpha.id}" subnet_id = "${aws_subnet.alpha.id}"

View File

@ -15,7 +15,7 @@ outside of your VPC from initiating an IPv6 connection with your instance.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_vpc" "foo" { resource "aws_vpc" "foo" {
cidr_block = "10.1.0.0/16" cidr_block = "10.1.0.0/16"
assign_amazon_ipv6_cidr_block = true assign_amazon_ipv6_cidr_block = true

View File

@ -14,7 +14,7 @@ Provides an Elastic IP resource.
Single EIP associated with an instance: Single EIP associated with an instance:
``` ```hcl
resource "aws_eip" "lb" { resource "aws_eip" "lb" {
instance = "${aws_instance.web.id}" instance = "${aws_instance.web.id}"
vpc = true vpc = true
@ -23,7 +23,7 @@ resource "aws_eip" "lb" {
Multiple EIPs associated with a single network interface: Multiple EIPs associated with a single network interface:
``` ```hcl
resource "aws_network_interface" "multi-ip" { resource "aws_network_interface" "multi-ip" {
subnet_id = "${aws_subnet.main.id}" subnet_id = "${aws_subnet.main.id}"
private_ips = ["10.0.0.10", "10.0.0.11"] private_ips = ["10.0.0.10", "10.0.0.11"]
@ -44,7 +44,7 @@ resource "aws_eip" "two" {
Attaching an EIP to an Instance with a pre-assigned private ip (VPC Only): Attaching an EIP to an Instance with a pre-assigned private ip (VPC Only):
``` ```hcl
resource "aws_vpc" "default" { resource "aws_vpc" "default" {
cidr_block = "10.0.0.0/16" cidr_block = "10.0.0.0/16"
enable_dns_hostnames = true enable_dns_hostnames = true

View File

@ -16,7 +16,7 @@ pre-existing or distributed to customers or users and therefore cannot be change
## Example Usage ## Example Usage
``` ```hcl
resource "aws_eip_association" "eip_assoc" { resource "aws_eip_association" "eip_assoc" {
instance_id = "${aws_instance.web.id}" instance_id = "${aws_instance.web.id}"
allocation_id = "${aws_eip.example.id}" allocation_id = "${aws_eip.example.id}"

View File

@ -17,7 +17,7 @@ This resource creates an application that has one configuration template named
## Example Usage ## Example Usage
``` ```hcl
resource "aws_elastic_beanstalk_application" "tftest" { resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name" name = "tf-test-name"
description = "tf-test-desc" description = "tf-test-desc"

View File

@ -27,7 +27,7 @@ Elastic Beanstalk Application. For example &lt;revision&gt;-&lt;environment&gt;.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_s3_bucket" "default" { resource "aws_s3_bucket" "default" {
bucket = "tftest.applicationversion.bucket" bucket = "tftest.applicationversion.bucket"
} }

View File

@ -14,8 +14,7 @@ application with the same configuration settings.
## Example Usage ## Example Usage
```hcl
```
resource "aws_elastic_beanstalk_application" "tftest" { resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name" name = "tf-test-name"
description = "tf-test-desc" description = "tf-test-desc"

View File

@ -17,8 +17,7 @@ Environments are often things such as `development`, `integration`, or
## Example Usage ## Example Usage
```hcl
```
resource "aws_elastic_beanstalk_application" "tftest" { resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name" name = "tf-test-name"
description = "tf-test-desc" description = "tf-test-desc"
@ -80,7 +79,7 @@ The `setting` and `all_settings` mappings support the following format:
### Example With Options ### Example With Options
``` ```hcl
resource "aws_elastic_beanstalk_application" "tftest" { resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name" name = "tf-test-name"
description = "tf-test-desc" description = "tf-test-desc"

View File

@ -12,7 +12,7 @@ Provides an Elastic Transcoder pipeline resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_elastictranscoder_pipeline" "bar" { resource "aws_elastictranscoder_pipeline" "bar" {
input_bucket = "${aws_s3_bucket.input_bucket.bucket}" input_bucket = "${aws_s3_bucket.input_bucket.bucket}"
name = "aws_elastictranscoder_pipeline_tf_test_" name = "aws_elastictranscoder_pipeline_tf_test_"

View File

@ -12,7 +12,7 @@ Provides an Elastic Transcoder preset resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_elastictranscoder_preset" "bar" { resource "aws_elastictranscoder_preset" "bar" {
container = "mp4" container = "mp4"
description = "Sample Preset" description = "Sample Preset"

View File

@ -23,7 +23,7 @@ brief downtime as the server reboots. See the AWS Docs on
## Example Usage ## Example Usage
``` ```hcl
resource "aws_elasticache_cluster" "bar" { resource "aws_elasticache_cluster" "bar" {
cluster_id = "cluster-example" cluster_id = "cluster-example"
engine = "memcached" engine = "memcached"

View File

@ -10,7 +10,7 @@ Provides an ElastiCache parameter group resource.
## Example Usage ## Example Usage
``` ```hcl
resource "aws_elasticache_parameter_group" "default" { resource "aws_elasticache_parameter_group" "default" {
name = "cache-params" name = "cache-params"
family = "redis2.8" family = "redis2.8"

Some files were not shown because too many files have changed in this diff Show More