docs: Add local values usage example

This commit is contained in:
Justin Campbell 2017-09-07 13:49:33 -04:00
parent 9f570a0c84
commit fd4cc78839
1 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,12 @@ locals {
default_name_prefix = "${var.project_name}-web"
name_prefix = "${var.name_prefix != "" ? var.name_prefix : local.default_name_prefix}"
}
# Using a local value
resource "aws_s3_bucket" "files" {
bucket = "${local.name_prefix}-files"
# ...
}
```
## Description