Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Latest commit

 

History

History
600 lines (520 loc) · 16.2 KB

README.md

File metadata and controls

600 lines (520 loc) · 16.2 KB

Getting Started

WORKSPACE file

git_repository(
    name = "rules_terraform",
    commit = "c06d18c0117d0bfd348e89758ad7bad79184294f", # 2019-01-23 19:07:09 -0500
    remote = "https://github.com/ceason/rules_terraform.git",
)

load("@rules_terraform//terraform:dependencies.bzl", "terraform_repositories")

terraform_repositories()

Usage Examples

Rules

Experimental

terraform_module

terraform_module(name, data, deps, embed, modulepath, plugins, srcs)

Attributes

name Name; required

A unique name for this target.

data List of labels; optional
deps List of labels; optional
embed List of labels; optional

Merge the content of other s (or other 'ModuleInfo' providing deps) into this one.

modulepath String; optional
plugins List of labels; optional

Custom Terraform plugins that this module requires.

srcs List of labels; optional

terraform_workspace

terraform_workspace(name, data, deps, embed, plugins, srcs)

Attributes

name Name; required

A unique name for this target.

data List of labels; optional
deps List of labels; optional
embed List of labels; optional

Merge the content of other s (or other 'ModuleInfo' providing deps) into this one.

plugins List of labels; optional

Custom Terraform plugins that this workspace requires.

srcs List of labels; optional

terraform_integration_test

terraform_integration_test(name, srctest, terraform_workspace)

Attributes

name Name; required

A unique name for this target.

srctest Label; required

Label of source test to wrap

terraform_workspace Label; required

TF Workspace to spin up before testing & tear down after testing.

terraform_provider

terraform_provider(name, file, provider_name, version)

Attributes

name Name; required

A unique name for this target.

file Label; optional
provider_name String; optional

Name of terraform provider.

version String; optional

terraform_k8s_manifest

terraform_k8s_manifest(name, deps, srcs)

Attributes

name Name; required

A unique name for this target.

deps List of labels; optional

Embeddable targets (eg container_push).

srcs List of labels; optional

embedded_reference

embedded_reference(name, deps, out, src)

Attributes

name Name; required

A unique name for this target.

deps List of labels; required

Embeddable targets (eg container_push, content_addressable_file, etc).

out Label; required

Single output file.

src Label; required

Single template file.

file_uploader

file_uploader(name, sha256, src, url_prefix)

Attributes

name Name; required

A unique name for this target.

sha256 Label; optional
src Label; required
url_prefix String; required

Prefix of URL where this file should be published (eg 's3://my-bucket-name/')

ghrelease_publisher

ghrelease_publisher(name, asset_upload_prefix, branch, deps, docs, docs_branch, semver_env_var, version)

Attributes

name Name; required

A unique name for this target.

asset_upload_prefix String; optional

Upload assets to the specified bucket (eg. s3://s3-bucket-name/optional/key/prefix). Supports make variable expansion. Incompatible with --draft=true.

branch String; optional
deps List of labels; optional
docs List of labels; optional
docs_branch String; optional
semver_env_var String; optional

UNIMPLEMENTED. Expose the SEMVER via this environment variable (eg for use in stamping via --workspace_status_command).

version String; required

ghrelease_assets

ghrelease_assets(name, bazel_flags, data, env)

Attributes

name Name; required

A unique name for this target.

bazel_flags List of strings; optional
data List of labels; optional
env Dictionary: String -> String; optional

ghrelease_test_suite

ghrelease_test_suite(name, bazel_flags, env, tests)

Attributes

name Name; required

A unique name for this target.

bazel_flags List of strings; optional
env Dictionary: String -> String; optional
tests List of strings; optional