From 076571c882c87fb81dc8a0991490845d60d8b478 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 5 Dec 2018 10:28:50 -0800 Subject: [PATCH] Add docs for new cloud composer beta fields and use beta api everywhere (#2573) --- google/composer_operation.go | 2 +- google/config.go | 2 +- google/resource_composer_environment.go | 2 +- google/resource_composer_environment_test.go | 2 +- .../docs/r/composer_environment.html.markdown | 21 ++++++++++++------- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/google/composer_operation.go b/google/composer_operation.go index 7d838c5e..75350231 100644 --- a/google/composer_operation.go +++ b/google/composer_operation.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hashicorp/terraform/helper/resource" - composer "google.golang.org/api/composer/v1" + composer "google.golang.org/api/composer/v1beta1" ) type ComposerOperationWaiter struct { diff --git a/google/config.go b/google/config.go index 7fed6477..4c5f3f31 100644 --- a/google/config.go +++ b/google/config.go @@ -25,7 +25,7 @@ import ( "google.golang.org/api/cloudkms/v1" "google.golang.org/api/cloudresourcemanager/v1" resourceManagerV2Beta1 "google.golang.org/api/cloudresourcemanager/v2beta1" - "google.golang.org/api/composer/v1" + "google.golang.org/api/composer/v1beta1" computeBeta "google.golang.org/api/compute/v0.beta" "google.golang.org/api/compute/v1" "google.golang.org/api/container/v1" diff --git a/google/resource_composer_environment.go b/google/resource_composer_environment.go index 2bc6e02d..ecf6fbcc 100644 --- a/google/resource_composer_environment.go +++ b/google/resource_composer_environment.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - "google.golang.org/api/composer/v1" + "google.golang.org/api/composer/v1beta1" ) const ( diff --git a/google/resource_composer_environment_test.go b/google/resource_composer_environment_test.go index 0bc16e78..f2b759d0 100644 --- a/google/resource_composer_environment_test.go +++ b/google/resource_composer_environment_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" - "google.golang.org/api/composer/v1" + "google.golang.org/api/composer/v1beta1" "google.golang.org/api/storage/v1" ) diff --git a/website/docs/r/composer_environment.html.markdown b/website/docs/r/composer_environment.html.markdown index 2e57de80..9277506d 100644 --- a/website/docs/r/composer_environment.html.markdown +++ b/website/docs/r/composer_environment.html.markdown @@ -272,6 +272,20 @@ The `software_config` block supports: SQL_USER ``` +* `image_version` (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) - + The version of the software running in the environment. This encapsulates both the version of Cloud Composer + functionality and the version of Apache Airflow. It must match the regular expression + `composer-[0-9]+\.[0-9]+(\.[0-9]+)?-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + The Cloud Composer portion of the version is a semantic version. + The portion of the image version following 'airflow-' is an official Apache Airflow repository release name. + See [documentation](https://cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments#softwareconfig) + for allowed release names. This field can only be set in the [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) + provider, but is an output-only attribute in the GA provider. + +* `python_version` (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) - + The major version of Python used to run the Apache Airflow scheduler, worker, and webserver processes. + Can be set to '2' or '3'. If not specified, the default is '2'. Cannot be updated. + ## Attributes Reference In addition to the arguments listed above, the following computed attributes are exported: @@ -290,13 +304,6 @@ In addition to the arguments listed above, the following computed attributes are The URI of the Apache Airflow Web UI hosted within this environment. -* `config.software_config.image_version` - - The version of the software running in the environment. This encapsulates both the version of Cloud Composer - functionality and the version of Apache Airflow. It must match the regular expression - `composer-[0-9]+\.[0-9]+(\.[0-9]+)?-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. - The Cloud Composer portion of the version is a semantic version. - The portion of the image version following 'airflow-' is an official Apache Airflow repository release name. - ## Timeouts This resource provides the following