mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-15 10:03:44 -06:00
website: Activate HCL syntax highlighting for Template provider docs
This commit is contained in:
parent
4a24b58fd8
commit
5fc7414076
@ -12,7 +12,7 @@ Renders a multi-part cloud-init config from source files.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Render a part using a `template_file`
|
||||
data "template_file" "script" {
|
||||
template = "${file("${path.module}/init.tpl")}"
|
||||
|
@ -16,7 +16,7 @@ Option 1: From a file:
|
||||
|
||||
Reference the template path:
|
||||
|
||||
```
|
||||
```hcl
|
||||
data "template_file" "init" {
|
||||
template = "${file("${path.module}/init.tpl")}"
|
||||
|
||||
@ -28,7 +28,7 @@ data "template_file" "init" {
|
||||
|
||||
Inside the file, reference the variable as such:
|
||||
|
||||
```
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
echo "CONSUL_ADDRESS = ${consul_address}" > /tmp/iplist
|
||||
@ -36,7 +36,7 @@ echo "CONSUL_ADDRESS = ${consul_address}" > /tmp/iplist
|
||||
|
||||
Option 2: Inline:
|
||||
|
||||
```
|
||||
```hcl
|
||||
data "template_file" "init" {
|
||||
template = "$${consul_address}:1234"
|
||||
|
||||
|
@ -15,7 +15,7 @@ Use the navigation to the left to read about the available data sources.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Template for initial configuration bash script
|
||||
data "template_file" "init" {
|
||||
template = "${file("init.tpl")}"
|
||||
@ -35,7 +35,7 @@ resource "aws_instance" "web" {
|
||||
|
||||
Or using an inline template:
|
||||
|
||||
```
|
||||
```hcl
|
||||
# Template for initial configuration bash script
|
||||
data "template_file" "init" {
|
||||
template = "$${consul_address}:1234"
|
||||
|
Loading…
Reference in New Issue
Block a user