Merge pull request #13701 from kavu/kavu-docs_hcl_addition
Massively add HCL source tag in docs Markdown files
This commit is contained in:
commit
ebc89e9426
|
@ -19,7 +19,7 @@ most likely expect.
|
|||
|
||||
To view a list of the available commands at any time, just run terraform with no arguments:
|
||||
|
||||
```
|
||||
```text
|
||||
$ terraform
|
||||
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 see help about the graph subcommand:
|
||||
|
||||
```
|
||||
```text
|
||||
$ terraform graph -h
|
||||
Usage: terraform graph [options] PATH
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ resource_type.resource_name[N]
|
|||
|
||||
Given a Terraform config that includes:
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_instance" "web" {
|
||||
# ...
|
||||
count = 4
|
||||
|
@ -57,7 +57,6 @@ resource "aws_instance" "web" {
|
|||
|
||||
An address like this:
|
||||
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
Refers to all four "web" instances.
|
||||
|
|
|
@ -12,7 +12,7 @@ Use this data source to get the Account ID of the [AWS Billing and Cost Manageme
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
data "aws_billing_service_account" "main" {}
|
||||
|
||||
resource "aws_s3_bucket" "billing_logs" {
|
||||
|
|
|
@ -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
|
||||
and use this data source to obtain the allocation ID.
|
||||
|
||||
```
|
||||
```hcl
|
||||
variable "instance_id" {}
|
||||
variable "public_ip" {}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ AWS provider block:
|
|||
|
||||
Usage:
|
||||
|
||||
```
|
||||
```hcl
|
||||
provider "aws" {
|
||||
region = "us-west-2"
|
||||
access_key = "anaccesskey"
|
||||
|
|
|
@ -16,7 +16,7 @@ thing.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new load balancer
|
||||
resource "aws_alb" "test" {
|
||||
name = "test-alb-tf"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an Application Load Balancer Listener resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new load balancer
|
||||
resource "aws_alb" "front_end" {
|
||||
# ...
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an Application Load Balancer Listener Rule resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new load balancer
|
||||
resource "aws_alb" "front_end" {
|
||||
# ...
|
||||
|
|
|
@ -14,7 +14,7 @@ resources.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_alb_target_group" "test" {
|
||||
name = "tf-example-alb-tg"
|
||||
port = 80
|
||||
|
|
|
@ -14,7 +14,7 @@ target group
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_alb_target_group_attachment" "test" {
|
||||
target_group_arn = "${aws_alb_target_group.test.arn}"
|
||||
target_id = "${aws_instance.test.id}"
|
||||
|
|
|
@ -19,7 +19,7 @@ it's better to use `aws_ami_launch_permission` instead.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# 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
|
||||
# already exists with the id "snap-xxxxxxxx".
|
||||
|
|
|
@ -22,7 +22,7 @@ block until the new AMI is available for use on new instances.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ami_copy" "example" {
|
||||
name = "terraform-example"
|
||||
description = "A copy of ami-xxxxxxxx"
|
||||
|
|
|
@ -28,7 +28,7 @@ to produce a fresh snapshot.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ami_from_instance" "example" {
|
||||
name = "terraform-example"
|
||||
source_instance_id = "i-xxxxxxxx"
|
||||
|
|
|
@ -12,7 +12,7 @@ Adds launch permission to Amazon Machine Image (AMI) from another AWS account.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ami_launch_permission" "example" {
|
||||
image_id = "ami-12345678"
|
||||
account_id = "123456789012"
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides a settings of an API Gateway Account. Settings is applied region-wide p
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_account" "demo" {
|
||||
cloudwatch_role_arn = "${aws_iam_role.cloudwatch.arn}"
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides an API Gateway API Key.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an API Gateway Authorizer.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_authorizer" "demo" {
|
||||
name = "demo"
|
||||
rest_api_id = "${aws_api_gateway_rest_api.demo.id}"
|
||||
|
|
|
@ -14,7 +14,7 @@ custom domain name.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_deployment" "example" {
|
||||
# See aws_api_gateway_rest_api_docs for how to create this
|
||||
rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an API Gateway Client Certificate.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_client_certificate" "demo" {
|
||||
description = "My client certificate"
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ you might need to add an explicit `depends_on = ["aws_api_gateway_integration.na
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
|
|
@ -27,7 +27,7 @@ traditional CNAME) to the Cloudfront domain name exported in the
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_domain_name" "example" {
|
||||
domain_name = "api.example.com"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an HTTP Method Integration for an API Gateway Integration.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
@ -54,7 +54,7 @@ EOF
|
|||
|
||||
## Lambda integration
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Variables
|
||||
variable "myregion" {}
|
||||
variable "accountId" {}
|
||||
|
|
|
@ -15,7 +15,7 @@ you might need to add an explicit `depends_on` for clean runs.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a HTTP Method for an API Gateway Resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an HTTP Method Response for an API Gateway Resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a Model for a API Gateway.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an API Gateway Resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an API Gateway REST API.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
|
||||
name = "MyDemoAPI"
|
||||
description = "This is my API for demonstration purposes"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an API Gateway Usage Plan.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "myapi" {
|
||||
name = "MyDemoAPI"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an API Gateway Usage Plan Key.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_api_gateway_rest_api" "test" {
|
||||
name = "MyDemoAPI"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an application cookie stickiness policy, which allows an ELB to wed its
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elb" "lb" {
|
||||
name = "test-lb"
|
||||
availability_zones = ["us-east-1a"]
|
||||
|
|
|
@ -11,7 +11,8 @@ description: |-
|
|||
Provides an Application AutoScaling Policy resource.
|
||||
|
||||
## Example Usage
|
||||
```
|
||||
|
||||
```hcl
|
||||
resource "aws_appautoscaling_target" "ecs_target" {
|
||||
max_capacity = 4
|
||||
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.
|
||||
* `step_adjustment` - (Optional) A set of adjustments that manage scaling. These have the following structure:
|
||||
|
||||
```
|
||||
```hcl
|
||||
step_adjustment {
|
||||
metric_interval_lower_bound = 1.0
|
||||
metric_interval_upper_bound = 2.0
|
||||
|
|
|
@ -11,7 +11,8 @@ description: |-
|
|||
Provides an Application AutoScaling ScalableTarget resource.
|
||||
|
||||
## Example Usage
|
||||
```
|
||||
|
||||
```hcl
|
||||
resource "aws_appautoscaling_target" "ecs_target" {
|
||||
max_capacity = 4
|
||||
min_capacity = 1
|
||||
|
|
|
@ -19,7 +19,7 @@ conflict and will overwrite attachments.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new load balancer attachment
|
||||
resource "aws_autoscaling_attachment" "asg_attachment_bar" {
|
||||
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
|
||||
resource "aws_autoscaling_attachment" "asg_attachment_bar" {
|
||||
autoscaling_group_name = "${aws_autoscaling_group.asg.id}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an AutoScaling Group resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_placement_group" "test" {
|
||||
name = "test"
|
||||
strategy = "cluster"
|
||||
|
|
|
@ -24,7 +24,7 @@ but take care to not duplicate those hooks with this resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_autoscaling_group" "foobar" {
|
||||
availability_zones = ["us-west-2a"]
|
||||
name = "terraform-test-foobar5"
|
||||
|
|
|
@ -16,7 +16,7 @@ Services, and are applied to each AutoScaling Group you supply.
|
|||
|
||||
Basic usage:
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_autoscaling_notification" "example_notifications" {
|
||||
group_names = [
|
||||
"${aws_autoscaling_group.bar.name}",
|
||||
|
|
|
@ -17,7 +17,8 @@ or [dynamic](https://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-sc
|
|||
(policy-based) scaling.
|
||||
|
||||
## Example Usage
|
||||
```
|
||||
|
||||
```hcl
|
||||
resource "aws_autoscaling_policy" "bat" {
|
||||
name = "foobar3-terraform-test"
|
||||
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
|
||||
group scaling. These have the following structure:
|
||||
|
||||
```
|
||||
```hcl
|
||||
step_adjustment {
|
||||
scaling_adjustment = -1
|
||||
metric_interval_lower_bound = 1.0
|
||||
|
|
|
@ -11,7 +11,8 @@ description: |-
|
|||
Provides an AutoScaling Schedule resource.
|
||||
|
||||
## Example Usage
|
||||
```
|
||||
|
||||
```hcl
|
||||
resource "aws_autoscaling_group" "foobar" {
|
||||
availability_zones = ["us-west-2a"]
|
||||
name = "terraform-test-foobar5"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudFormation Stack resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudformation_stack" "network" {
|
||||
name = "networking-stack"
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_s3_bucket" "b" {
|
||||
bucket = "mybucket"
|
||||
acl = "private"
|
||||
|
|
|
@ -19,7 +19,7 @@ origin access identities, see
|
|||
|
||||
The following example below creates a CloudFront origin access identity.
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudfront_origin_access_identity" "origin_access_identity" {
|
||||
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
|
||||
[`aws_cloudfront_web_distribution`][3] resource:
|
||||
|
||||
```
|
||||
```hcl
|
||||
s3_origin_config {
|
||||
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
|
||||
you see this behaviour, use the `iam_arn` instead:
|
||||
|
||||
```
|
||||
```hcl
|
||||
data "aws_iam_policy_document" "s3_policy" {
|
||||
statement {
|
||||
actions = ["s3:GetObject"]
|
||||
|
|
|
@ -11,7 +11,8 @@ description: |-
|
|||
Provides a CloudTrail resource.
|
||||
|
||||
## Example Usage
|
||||
```
|
||||
|
||||
```hcl
|
||||
resource "aws_cloudtrail" "foobar" {
|
||||
name = "tf-trail-foobar"
|
||||
s3_bucket_name = "${aws_s3_bucket.foo.id}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Event Rule resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_event_rule" "console" {
|
||||
name = "capture-aws-sign-in"
|
||||
description = "Capture each AWS Console Sign In"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Event Target resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_event_target" "yada" {
|
||||
target_id = "Yada"
|
||||
rule = "${aws_cloudwatch_event_rule.console.name}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Logs destination resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_log_destination" "test_destination" {
|
||||
name = "test_destination"
|
||||
role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Logs destination policy resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_log_destination" "test_destination" {
|
||||
name = "test_destination"
|
||||
role_arn = "${aws_iam_role.iam_for_cloudwatch.arn}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Log Group resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_log_group" "yada" {
|
||||
name = "Yada"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Log Metric Filter resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_log_metric_filter" "yada" {
|
||||
name = "MyAppAccessCount"
|
||||
pattern = ""
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Log Stream resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_log_group" "yada" {
|
||||
name = "Yada"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CloudWatch Logs subscription filter resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_cloudwatch_log_subscription_filter" "test_lambdafunction_logfilter" {
|
||||
name = "test_lambdafunction_logfilter"
|
||||
role_arn = "${aws_iam_role.iam_for_lambda.arn}"
|
||||
|
|
|
@ -11,7 +11,8 @@ description: |-
|
|||
Provides a CloudWatch Metric Alarm resource.
|
||||
|
||||
## Example Usage
|
||||
```
|
||||
|
||||
```hcl
|
||||
resource "aws_cloudwatch_metric_alarm" "foobar" {
|
||||
alarm_name = "terraform-test-foobar5"
|
||||
comparison_operator = "GreaterThanOrEqualToThreshold"
|
||||
|
@ -27,7 +28,8 @@ resource "aws_cloudwatch_metric_alarm" "foobar" {
|
|||
```
|
||||
|
||||
## Example in Conjunction with Scaling Policies
|
||||
```
|
||||
|
||||
```hcl
|
||||
resource "aws_autoscaling_policy" "bat" {
|
||||
name = "foobar3-terraform-test"
|
||||
scaling_adjustment = 4
|
||||
|
@ -98,7 +100,6 @@ The following attributes are exported:
|
|||
|
||||
* `id` - The ID of the health check
|
||||
|
||||
|
||||
## Import
|
||||
|
||||
Cloud Metric Alarms can be imported using the `alarm_name`, e.g.
|
||||
|
|
|
@ -16,7 +16,7 @@ in all regions - available regions are listed
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_codecommit_repository" "test" {
|
||||
repository_name = "MyTestRepository"
|
||||
description = "This is the Sample App Repository"
|
||||
|
|
|
@ -16,7 +16,7 @@ in all regions - available regions are listed
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_codecommit_trigger" "test" {
|
||||
depends_on = ["aws_codecommit_repository.test"]
|
||||
repository_name = "my_test_repository"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CodeBuild Project resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_iam_role" "codebuild_role" {
|
||||
name = "codebuild-role-"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CodeDeploy application to be used as a basis for deployments
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_codedeploy_app" "foo" {
|
||||
name = "foo"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CodeDeploy deployment config for an application
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_codedeploy_deployment_config" "foo" {
|
||||
deployment_config_name = "test-deployment-config"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a CodeDeploy deployment group for an application
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_codedeploy_app" "foo_app" {
|
||||
name = "foo_app"
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides a CodePipeline.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_s3_bucket" "foo" {
|
||||
bucket = "test-bucket"
|
||||
acl = "private"
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides an AWS Config Rule.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_config_config_rule" "r" {
|
||||
name = "example"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides an AWS Config Configuration Recorder. Please note that this resource **
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_config_configuration_recorder" "foo" {
|
||||
name = "example"
|
||||
role_arn = "${aws_iam_role.r.arn}"
|
||||
|
|
|
@ -14,7 +14,7 @@ Manages status (recording / stopped) of an AWS Config Configuration Recorder.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_config_configuration_recorder_status" "foo" {
|
||||
name = "${aws_config_configuration_recorder.foo.name}"
|
||||
is_enabled = true
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides an AWS Config Delivery Channel.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_config_delivery_channel" "foo" {
|
||||
name = "example"
|
||||
s3_bucket_name = "${aws_s3_bucket.b.bucket}"
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides a customer gateway inside a VPC. These objects can be connected to VPN
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_customer_gateway" "main" {
|
||||
bgp_asn = 65000
|
||||
ip_address = "172.83.124.10"
|
||||
|
|
|
@ -10,7 +10,7 @@ Provides a DB event subscription resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_db_instance" "default" {
|
||||
allocated_storage = 10
|
||||
engine = "mysql"
|
||||
|
|
|
@ -30,7 +30,7 @@ for more information.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_db_instance" "default" {
|
||||
allocated_storage = 10
|
||||
storage_type = "gp2"
|
||||
|
|
|
@ -10,7 +10,7 @@ Provides an RDS DB option group resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_db_option_group" "bar" {
|
||||
name = "option-group-test-terraform"
|
||||
option_group_description = "Terraform Option Group"
|
||||
|
|
|
@ -10,7 +10,7 @@ Provides an RDS DB parameter group resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_db_parameter_group" "default" {
|
||||
name = "rds-pg"
|
||||
family = "mysql5.6"
|
||||
|
|
|
@ -15,7 +15,7 @@ attribute instead.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_db_security_group" "default" {
|
||||
name = "rds_sg"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an RDS DB subnet group resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_db_subnet_group" "default" {
|
||||
name = "main"
|
||||
subnet_ids = ["${aws_subnet.frontend.id}", "${aws_subnet.backend.id}"]
|
||||
|
|
|
@ -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
|
||||
any ACL rules added or changed will be detected as drift.
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_vpc" "mainvpc" {
|
||||
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
|
||||
including the default `ingress` rule to allow all traffic.
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_vpc" "mainvpc" {
|
||||
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
|
||||
non-default ACL.
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_vpc" "mainvpc" {
|
||||
cidr_block = "10.1.0.0/16"
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ a conflict of rule settings and will overwrite routes.
|
|||
|
||||
## Example usage with tags:
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_default_route_table" "r" {
|
||||
default_route_table_id = "${aws_vpc.foo.default_route_table_id}"
|
||||
|
||||
|
|
|
@ -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
|
||||
any ingress or egress rules added or changed will be detected as drift.
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_vpc" "mainvpc" {
|
||||
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
|
||||
including the default `ingress` rule to allow all traffic.
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_vpc" "mainvpc" {
|
||||
cidr_block = "10.1.0.0/16"
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ Provides a Simple or Managed Microsoft directory in AWS Directory Service.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_directory_service_directory" "bar" {
|
||||
name = "corp.notexample.com"
|
||||
password = "SuperSecretPassw0rd"
|
||||
|
|
|
@ -15,7 +15,7 @@ Provides a DMS (Data Migration Service) certificate resource. DMS certificates c
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new certificate
|
||||
resource "aws_dms_certificate" "test" {
|
||||
certificate_id = "test-dms-certificate-tf"
|
||||
|
|
|
@ -15,7 +15,7 @@ Provides a DMS (Data Migration Service) endpoint resource. DMS endpoints can be
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new endpoint
|
||||
resource "aws_dms_endpoint" "test" {
|
||||
certificate_arn = "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a DMS (Data Migration Service) replication instance resource. DMS repli
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new replication instance
|
||||
resource "aws_dms_replication_instance" "test" {
|
||||
allocated_storage = 20
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a DMS (Data Migration Service) replication subnet group resource. DMS r
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new replication subnet group
|
||||
resource "aws_dms_replication_subnet_group" "test" {
|
||||
replication_subnet_group_description = "Test replication subnet group"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides a DMS (Data Migration Service) replication task resource. DMS replicati
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Create a new replication task
|
||||
resource "aws_dms_replication_task" "test" {
|
||||
cdc_start_time = 1484346880
|
||||
|
|
|
@ -15,7 +15,7 @@ Provides a DynamoDB table resource
|
|||
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)
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_dynamodb_table" "basic-dynamodb-table" {
|
||||
name = "GameScores"
|
||||
read_capacity = 20
|
||||
|
|
|
@ -12,7 +12,7 @@ Creates a Snapshot of an EBS Volume.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ebs_volume" "example" {
|
||||
availability_zone = "us-west-2a"
|
||||
size = 40
|
||||
|
|
|
@ -12,7 +12,7 @@ Manages a single EBS volume.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ebs_volume" "example" {
|
||||
availability_zone = "us-west-2a"
|
||||
size = 40
|
||||
|
|
|
@ -16,7 +16,7 @@ in all regions - available regions are listed
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ecr_repository" "foo" {
|
||||
name = "bar"
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ in all regions - available regions are listed
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ecr_repository" "foo" {
|
||||
name = "bar"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an ECS cluster.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ecs_cluster" "foo" {
|
||||
name = "white-hart"
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ See [ECS Services section in AWS developer guide](https://docs.aws.amazon.com/Am
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ecs_service" "mongo" {
|
||||
name = "mongodb"
|
||||
cluster = "${aws_ecs_cluster.foo.id}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an ECS task definition to be used in `aws_ecs_service`.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_ecs_task_definition" "service" {
|
||||
family = "service"
|
||||
container_definitions = "${file("task-definitions/service.json")}"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an Elastic File System (EFS) resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_efs_file_system" "foo" {
|
||||
creation_token = "my-product"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an Elastic File System (EFS) mount target.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_efs_mount_target" "alpha" {
|
||||
file_system_id = "${aws_efs_file_system.foo.id}"
|
||||
subnet_id = "${aws_subnet.alpha.id}"
|
||||
|
|
|
@ -15,7 +15,7 @@ outside of your VPC from initiating an IPv6 connection with your instance.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_vpc" "foo" {
|
||||
cidr_block = "10.1.0.0/16"
|
||||
assign_amazon_ipv6_cidr_block = true
|
||||
|
|
|
@ -14,7 +14,7 @@ Provides an Elastic IP resource.
|
|||
|
||||
Single EIP associated with an instance:
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_eip" "lb" {
|
||||
instance = "${aws_instance.web.id}"
|
||||
vpc = true
|
||||
|
@ -23,7 +23,7 @@ resource "aws_eip" "lb" {
|
|||
|
||||
Multiple EIPs associated with a single network interface:
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_network_interface" "multi-ip" {
|
||||
subnet_id = "${aws_subnet.main.id}"
|
||||
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):
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_vpc" "default" {
|
||||
cidr_block = "10.0.0.0/16"
|
||||
enable_dns_hostnames = true
|
||||
|
|
|
@ -16,7 +16,7 @@ pre-existing or distributed to customers or users and therefore cannot be change
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_eip_association" "eip_assoc" {
|
||||
instance_id = "${aws_instance.web.id}"
|
||||
allocation_id = "${aws_eip.example.id}"
|
||||
|
|
|
@ -17,7 +17,7 @@ This resource creates an application that has one configuration template named
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elastic_beanstalk_application" "tftest" {
|
||||
name = "tf-test-name"
|
||||
description = "tf-test-desc"
|
||||
|
|
|
@ -27,7 +27,7 @@ Elastic Beanstalk Application. For example <revision>-<environment>.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_s3_bucket" "default" {
|
||||
bucket = "tftest.applicationversion.bucket"
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@ application with the same configuration settings.
|
|||
|
||||
## Example Usage
|
||||
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elastic_beanstalk_application" "tftest" {
|
||||
name = "tf-test-name"
|
||||
description = "tf-test-desc"
|
||||
|
|
|
@ -17,8 +17,7 @@ Environments are often things such as `development`, `integration`, or
|
|||
|
||||
## Example Usage
|
||||
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elastic_beanstalk_application" "tftest" {
|
||||
name = "tf-test-name"
|
||||
description = "tf-test-desc"
|
||||
|
@ -80,7 +79,7 @@ The `setting` and `all_settings` mappings support the following format:
|
|||
|
||||
### Example With Options
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elastic_beanstalk_application" "tftest" {
|
||||
name = "tf-test-name"
|
||||
description = "tf-test-desc"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an Elastic Transcoder pipeline resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elastictranscoder_pipeline" "bar" {
|
||||
input_bucket = "${aws_s3_bucket.input_bucket.bucket}"
|
||||
name = "aws_elastictranscoder_pipeline_tf_test_"
|
||||
|
|
|
@ -12,7 +12,7 @@ Provides an Elastic Transcoder preset resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elastictranscoder_preset" "bar" {
|
||||
container = "mp4"
|
||||
description = "Sample Preset"
|
||||
|
|
|
@ -23,7 +23,7 @@ brief downtime as the server reboots. See the AWS Docs on
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elasticache_cluster" "bar" {
|
||||
cluster_id = "cluster-example"
|
||||
engine = "memcached"
|
||||
|
|
|
@ -10,7 +10,7 @@ Provides an ElastiCache parameter group resource.
|
|||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
resource "aws_elasticache_parameter_group" "default" {
|
||||
name = "cache-params"
|
||||
family = "redis2.8"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue