Add boolean variable for controlling secret version management to avoid bootstrapping issues
Add a manage_secret_versions
boolean variable that default to true
. When enabled, the module will create an initial secret version and manage versions. When disabled, the module will not create an initial secret version and will not manage future versions.
Currently in the main branch, not setting secret_data
indicates that secret versions should not be managed. The solution suggested in this issue reduces the likelihood of new projects getting the Terraform error:
The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created.