frbender / terraform-bazel-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example for Terraform Toolchain

Setup

Add this to the WORKSPACE:

# this is probably already set up
workspace(name = "anotherbazeltest")

load("//rules_terraform:toolchain.bzl", "terraform_register_toolchains")
terraform_register_toolchains()

Usage

The terraform rule manages everything:

load("@anotherbazeltest//rules_terraform:defs.bzl", "terraform")

terraform(
    name = "example",
    srcs = glob(["*.tf"]),
)

On the console, you can:

$ bazel build //package:project.init
$ bazel build //package:project.plan

About


Languages

Language:Starlark 99.1%Language:HCL 0.7%Language:Python 0.2%