Skip to content

koki-develop/terraform-provider-html

Repository files navigation

HTML.tf

HTML × Terraform

The Next Generation HTML Builder.

GitHub release (latest by date) GitHub Workflow Status Go Report Card LICENSE

data "html_html" "main" {
  children = [data.html_body.main.html]
}

data "html_body" "main" {
  children = [
    data.html_h1.heading.html,
    data.html_p.message.html,
  ]
}

data "html_h1" "heading" {
  children = ["Hello, HTML.tf!"]
}

data "html_p" "message" {
  children = ["This HTML was generated by ${data.html_a.html_tf.html}."]
}

data "html_a" "html_tf" {
  href     = "https://registry.terraform.io/providers/koki-develop/html/latest/docs"
  children = ["HTML.tf"]
}

resource "local_file" "index_html" {
  filename = "index.html"
  content  = data.html_html.main.html
}
# <!DOCTYPE html>
# <html>
#   <body>
#     <h1>Hello, HTML.tf!</h1>
#     <p>This HTML was generated by <a href="https://registry.terraform.io/providers/koki-develop/html/latest/docs">HTML.tf</a>.</p>
#   </body>
# </html>
$ terraform init
$ terraform apply

Getting Started

HTML.tf is a Terraform provider that allows you to write HTML in Terraform configuration files. To use it, add the following provider configuration.

terraform {
  required_providers {
    html = {
      source = "koki-develop/html"
    }
  }
}

provider "html" {}

Next, run terraform init.

$ terraform init

That's it. You are ready to use HTML.tf.

Examples

Documentation

LICENSE

MIT

About

The Next Generation HTML Builder.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages