Skip to content

Commit

Permalink
Make cloud composer environment image version updateable.
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
jmcarp authored and modular-magician committed May 21, 2019
1 parent dab8fa8 commit 86b4df8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions google/data_source_google_client_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ func dataSourceGoogleClientConfig() *schema.Resource {
Computed: true,
},

"zone": {
Type: schema.TypeString,
Computed: true,
},

"access_token": {
Type: schema.TypeString,
Computed: true,
Expand All @@ -35,6 +40,7 @@ func dataSourceClientConfigRead(d *schema.ResourceData, meta interface{}) error
d.SetId(time.Now().UTC().String())
d.Set("project", config.Project)
d.Set("region", config.Region)
d.Set("zone", config.Zone)

token, err := config.tokenSource.Token()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions google/data_source_google_client_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestAccDataSourceGoogleClientConfig_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(resourceName, "project"),
resource.TestCheckResourceAttrSet(resourceName, "region"),
resource.TestCheckResourceAttrSet(resourceName, "zone"),
resource.TestCheckResourceAttrSet(resourceName, "access_token"),
),
},
Expand Down
3 changes: 1 addition & 2 deletions google/resource_composer_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ func resourceComposerEnvironmentUpdate(d *schema.ResourceData, meta interface{})
}

if d.HasChange("config.0.software_config.0.airflow_config_overrides") {

patchObj := &composer.Environment{
patchObj := &composer.Envirconment{
Config: &composer.EnvironmentConfig{
SoftwareConfig: &composer.SoftwareConfig{
AirflowConfigOverrides: make(map[string]string),
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/datasource_client_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ In addition to the arguments listed above, the following attributes are exported

* `region` - The region to operate under.

* `zone` - The zone to operate under.

* `access_token` - The OAuth2 access token used by the client to authenticate against the Google Cloud API.

0 comments on commit 86b4df8

Please sign in to comment.