Skip to content

Commit

Permalink
Add the hcl label to Terraform snippets (gravitational#30055)
Browse files Browse the repository at this point in the history
The docs engine now supports syntax highlighting for HCL snippets. This
change enables HCL syntax highlighting for some Terraform guides in the
docs.
  • Loading branch information
ptgott authored Aug 7, 2023
1 parent 2da57c5 commit ab35d24
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/pages/access-controls/login-rules/terraform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ provider and create two example Login Rules.
Make sure to update the `addr = "teleport.example.com:443"` field with the
public address of your Teleport Proxy.

```
```hcl
(!examples/resources/terraform/terraform-login-rules.tf!)
```

Expand Down
12 changes: 6 additions & 6 deletions docs/pages/agents/deploy-agents-terraform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pool in your infrastructure.

The file `agent-pool.tf` configures EC2 instances and Teleport join tokens:

```text
```hcl
(!examples/agent-pool-terraform/agent-pool.tf!)
```

Expand Down Expand Up @@ -150,14 +150,14 @@ configuration.
The Terraform configuration we show in this guide relies on the following inputs
(`examples/agent-pool-terraform/inputs.tf`):

```text
```hcl
(!examples/agent-pool-terraform/inputs.tf!)
```

In your `agent-pool-terraform` project directory, create a file called
`main.auto.tfvars` with the following content:

```text
```hcl
agent_count=2
proxy_service_address="mytenant.teleport.sh"
aws_region=""
Expand Down Expand Up @@ -187,7 +187,7 @@ Finally, make sure you are using the latest supported version of the Teleport
Terraform provider. The `required_providers` block for the Teleport provider
includes a placeholder value:

```text
```hcl
(!examples/agent-pool-terraform/provider.tf!)
```

Expand Down Expand Up @@ -246,7 +246,7 @@ reference](../reference/terraform-provider.mdx).
<Tabs>
<TabItem label="Application">

```text
```hcl
resource "teleport_app" "example" {
metadata = {
name = "example"
Expand All @@ -267,7 +267,7 @@ resource "teleport_app" "example" {
</TabItem>
<TabItem label="Database">

```text
```hcl
resource "teleport_database" "example" {
metadata = {
name = "example"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ To prepare a Terraform configuration file:

<Tabs>
<TabItem scope={["cloud","team"]} label="Cloud-Hosted">
```
```hcl
(!examples/resources/terraform/terraform-user-role-cloud.tf!)
```
</TabItem>
<TabItem scope={["oss", "enterprise"]} label="Self-Hosted">
```
```hcl
(!examples/resources/terraform/terraform-user-role-self-hosted.tf!)
```
</TabItem>
Expand Down

0 comments on commit ab35d24

Please sign in to comment.