Difference between revisions of "Terraform function: slice"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 5: | Line 5: | ||
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/complete/main.tf | https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/complete/main.tf | ||
locals { | locals { | ||
− | name = "ex-${replace(basename(path.cwd), "_", "-")}" | + | name = "ex-${[[replace]](basename(path.cwd), "_", "-")}" |
region = "eu-west-1" | region = "eu-west-1" | ||
Latest revision as of 07:52, 7 March 2023
slice
extracts some consecutive elements from within a list
.
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/examples/complete/main.tf
locals { name = "ex-${replace(basename(path.cwd), "_", "-")}" region = "eu-west-1" vpc_cidr = "10.0.0.0/16" azs = slice(data.aws_availability_zones.available.names, 0, 3) tags = { Example = local.name GithubRepo = "terraform-aws-eks" GithubOrg = "terraform-aws-modules" } }
See also[edit]
Advertising: