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()
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