0
votes

I want to deploy as many CodeBuild resources as many git branches have in my local repository via Terraform.

My current variable is set as in variables.tf:

variable "vcs_branches" {
    type        = list(string)
    default     = ["master"]
  }

And in .tfvars:

vcs_branches = $(git branch -r)

But it seems, no affect. Can anybody help me, how to achieve it?

You're just showing a standard Terraform variable definition. You aren't showing how you are using it to configure CodeBuild. - Mark B