Difference between revisions of "Terraform splat expression"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
* https://www.terraform.io/docs/language/expressions/splat.html
+
* https://www.terraform.io/docs/language/expressions/splat.html provides a more concise way to express a common operation that could otherwise be performed with a [[for]] expression.
  
  

Revision as of 10:05, 17 February 2022


https://www.hashicorp.com/blog/hashicorp-terraform-0-12-preview-for-and-for-each

resource "aws_s3_bucket" "myexample" {
  # ...

  dynamic "website" {
    for_each = var.mywebsitevar[*]
    content {
      index_document = website.value.index_document
      error_document = website.value.error_document
    }
  }
}


Related terms

See also

Advertising: