website: syntax highlighting and hclfmt layout for TLS provider

This commit is contained in:
Martin Atkins 2017-04-07 16:54:00 -07:00
parent af05871e65
commit 853b411840
5 changed files with 57 additions and 58 deletions

View File

@ -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}"
}
```

View File

@ -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"
}
}
```

View File

@ -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",
]
}
```

View File

@ -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"
}
```

View File

@ -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",
]
}
```