From 853b411840eaa84abf108b7ea70fd834ac9345eb Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 7 Apr 2017 16:54:00 -0700 Subject: [PATCH] website: syntax highlighting and hclfmt layout for TLS provider --- .../docs/providers/tls/index.html.markdown | 46 +++++++++---------- .../docs/providers/tls/r/cert_request.html.md | 14 +++--- .../tls/r/locally_signed_cert.html.md | 23 +++++----- .../docs/providers/tls/r/private_key.html.md | 6 +-- .../providers/tls/r/self_signed_cert.html.md | 26 +++++------ 5 files changed, 57 insertions(+), 58 deletions(-) diff --git a/website/source/docs/providers/tls/index.html.markdown b/website/source/docs/providers/tls/index.html.markdown index 42017111a..57f962e64 100644 --- a/website/source/docs/providers/tls/index.html.markdown +++ b/website/source/docs/providers/tls/index.html.markdown @@ -26,7 +26,7 @@ Use the navigation to the left to read about the available resources. ## Example Usage -``` +```hcl ## This example create a self-signed certificate for a development ## environment. ## THIS IS NOT RECOMMENDED FOR PRODUCTION SERVICES. @@ -34,39 +34,39 @@ Use the navigation to the left to read about the available resources. ## security considerations and other practical tradeoffs. resource "tls_private_key" "example" { - algorithm = "ECDSA" + algorithm = "ECDSA" } resource "tls_self_signed_cert" "example" { - key_algorithm = "${tls_private_key.example.algorithm}" - private_key_pem = "${tls_private_key.example.private_key_pem}" + key_algorithm = "${tls_private_key.example.algorithm}" + private_key_pem = "${tls_private_key.example.private_key_pem}" - # Certificate expires after 12 hours. - validity_period_hours = 12 + # Certificate expires after 12 hours. + validity_period_hours = 12 - # Generate a new certificate if Terraform is run within three - # hours of the certificate's expiration time. - early_renewal_hours = 3 + # Generate a new certificate if Terraform is run within three + # hours of the certificate's expiration time. + early_renewal_hours = 3 - # Reasonable set of uses for a server SSL certificate. - allowed_uses = [ - "key_encipherment", - "digital_signature", - "server_auth", - ] + # Reasonable set of uses for a server SSL certificate. + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] - dns_names = ["example.com", "example.net"] + dns_names = ["example.com", "example.net"] - subject { - common_name = "example.com" - organization = "ACME Examples, Inc" - } + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } } # For example, this can be used to populate an AWS IAM server certificate. resource "aws_iam_server_certificate" "example" { - name = "example_self_signed_cert" - certificate_body = "${tls_self_signed_cert.example.cert_pem}" - private_key = "${tls_private_key.example.private_key_pem}" + name = "example_self_signed_cert" + certificate_body = "${tls_self_signed_cert.example.cert_pem}" + private_key = "${tls_private_key.example.private_key_pem}" } ``` diff --git a/website/source/docs/providers/tls/r/cert_request.html.md b/website/source/docs/providers/tls/r/cert_request.html.md index 8869aeac6..3a71583fd 100644 --- a/website/source/docs/providers/tls/r/cert_request.html.md +++ b/website/source/docs/providers/tls/r/cert_request.html.md @@ -26,15 +26,15 @@ resource form. ## Example Usage -``` +```hcl resource "tls_cert_request" "example" { - key_algorithm = "ECDSA" - private_key_pem = "${file(\"private_key.pem\")}" + key_algorithm = "ECDSA" + private_key_pem = "${file("private_key.pem")}" - subject { - common_name = "example.com" - organization = "ACME Examples, Inc" - } + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } } ``` diff --git a/website/source/docs/providers/tls/r/locally_signed_cert.html.md b/website/source/docs/providers/tls/r/locally_signed_cert.html.md index ebd13fd54..a022c2925 100644 --- a/website/source/docs/providers/tls/r/locally_signed_cert.html.md +++ b/website/source/docs/providers/tls/r/locally_signed_cert.html.md @@ -17,21 +17,20 @@ or when deployed internally to an organization. ## Example Usage -``` +```hcl resource "tls_locally_signed_cert" "example" { - cert_request_pem = "${file(\"cert_request.pem\")}" + cert_request_pem = "${file("cert_request.pem")}" + ca_key_algorithm = "ECDSA" + ca_private_key_pem = "${file("ca_private_key.pem")}" + ca_cert_pem = "${file("ca_cert.pem")}" - ca_key_algorithm = "ECDSA" - ca_private_key_pem = "${file(\"ca_private_key.pem\")}" - ca_cert_pem = "${file(\"ca_cert.pem\")}" + validity_period_hours = 12 - validity_period_hours = 12 - - allowed_uses = [ - "key_encipherment", - "digital_signature", - "server_auth", - ] + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] } ``` diff --git a/website/source/docs/providers/tls/r/private_key.html.md b/website/source/docs/providers/tls/r/private_key.html.md index c0d6d1beb..06d4fc4bc 100644 --- a/website/source/docs/providers/tls/r/private_key.html.md +++ b/website/source/docs/providers/tls/r/private_key.html.md @@ -23,10 +23,10 @@ state and does not create any external managed resources. ## Example Usage -``` +```hcl resource "tls_private_key" "example" { - algorithm = "ECDSA" - ecdsa_curve = "P384" + algorithm = "ECDSA" + ecdsa_curve = "P384" } ``` diff --git a/website/source/docs/providers/tls/r/self_signed_cert.html.md b/website/source/docs/providers/tls/r/self_signed_cert.html.md index f2a047f4f..60cf5bcf1 100644 --- a/website/source/docs/providers/tls/r/self_signed_cert.html.md +++ b/website/source/docs/providers/tls/r/self_signed_cert.html.md @@ -27,23 +27,23 @@ Load Balancer*, *Elastic Beanstalk*, *CloudFront* or *OpsWorks*. ## Example Usage -``` +```hcl resource "tls_self_signed_cert" "example" { - key_algorithm = "ECDSA" - private_key_pem = "${file(\"private_key.pem\")}" + key_algorithm = "ECDSA" + private_key_pem = "${file(\"private_key.pem\")}" - subject { - common_name = "example.com" - organization = "ACME Examples, Inc" - } + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } - validity_period_hours = 12 + validity_period_hours = 12 - allowed_uses = [ - "key_encipherment", - "digital_signature", - "server_auth", - ] + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] } ```