0

The HTML files has a separate css stylesheet and svg images in it that are in different files.

resource "google_storage_bucket_object" "index" {
  name   = var.index_page
  source = var.htmlFile //add more stuff
  bucket = google_storage_bucket.website.name
}

1 Answers1

1

i think you can use Terraform fileset funcion. Put all your files in a directory and with a for_each iterate on the fileset.

resource "example_thing" "example" {
  for_each = fileset(path.module, "files/*")

  # other configuration using each.value
}

I hope is helpful :)

Danilo Cacace
  • 482
  • 2
  • 8