Merge pull request #16041 from justincampbell/website-local-values-usage-example

docs: Add local values usage example
This commit is contained in:
Justin Campbell 2017-09-07 18:03:13 -04:00 committed by GitHub
commit 1f63a96b10
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