diff --git a/.gitignore b/.gitignore index 5aaec9d3378..62a3c224895 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,5 @@ website/vendor # Keep windows files with windows line endings *.winfile eol=crlf -/.vs \ No newline at end of file +/.vs +node_modules diff --git a/GNUmakefile b/GNUmakefile index 84c42671f46..8e1c2b7f45e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -27,6 +27,9 @@ fmt: fmtcheck: @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" +websitefmtcheck: + @sh -c "'$(CURDIR)/scripts/websitefmtcheck.sh'" + lint: @echo "==> Checking source code against linters..." @gometalinter ./$(PKG_NAME) diff --git a/examples/cloudhsm/main.tf b/examples/cloudhsm/main.tf index 46a8adbd94c..4116cb2f0a1 100644 --- a/examples/cloudhsm/main.tf +++ b/examples/cloudhsm/main.tf @@ -25,19 +25,20 @@ resource "aws_subnet" "cloudhsm2_subnets" { } resource "aws_cloudhsm_v2_cluster" "cloudhsm_v2_cluster" { - hsm_type = "hsm1.medium" + hsm_type = "hsm1.medium" subnet_ids = ["${aws_subnet.cloudhsm2_subnets.*.id}"] + tags { Name = "example-aws_cloudhsm_v2_cluster" } } resource "aws_cloudhsm_v2_hsm" "cloudhsm_v2_hsm" { - subnet_id = "${aws_subnet.cloudhsm2_subnets.0.id}" + subnet_id = "${aws_subnet.cloudhsm2_subnets.0.id}" cluster_id = "${aws_cloudhsm_v2_cluster.cloudhsm_v2_cluster.cluster_id}" } data "aws_cloudhsm_v2_cluster" "cluster" { - cluster_id = "${aws_cloudhsm_v2_cluster.cloudhsm_v2_cluster.cluster_id}" - depends_on = ["aws_cloudhsm_v2_hsm.cloudhsm_v2_hsm"] + cluster_id = "${aws_cloudhsm_v2_cluster.cloudhsm_v2_cluster.cluster_id}" + depends_on = ["aws_cloudhsm_v2_hsm.cloudhsm_v2_hsm"] } diff --git a/examples/cloudhsm/outputs.tf b/examples/cloudhsm/outputs.tf index 06eee1c1601..a91d8997a27 100644 --- a/examples/cloudhsm/outputs.tf +++ b/examples/cloudhsm/outputs.tf @@ -1,7 +1,7 @@ output "hsm_ip_address" { - value = "${aws_cloudhsm_v2_hsm.cloudhsm_v2_hsm.ip_address}" + value = "${aws_cloudhsm_v2_hsm.cloudhsm_v2_hsm.ip_address}" } output "cluster_data_certificate" { - value = "${data.aws_cloudhsm_v2_cluster.cluster.cluster_certificates.0.cluster_csr}" + value = "${data.aws_cloudhsm_v2_cluster.cluster.cluster_certificates.0.cluster_csr}" } diff --git a/scripts/websitefmtcheck.sh b/scripts/websitefmtcheck.sh new file mode 100755 index 00000000000..bbbec8053b3 --- /dev/null +++ b/scripts/websitefmtcheck.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -eou pipefail + +npm list codedown > /dev/null 2>&1 || npm install --no-save codedown > /dev/null 2>&1 + +problems=false +for f in $(find website -name '*.markdown'); do + if [ "${1-}" = "diff" ]; then + echo "$f" + cat "$f" | node_modules/.bin/codedown hcl | terraform fmt -diff=true - + else + cat "$f" | node_modules/.bin/codedown hcl | terraform fmt -check=true - || problems=true && echo "Formatting errors in $f" + fi +done + +if [ "$problems" = true ] ; then + exit 1 +fi diff --git a/website/docs/d/acm_certificate.html.markdown b/website/docs/d/acm_certificate.html.markdown index 0a30c8ace08..fb8d0c82324 100644 --- a/website/docs/d/acm_certificate.html.markdown +++ b/website/docs/d/acm_certificate.html.markdown @@ -21,8 +21,8 @@ data "aws_acm_certificate" "example" { } data "aws_acm_certificate" "example" { - domain = "tf.example.com" - types = ["AMAZON_ISSUED"] + domain = "tf.example.com" + types = ["AMAZON_ISSUED"] most_recent = true } ``` diff --git a/website/docs/d/autoscaling_groups.html.markdown b/website/docs/d/autoscaling_groups.html.markdown index f5b4c49c6eb..17827654f58 100644 --- a/website/docs/d/autoscaling_groups.html.markdown +++ b/website/docs/d/autoscaling_groups.html.markdown @@ -16,12 +16,12 @@ ASGs within a specific region. This will allow you to pass a list of AutoScaling ```hcl data "aws_autoscaling_groups" "groups" { filter { - name = "key" + name = "key" values = ["Team"] } filter { - name = "value" + name = "value" values = ["Pets"] } } diff --git a/website/docs/d/cloudhsm_v2_cluster.html.markdown b/website/docs/d/cloudhsm_v2_cluster.html.markdown index ef4ae3f2ed0..72242b532f3 100644 --- a/website/docs/d/cloudhsm_v2_cluster.html.markdown +++ b/website/docs/d/cloudhsm_v2_cluster.html.markdown @@ -14,7 +14,7 @@ Use this data source to get information about a CloudHSM v2 cluster ```hcl data "aws_cloudhsm_v2_cluster" "cluster" { - cluster_id = "cluster-testclusterid" + cluster_id = "cluster-testclusterid" } ``` ## Argument Reference @@ -37,4 +37,4 @@ The following attributes are exported: * `cluster_certificates.0.aws_hardware_certificate` - The HSM hardware certificate issued (signed) by AWS CloudHSM. * `cluster_certificates.0.hsm_certificate` - The HSM certificate issued (signed) by the HSM hardware. * `cluster_certificates.0.manufacturer_hardware_certificate` - The HSM hardware certificate issued (signed) by the hardware manufacturer. -The number of available cluster certificates may vary depending on state of the cluster. \ No newline at end of file +The number of available cluster certificates may vary depending on state of the cluster. diff --git a/website/docs/d/codecommit_repository.html.markdown b/website/docs/d/codecommit_repository.html.markdown index b9442dc0258..b7bbb214f10 100644 --- a/website/docs/d/codecommit_repository.html.markdown +++ b/website/docs/d/codecommit_repository.html.markdown @@ -31,4 +31,4 @@ In addition to all arguments above, the following attributes are exported: * `repository_id` - The ID of the repository * `arn` - The ARN of the repository * `clone_url_http` - The URL to use for cloning the repository over HTTPS. -* `clone_url_ssh` - The URL to use for cloning the repository over SSH. \ No newline at end of file +* `clone_url_ssh` - The URL to use for cloning the repository over SSH. diff --git a/website/docs/d/cognito_user_pools.markdown b/website/docs/d/cognito_user_pools.markdown index fd2dde3cae7..cef7a0b2871 100644 --- a/website/docs/d/cognito_user_pools.markdown +++ b/website/docs/d/cognito_user_pools.markdown @@ -22,9 +22,9 @@ data "aws_cognito_user_pools" "selected" { } resource "aws_api_gateway_authorizer" "cognito" { - name = "cognito" - type = "COGNITO_USER_POOLS" - rest_api_id = "${data.aws_api_gateway_rest_api.selected.id}" + name = "cognito" + type = "COGNITO_USER_POOLS" + rest_api_id = "${data.aws_api_gateway_rest_api.selected.id}" provider_arns = ["${data.aws_cognito_user_pools.selected.arns}"] } ``` diff --git a/website/docs/d/db_cluster_snapshot.html.markdown b/website/docs/d/db_cluster_snapshot.html.markdown index e33a4a88c6a..ba532fafb84 100644 --- a/website/docs/d/db_cluster_snapshot.html.markdown +++ b/website/docs/d/db_cluster_snapshot.html.markdown @@ -18,14 +18,14 @@ See the [`aws_db_snapshot` data source](/docs/providers/aws/d/db_snapshot.html) ```hcl data "aws_db_cluster_snapshot" "development_final_snapshot" { db_cluster_identifier = "development_cluster" - most_recent = true + most_recent = true } # Use the last snapshot of the dev database before it was destroyed to create # a new dev database. resource "aws_rds_cluster" "aurora" { - cluster_identifier = "development_cluster" - snapshot_identifier = "${aws_db_cluster_snapshot.development_final_snapshot.id}" + cluster_identifier = "development_cluster" + snapshot_identifier = "${aws_db_cluster_snapshot.development_final_snapshot.id}" db_subnet_group_name = "my_db_subnet_group" lifecycle { @@ -34,11 +34,10 @@ resource "aws_rds_cluster" "aurora" { } resource "aws_rds_cluster_instance" "aurora" { - cluster_identifier = "${aws_rds_cluster.aurora.id}" - instance_class = "db.t2.small" + cluster_identifier = "${aws_rds_cluster.aurora.id}" + instance_class = "db.t2.small" db_subnet_group_name = "my_db_subnet_group" } - ``` ## Argument Reference diff --git a/website/docs/d/db_snapshot.html.markdown b/website/docs/d/db_snapshot.html.markdown index e7cded74674..59646bcc3a9 100644 --- a/website/docs/d/db_snapshot.html.markdown +++ b/website/docs/d/db_snapshot.html.markdown @@ -30,7 +30,7 @@ resource "aws_db_instance" "prod" { data "aws_db_snapshot" "latest_prod_snapshot" { db_instance_identifier = "${aws_db_instance.prod.id}" - most_recent = true + most_recent = true } # Use the latest production snapshot to create a dev instance. @@ -38,6 +38,7 @@ resource "aws_db_instance" "dev" { instance_class = "db.t2.micro" name = "mydbdev" snapshot_identifier = "${data.aws_db_snapshot.latest_prod_snapshot.id}" + lifecycle { ignore_changes = ["snapshot_identifier"] } diff --git a/website/docs/d/dynamodb_table.html.markdown b/website/docs/d/dynamodb_table.html.markdown index 1b55f23193d..b747b6f50fe 100644 --- a/website/docs/d/dynamodb_table.html.markdown +++ b/website/docs/d/dynamodb_table.html.markdown @@ -27,4 +27,4 @@ The following arguments are supported: ## Attributes Reference See the [DynamoDB Table Resource](/docs/providers/aws/r/dynamodb_table.html) for details on the -returned attributes - they are identical. \ No newline at end of file +returned attributes - they are identical. diff --git a/website/docs/d/efs_file_system.html.markdown b/website/docs/d/efs_file_system.html.markdown index 07dca5d6606..28965856119 100644 --- a/website/docs/d/efs_file_system.html.markdown +++ b/website/docs/d/efs_file_system.html.markdown @@ -14,7 +14,7 @@ Provides information about an Elastic File System (EFS). ```hcl variable "file_system_id" { - type = "string" + type = "string" default = "" } diff --git a/website/docs/d/efs_mount_target.html.markdown b/website/docs/d/efs_mount_target.html.markdown index 5def4af6cab..a9e24abef3a 100644 --- a/website/docs/d/efs_mount_target.html.markdown +++ b/website/docs/d/efs_mount_target.html.markdown @@ -14,7 +14,7 @@ Provides information about an Elastic File System Mount Target (EFS). ```hcl variable "mount_target_id" { - type = "string" + type = "string" default = "" } diff --git a/website/docs/d/eks_cluster.html.markdown b/website/docs/d/eks_cluster.html.markdown index 3f146be6773..78778e51856 100644 --- a/website/docs/d/eks_cluster.html.markdown +++ b/website/docs/d/eks_cluster.html.markdown @@ -14,7 +14,7 @@ Retrieve information about an EKS Cluster. ```hcl data "aws_eks_cluster" "example" { - name = "example" + name = "example" } output "endpoint" { diff --git a/website/docs/d/elastic_beanstalk_solution_stack.html.markdown b/website/docs/d/elastic_beanstalk_solution_stack.html.markdown index 31e1b6983e0..0a6ee4fd9e4 100644 --- a/website/docs/d/elastic_beanstalk_solution_stack.html.markdown +++ b/website/docs/d/elastic_beanstalk_solution_stack.html.markdown @@ -14,9 +14,9 @@ Use this data source to get the name of a elastic beanstalk solution stack. ```hcl data "aws_elastic_beanstalk_solution_stack" "multi_docker" { - most_recent = true + most_recent = true - name_regex = "^64bit Amazon Linux (.*) Multi-container Docker (.*)$" + name_regex = "^64bit Amazon Linux (.*) Multi-container Docker (.*)$" } ``` diff --git a/website/docs/d/iam_policy_document.html.markdown b/website/docs/d/iam_policy_document.html.markdown index 9448f703a71..18f5b0c702e 100644 --- a/website/docs/d/iam_policy_document.html.markdown +++ b/website/docs/d/iam_policy_document.html.markdown @@ -307,7 +307,7 @@ Use without a `statement`: ```hcl data "aws_iam_policy_document" "source" { statement { - sid = "OverridePlaceholder" + sid = "OverridePlaceholder" actions = ["ec2:DescribeAccountAttributes"] resources = ["*"] } @@ -315,14 +315,14 @@ data "aws_iam_policy_document" "source" { data "aws_iam_policy_document" "override" { statement { - sid = "OverridePlaceholder" + sid = "OverridePlaceholder" actions = ["s3:GetObject"] resources = ["*"] } } data "aws_iam_policy_document" "politik" { - source_json = "${data.aws_iam_policy_document.source.json}" + source_json = "${data.aws_iam_policy_document.source.json}" override_json = "${data.aws_iam_policy_document.override.json}" } ``` diff --git a/website/docs/d/inspector_rules_packages.html.markdown b/website/docs/d/inspector_rules_packages.html.markdown index 78669b66270..d2aa5e5ce9b 100644 --- a/website/docs/d/inspector_rules_packages.html.markdown +++ b/website/docs/d/inspector_rules_packages.html.markdown @@ -21,7 +21,7 @@ data "aws_inspector_rules_packages" "rules" {} # e.g. Use in aws_inspector_assessment_template resource "aws_inspector_resource_group" "group" { tags { - test = "test" + test = "test" } } diff --git a/website/docs/d/instances.html.markdown b/website/docs/d/instances.html.markdown index dd16fe7a70e..a222691ee39 100644 --- a/website/docs/d/instances.html.markdown +++ b/website/docs/d/instances.html.markdown @@ -28,16 +28,17 @@ data "aws_instances" "test" { instance_tags { Role = "HardWorker" } + filter { name = "instance.group-id" values = ["sg-12345678"] } - - instance_state_names = [ "running", "stopped" ] + + instance_state_names = ["running", "stopped"] } resource "aws_eip" "test" { - count = "${length(data.aws_instances.test.ids)}" + count = "${length(data.aws_instances.test.ids)}" instance = "${data.aws_instances.test.ids[count.index]}" } ``` diff --git a/website/docs/d/internet_gateway.html.markdown b/website/docs/d/internet_gateway.html.markdown index 288631578b8..45899a86e79 100644 --- a/website/docs/d/internet_gateway.html.markdown +++ b/website/docs/d/internet_gateway.html.markdown @@ -17,7 +17,7 @@ variable "vpc_id" {} data "aws_internet_gateway" "default" { filter { - name = "attachment.vpc-id" + name = "attachment.vpc-id" values = ["${var.vpc_id}"] } } diff --git a/website/docs/d/iot_endpoint.html.markdown b/website/docs/d/iot_endpoint.html.markdown index 23c0d386158..0721ed8a55b 100644 --- a/website/docs/d/iot_endpoint.html.markdown +++ b/website/docs/d/iot_endpoint.html.markdown @@ -19,6 +19,7 @@ resource "kubernetes_pod" "agent" { metadata { name = "my-device" } + spec { container { image = "gcr.io/my-project/image-name" diff --git a/website/docs/d/kms_ciphertext.html.markdown b/website/docs/d/kms_ciphertext.html.markdown index 503940dc5fd..fb4a8684030 100644 --- a/website/docs/d/kms_ciphertext.html.markdown +++ b/website/docs/d/kms_ciphertext.html.markdown @@ -19,11 +19,12 @@ by using an AWS KMS customer master key. ```hcl resource "aws_kms_key" "oauth_config" { description = "oauth config" - is_enabled = true + is_enabled = true } data "aws_kms_ciphertext" "oauth" { key_id = "${aws_kms_key.oauth_config.key_id}" + plaintext = < **WARNING:** The aws_iam_policy_attachment resource creates **exclusive** attachments of IAM policies. Across the entire AWS account, all of the users/roles/groups to which a single policy is attached must be declared by a single aws_iam_policy_attachment resource. This means that even any users/roles/groups that have the attached policy via some mechanism other than Terraform will have that attached policy revoked by Terraform. Consider `aws_iam_role_policy_attachment`, `aws_iam_user_policy_attachment`, or `aws_iam_group_policy_attachment` instead. These resources do not enforce exclusive attachment of an IAM policy. +!> **WARNING:** The aws_iam_policy_attachment resource creates **exclusive** attachments of IAM policies. Across the entire AWS account, all of the users/roles/groups to which a single policy is attached must be declared by a single aws_iam_policy_attachment resource. This means that even any users/roles/groups that have the attached policy via some mechanism other than Terraform will have that attached policy revoked by Terraform. Consider `aws_iam_role_policy_attachment`, `aws_iam_user_policy_attachment`, or `aws_iam_group_policy_attachment` instead. These resources do not enforce exclusive attachment of an IAM policy. ## Example Usage @@ -46,11 +46,11 @@ resource "aws_iam_policy_attachment" "test-attach" { The following arguments are supported: -* `name` (Required) - The name of the attachment. This cannot be an empty string. -* `users` (Optional) - The user(s) the policy should be applied to -* `roles` (Optional) - The role(s) the policy should be applied to -* `groups` (Optional) - The group(s) the policy should be applied to -* `policy_arn` (Required) - The ARN of the policy you want to apply +* `name` (Required) - The name of the attachment. This cannot be an empty string. +* `users` (Optional) - The user(s) the policy should be applied to +* `roles` (Optional) - The role(s) the policy should be applied to +* `groups` (Optional) - The group(s) the policy should be applied to +* `policy_arn` (Required) - The ARN of the policy you want to apply ## Attributes Reference diff --git a/website/docs/r/iam_role_policy_attachment.markdown b/website/docs/r/iam_role_policy_attachment.markdown index 8b51c14d033..e897dd08ab4 100644 --- a/website/docs/r/iam_role_policy_attachment.markdown +++ b/website/docs/r/iam_role_policy_attachment.markdown @@ -14,8 +14,9 @@ Attaches a Managed IAM Policy to an IAM role ```hcl resource "aws_iam_role" "role" { - name = "test-role" - assume_role_policy = < diff --git a/website/docs/r/nat_gateway.html.markdown b/website/docs/r/nat_gateway.html.markdown index c284ea8d4b0..5ee4a8a995a 100644 --- a/website/docs/r/nat_gateway.html.markdown +++ b/website/docs/r/nat_gateway.html.markdown @@ -70,4 +70,4 @@ NAT Gateways can be imported using the `id`, e.g. ``` $ terraform import aws_nat_gateway.private_gw nat-05dba92075d71c408 -``` \ No newline at end of file +``` diff --git a/website/docs/r/neptune_cluster_instance.html.markdown b/website/docs/r/neptune_cluster_instance.html.markdown index 5e3409a1382..d9f7a9faf22 100644 --- a/website/docs/r/neptune_cluster_instance.html.markdown +++ b/website/docs/r/neptune_cluster_instance.html.markdown @@ -36,7 +36,6 @@ resource "aws_neptune_cluster_instance" "example" { instance_class = "db.r4.large" apply_immediately = true } - ``` ## Argument Reference diff --git a/website/docs/r/neptune_cluster_parameter_group.html.markdown b/website/docs/r/neptune_cluster_parameter_group.html.markdown index 1b4c36ac57c..ae75772176a 100644 --- a/website/docs/r/neptune_cluster_parameter_group.html.markdown +++ b/website/docs/r/neptune_cluster_parameter_group.html.markdown @@ -14,13 +14,13 @@ Manages a Neptune Cluster Parameter Group ```hcl resource "aws_neptune_cluster_parameter_group" "example" { - family = "neptune1" - name = "example" + family = "neptune1" + name = "example" description = "neptune cluster parameter group" parameter { - name = "neptune_enable_audit_log" - value = 1 + name = "neptune_enable_audit_log" + value = 1 } } ``` diff --git a/website/docs/r/neptune_parameter_group.html.markdown b/website/docs/r/neptune_parameter_group.html.markdown index d4523a7ae3c..4d0afe27062 100644 --- a/website/docs/r/neptune_parameter_group.html.markdown +++ b/website/docs/r/neptune_parameter_group.html.markdown @@ -18,8 +18,8 @@ resource "aws_neptune_parameter_group" "example" { name = "example" parameter { - name = "neptune_query_timeout" - value = "25" + name = "neptune_query_timeout" + value = "25" } } ``` diff --git a/website/docs/r/network_interface_attachment.html.markdown b/website/docs/r/network_interface_attachment.html.markdown index 8dd0fb6db24..b92a9cf954b 100644 --- a/website/docs/r/network_interface_attachment.html.markdown +++ b/website/docs/r/network_interface_attachment.html.markdown @@ -14,9 +14,9 @@ Attach an Elastic network interface (ENI) resource with EC2 instance. ```hcl resource "aws_network_interface_attachment" "test" { - instance_id = "${aws_instance.test.id}" - network_interface_id = "${aws_network_interface.test.id}" - device_index = 0 + instance_id = "${aws_instance.test.id}" + network_interface_id = "${aws_network_interface.test.id}" + device_index = 0 } ``` diff --git a/website/docs/r/opsworks_custom_layer.html.markdown b/website/docs/r/opsworks_custom_layer.html.markdown index 807f914b478..6efd12038f5 100644 --- a/website/docs/r/opsworks_custom_layer.html.markdown +++ b/website/docs/r/opsworks_custom_layer.html.markdown @@ -72,4 +72,4 @@ OpsWorks Custom Layers can be imported using the `id`, e.g. ``` $ terraform import aws_opsworks_custom_layer.bar 00000000-0000-0000-0000-000000000000 -``` \ No newline at end of file +``` diff --git a/website/docs/r/organizations_policy.html.markdown b/website/docs/r/organizations_policy.html.markdown index d0fb9cb0638..9adde37ba14 100644 --- a/website/docs/r/organizations_policy.html.markdown +++ b/website/docs/r/organizations_policy.html.markdown @@ -14,7 +14,7 @@ Provides a resource to manage an [AWS Organizations policy](https://docs.aws.ama ```hcl resource "aws_organizations_policy" "example" { - name = "example" + name = "example" content = < **NOTE on VPC Endpoints and VPC Endpoint Route Table Associations:** Terraform provides -both a standalone VPC Endpoint Route Table Association (an association between a VPC endpoint -and a single `route_table_id`) and a [VPC Endpoint](vpc_endpoint.html) resource with a `route_table_ids` -attribute. Do not use the same route table ID in both a VPC Endpoint resource and a VPC Endpoint Route -Table Association resource. Doing so will cause a conflict of associations and will overwrite the association. - -## Example Usage - -Basic usage: - -```hcl -resource "aws_vpc_endpoint_route_table_association" "private_s3" { - vpc_endpoint_id = "${aws_vpc_endpoint.s3.id}" - route_table_id = "${aws_route_table.private.id}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `vpc_endpoint_id` - (Required) The ID of the VPC endpoint with which the routing table will be associated. -* `route_table_id` - (Required) The ID of the routing table to be associated with the VPC endpoint. - -## Attributes Reference - -In addition to all arguments above, the following attributes are exported: - -* `id` - The ID of the association. diff --git a/website/docs/r/vpc_endpoint_service.html.markdown b/website/docs/r/vpc_endpoint_service.html.markdown index 906c4c68b14..4d4be6524d2 100644 --- a/website/docs/r/vpc_endpoint_service.html.markdown +++ b/website/docs/r/vpc_endpoint_service.html.markdown @@ -23,7 +23,7 @@ Basic usage: ```hcl resource "aws_vpc_endpoint_service" "foo" { - acceptance_required = false + acceptance_required = false network_load_balancer_arns = ["${aws_lb.test.arn}"] } ``` diff --git a/website/docs/r/vpc_endpoint_service_allowed_principal.html.markdown b/website/docs/r/vpc_endpoint_service_allowed_principal.html.markdown index cfff4ae06d2..cb86e09c7cc 100644 --- a/website/docs/r/vpc_endpoint_service_allowed_principal.html.markdown +++ b/website/docs/r/vpc_endpoint_service_allowed_principal.html.markdown @@ -25,7 +25,7 @@ data "aws_caller_identity" "current" {} resource "aws_vpc_endpoint_service_allowed_principal" "allow_me_to_foo" { vpc_endpoint_service_id = "${aws_vpc_endpoint_service.foo.id}" - principal_arn = "${data.aws_caller_identity.current.arn}" + principal_arn = "${data.aws_caller_identity.current.arn}" } ``` diff --git a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown index b74cec20775..d2f1261fe28 100644 --- a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown +++ b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown @@ -21,7 +21,7 @@ resource "aws_vpc" "main" { } resource "aws_vpc_ipv4_cidr_block_association" "secondary_cidr" { - vpc_id = "${aws_vpc.main.id}" + vpc_id = "${aws_vpc.main.id}" cidr_block = "172.2.0.0/16" } ``` diff --git a/website/docs/r/vpc_peering.html.markdown b/website/docs/r/vpc_peering.html.markdown index 63a39f728e6..7501a6aabb6 100644 --- a/website/docs/r/vpc_peering.html.markdown +++ b/website/docs/r/vpc_peering.html.markdown @@ -164,7 +164,7 @@ or accept the connection manually using the AWS Management Console, AWS CLI, thr VPC Peering resources can be imported using the `vpc peering id`, e.g. -``` +```sh $ terraform import aws_vpc_peering_connection.test_connection pcx-111aaa111 ``` diff --git a/website/docs/r/vpc_peering_accepter.html.markdown b/website/docs/r/vpc_peering_accepter.html.markdown index e35c661563a..10b85e7f0e9 100644 --- a/website/docs/r/vpc_peering_accepter.html.markdown +++ b/website/docs/r/vpc_peering_accepter.html.markdown @@ -27,7 +27,7 @@ provider "aws" { } provider "aws" { - alias = "peer" + alias = "peer" region = "us-west-2" # Accepter's credentials. diff --git a/website/docs/r/vpc_peering_options.html.markdown b/website/docs/r/vpc_peering_options.html.markdown index ca5d74c6470..6b479b0fdec 100644 --- a/website/docs/r/vpc_peering_options.html.markdown +++ b/website/docs/r/vpc_peering_options.html.markdown @@ -30,9 +30,9 @@ resource "aws_vpc" "bar" { } resource "aws_vpc_peering_connection" "foo" { - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" - auto_accept = true + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + auto_accept = true } resource "aws_vpc_peering_connection_options" "foo" { diff --git a/website/docs/r/vpn_connection.html.markdown b/website/docs/r/vpn_connection.html.markdown index 8cfd55605fa..22f8f2db95c 100644 --- a/website/docs/r/vpn_connection.html.markdown +++ b/website/docs/r/vpn_connection.html.markdown @@ -88,4 +88,4 @@ VPN Connections can be imported using the `vpn connection id`, e.g. ``` $ terraform import aws_vpn_connection.testvpnconnection vpn-40f41529 -``` \ No newline at end of file +``` diff --git a/website/docs/r/waf_rate_based_rule.html.markdown b/website/docs/r/waf_rate_based_rule.html.markdown index fc63ff981be..8a5baf7c173 100644 --- a/website/docs/r/waf_rate_based_rule.html.markdown +++ b/website/docs/r/waf_rate_based_rule.html.markdown @@ -27,7 +27,7 @@ resource "aws_waf_rate_based_rule" "wafrule" { name = "tfWAFRule" metric_name = "tfWAFRule" - rate_key = "IP" + rate_key = "IP" rate_limit = 2000 predicates { diff --git a/website/docs/r/waf_regex_match_set.html.markdown b/website/docs/r/waf_regex_match_set.html.markdown index 3af86b94295..5f3292c03c0 100644 --- a/website/docs/r/waf_regex_match_set.html.markdown +++ b/website/docs/r/waf_regex_match_set.html.markdown @@ -15,18 +15,20 @@ Provides a WAF Regex Match Set Resource ```hcl resource "aws_waf_regex_match_set" "example" { name = "example" + regex_match_tuple { field_to_match { data = "User-Agent" type = "HEADER" } + regex_pattern_set_id = "${aws_waf_regex_pattern_set.example.id}" - text_transformation = "NONE" + text_transformation = "NONE" } } resource "aws_waf_regex_pattern_set" "example" { - name = "example" + name = "example" regex_pattern_strings = ["one", "two"] } ``` diff --git a/website/docs/r/waf_regex_pattern_set.html.markdown b/website/docs/r/waf_regex_pattern_set.html.markdown index cfa541b31dd..dfa95d76a26 100644 --- a/website/docs/r/waf_regex_pattern_set.html.markdown +++ b/website/docs/r/waf_regex_pattern_set.html.markdown @@ -14,7 +14,7 @@ Provides a WAF Regex Pattern Set Resource ```hcl resource "aws_waf_regex_pattern_set" "example" { - name = "tf_waf_regex_pattern_set" + name = "tf_waf_regex_pattern_set" regex_pattern_strings = ["one", "two"] } ``` diff --git a/website/docs/r/waf_rule_group.html.markdown b/website/docs/r/waf_rule_group.html.markdown index dde100167a6..4df372fb5da 100644 --- a/website/docs/r/waf_rule_group.html.markdown +++ b/website/docs/r/waf_rule_group.html.markdown @@ -19,14 +19,16 @@ resource "aws_waf_rule" "example" { } resource "aws_waf_rule_group" "example" { - name = "example" + name = "example" metric_name = "example" + activated_rule { action { type = "COUNT" } + priority = 50 - rule_id = "${aws_waf_rule.example.id}" + rule_id = "${aws_waf_rule.example.id}" } } ``` diff --git a/website/docs/r/wafregional_byte_match_set.html.markdown b/website/docs/r/wafregional_byte_match_set.html.markdown index 2450fffeba7..64c2a04bc9b 100644 --- a/website/docs/r/wafregional_byte_match_set.html.markdown +++ b/website/docs/r/wafregional_byte_match_set.html.markdown @@ -15,10 +15,12 @@ Provides a WAF Regional Byte Match Set Resource for use with Application Load Ba ```hcl resource "aws_wafregional_byte_match_set" "byte_set" { name = "tf_waf_byte_match_set" + byte_match_tuples { - text_transformation = "NONE" - target_string = "badrefer1" + text_transformation = "NONE" + target_string = "badrefer1" positional_constraint = "CONTAINS" + field_to_match { type = "HEADER" data = "referer" diff --git a/website/docs/r/wafregional_ipset.html.markdown b/website/docs/r/wafregional_ipset.html.markdown index c799da6e3da..f0e098aca0d 100644 --- a/website/docs/r/wafregional_ipset.html.markdown +++ b/website/docs/r/wafregional_ipset.html.markdown @@ -17,7 +17,7 @@ resource "aws_wafregional_ipset" "ipset" { name = "tfIPSet" ip_set_descriptor { - type = "IPV4" + type = "IPV4" value = "192.0.7.0/24" } diff --git a/website/docs/r/wafregional_rate_based_rule.html.markdown b/website/docs/r/wafregional_rate_based_rule.html.markdown index 19f19ccd31f..15cea8f48b3 100644 --- a/website/docs/r/wafregional_rate_based_rule.html.markdown +++ b/website/docs/r/wafregional_rate_based_rule.html.markdown @@ -27,7 +27,7 @@ resource "aws_wafregional_rate_based_rule" "wafrule" { name = "tfWAFRule" metric_name = "tfWAFRule" - rate_key = "IP" + rate_key = "IP" rate_limit = 2000 predicate { diff --git a/website/docs/r/wafregional_regex_match_set.html.markdown b/website/docs/r/wafregional_regex_match_set.html.markdown index d2cad50c1d2..9f53db11311 100644 --- a/website/docs/r/wafregional_regex_match_set.html.markdown +++ b/website/docs/r/wafregional_regex_match_set.html.markdown @@ -15,18 +15,20 @@ Provides a WAF Regional Regex Match Set Resource ```hcl resource "aws_wafregional_regex_match_set" "example" { name = "example" + regex_match_tuple { field_to_match { data = "User-Agent" type = "HEADER" } + regex_pattern_set_id = "${aws_wafregional_regex_pattern_set.example.id}" - text_transformation = "NONE" + text_transformation = "NONE" } } resource "aws_wafregional_regex_pattern_set" "example" { - name = "example" + name = "example" regex_pattern_strings = ["one", "two"] } ``` diff --git a/website/docs/r/wafregional_regex_pattern_set.html.markdown b/website/docs/r/wafregional_regex_pattern_set.html.markdown index ddf0258c5fb..f474cca8144 100644 --- a/website/docs/r/wafregional_regex_pattern_set.html.markdown +++ b/website/docs/r/wafregional_regex_pattern_set.html.markdown @@ -14,7 +14,7 @@ Provides a WAF Regional Regex Pattern Set Resource ```hcl resource "aws_wafregional_regex_pattern_set" "example" { - name = "example" + name = "example" regex_pattern_strings = ["one", "two"] } ``` diff --git a/website/docs/r/wafregional_rule_group.html.markdown b/website/docs/r/wafregional_rule_group.html.markdown index ae6d3b2331b..eef2c289fc3 100644 --- a/website/docs/r/wafregional_rule_group.html.markdown +++ b/website/docs/r/wafregional_rule_group.html.markdown @@ -19,14 +19,16 @@ resource "aws_wafregional_rule" "example" { } resource "aws_wafregional_rule_group" "example" { - name = "example" + name = "example" metric_name = "example" + activated_rule { action { type = "COUNT" } + priority = 50 - rule_id = "${aws_wafregional_rule.example.id}" + rule_id = "${aws_wafregional_rule.example.id}" } } ``` diff --git a/website/docs/r/wafregional_sql_injection_match_set.html.markdown b/website/docs/r/wafregional_sql_injection_match_set.html.markdown index c5c68ecab50..bb2198d62ac 100644 --- a/website/docs/r/wafregional_sql_injection_match_set.html.markdown +++ b/website/docs/r/wafregional_sql_injection_match_set.html.markdown @@ -15,8 +15,10 @@ Provides a WAF Regional SQL Injection Match Set Resource for use with Applicatio ```hcl resource "aws_wafregional_sql_injection_match_set" "sql_injection_match_set" { name = "tf-sql_injection_match_set" + sql_injection_match_tuple { text_transformation = "URL_DECODE" + field_to_match { type = "QUERY_STRING" } diff --git a/website/docs/r/wafregional_web_acl.html.markdown b/website/docs/r/wafregional_web_acl.html.markdown index e9c0e1f92c7..ef78a53d2c7 100644 --- a/website/docs/r/wafregional_web_acl.html.markdown +++ b/website/docs/r/wafregional_web_acl.html.markdown @@ -15,7 +15,7 @@ Provides a WAF Regional Web ACL Resource for use with Application Load Balancer. ```hcl resource "aws_wafregional_ipset" "ipset" { name = "tfIPSet" - + ip_set_descriptor { type = "IPV4" value = "192.0.7.0/24" @@ -25,7 +25,7 @@ resource "aws_wafregional_ipset" "ipset" { resource "aws_wafregional_rule" "wafrule" { name = "tfWAFRule" metric_name = "tfWAFRule" - + predicate { data_id = "${aws_wafregional_ipset.ipset.id}" negated = false @@ -36,16 +36,16 @@ resource "aws_wafregional_rule" "wafrule" { resource "aws_wafregional_web_acl" "wafacl" { name = "tfWebACL" metric_name = "tfWebACL" - + default_action { type = "ALLOW" } - + rule { action { - type = "BLOCK" + type = "BLOCK" } - + priority = 1 rule_id = "${aws_wafregional_rule.wafrule.id}" type = "REGULAR" diff --git a/website/docs/r/wafregional_web_acl_association.html.markdown b/website/docs/r/wafregional_web_acl_association.html.markdown index 57af9d59c21..9681b13effe 100644 --- a/website/docs/r/wafregional_web_acl_association.html.markdown +++ b/website/docs/r/wafregional_web_acl_association.html.markdown @@ -17,7 +17,7 @@ Provides a resource to create an association between a WAF Regional WebACL and A ```hcl resource "aws_wafregional_ipset" "ipset" { name = "tfIPSet" - + ip_set_descriptor { type = "IPV4" value = "192.0.7.0/24" @@ -27,7 +27,7 @@ resource "aws_wafregional_ipset" "ipset" { resource "aws_wafregional_rule" "foo" { name = "tfWAFRule" metric_name = "tfWAFRule" - + predicate { data_id = "${aws_wafregional_ipset.ipset.id}" negated = false @@ -36,17 +36,20 @@ resource "aws_wafregional_rule" "foo" { } resource "aws_wafregional_web_acl" "foo" { - name = "foo" + name = "foo" metric_name = "foo" + default_action { type = "ALLOW" } + rule { action { type = "BLOCK" } + priority = 1 - rule_id = "${aws_wafregional_rule.foo.id}" + rule_id = "${aws_wafregional_rule.foo.id}" } } @@ -57,25 +60,25 @@ resource "aws_vpc" "foo" { data "aws_availability_zones" "available" {} resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.foo.id}" - cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "10.1.1.0/24" availability_zone = "${data.aws_availability_zones.available.names[0]}" } resource "aws_subnet" "bar" { - vpc_id = "${aws_vpc.foo.id}" - cidr_block = "10.1.2.0/24" + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "10.1.2.0/24" availability_zone = "${data.aws_availability_zones.available.names[1]}" } resource "aws_alb" "foo" { internal = true - subnets = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] + subnets = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] } resource "aws_wafregional_web_acl_association" "foo" { resource_arn = "${aws_alb.foo.arn}" - web_acl_id = "${aws_wafregional_web_acl.foo.id}" + web_acl_id = "${aws_wafregional_web_acl.foo.id}" } ```