Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Nemetz committed Jul 9, 2018
1 parent 01f8b5d commit b9953e4
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# terraform-local-boolean

[![CircleCI](https://circleci.com/gh/devops-workflow/terraform-local-boolean.svg?style=svg)](https://circleci.com/gh/devops-workflow/terraform-local-boolean)

Terraform module to simplify and expand boolean use
===
## Terraform module to simplify and expand boolean use

Since Terraform currently doesn't have a boolean variable type, this provides a consistent handling. The list of true values is also expanded.
Since Terraform currently doesn't have a boolean variable type, this provides a
consistent handling. The list of true values is also expanded.

Designed to simplify the use of booleans (especially where 1 variable is tested many times) and the using count to enable/disable resources.
Designed to simplify the use of booleans (especially where 1 variable is tested
many times) and the using count to enable/disable resources.

* Will handle any capitalization of the input value.
* Will return 1 for any true value, 0 for anything else.
* Current true values: true, t, 1, on, enable

All [devops-workflow](https://registry.terraform.io/search?q=devops-workflow&verified=false) modules will eventually use this.

**NOTE:** `local` refers to this using [locals](https://www.terraform.io/docs/configuration/locals.html) and does not create any resources. It just builds new variables.
**NOTE:** `local` refers to this using [locals](https://www.terraform.io/docs/configuration/locals.html)
and does not create any resources. It just builds new variables.

[This module at Terraform registry](https://registry.terraform.io/modules/devops-workflow/boolean/local)

Terraform registry: https://registry.terraform.io/modules/devops-workflow/boolean/local
### Example: If

Example: If
```hcl
module "boolean" {
source = "devops-workflow/boolean/local"
Expand All @@ -27,7 +32,8 @@ module "boolean" {
var = "${module.boolean.value ? "true setting" : "false setting"}"
```

Example: count for enabling/disabling a resource
### Example: count for enabling/disabling a resource

```hcl
module enabled" {
source = "devops-workflow/boolean/local"
Expand Down

0 comments on commit b9953e4

Please sign in to comment.