I'm trying to create a Cloud Composer environment with a PyPI package from a private repository using Terraform. Cloud Composer supports private PyPI repositories. However, configuring a private repository requires an existing composer bucket.
When using Terraform to create an environment, the bucket and environment is created in one go. As far as I can see, the environment creation will fail before there is a chance to write the configuration file to the bucket. Is there any way to create a Cloud Composer environment with a private repository using Terraform?
This is roughly what I'm trying to do:
resource "google_composer_environment" "test" {
provider = google-beta
project = var.project_id
region = var.region
config {
software_config {
image_version = "composer-2.0.0-airflow-2.1.4"
pypi_packages = {
mypackage = "*" # from a private PyPI repo
}
...