osbuild / gitlab-ci-terraform

Terraform definitions for gitlab-based osbuild CI.
3 stars 10 forks source link

Randomize subnet selection #33

Open croissanne opened 2 years ago

croissanne commented 2 years ago

image

We have 2 subnets, each with a max of 64 ipv4s. Can we use https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer (min 0, max 1) to switch between internal subnet ids https://github.com/osbuild/gitlab-ci-terraform/blob/main/aws/_base/data.tf#L20 ?

ondrejbudai commented 2 years ago

Even better, it would be sweet if we can detect which subnet is emptier. I think that should be totally possible in terraform.