Skip to content

Commit

Permalink
Add support for Composer maintenance window configuration (#4961) (#9595
Browse files Browse the repository at this point in the history
)

* Add support for Composer maintenance window configuration

* Add support for Composer maintenance window configuration

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jul 19, 2021
1 parent 45c0823 commit 6faebc5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/4961.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
composer: added field `maintenance_window` to resource `google_composer_environment` (beta)
```
1 change: 0 additions & 1 deletion google/resource_composer_environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ resource "google_composer_environment" "test" {
}
}
}
depends_on = [google_project_iam_member.composer-worker]
}
Expand Down
20 changes: 20 additions & 0 deletions website/docs/r/composer_environment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ The `config` block supports:
* `encryption_config` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
The encryption options for the Cloud Composer environment and its dependencies.

* `maintenance_window` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
The configuration settings for Cloud Composer maintenance window.

The `node_config` block supports:

Expand Down Expand Up @@ -410,6 +414,22 @@ The `encryption_config` block supports:
be the fully qualified resource name,
i.e. projects/project-id/locations/location/keyRings/keyring/cryptoKeys/key. Cannot be updated.

The `maintenance_window` block supports:

* `start_time` -
(Required)
Start time of the first recurrence of the maintenance window.

* `end_time` -
(Required)
Maintenance window end time. It is used only to calculate the duration of the maintenance window.
The value for end-time must be in the future, relative to 'start_time'.

* `recurrence` -
(Required)
Maintenance window recurrence. Format is a subset of RFC-5545 (https://tools.ietf.org/html/rfc5545) 'RRULE'.
The only allowed values for 'FREQ' field are 'FREQ=DAILY' and 'FREQ=WEEKLY;BYDAY=...'.
Example values: 'FREQ=WEEKLY;BYDAY=TU,WE', 'FREQ=DAILY'.

## Attributes Reference

Expand Down

1 comment on commit 6faebc5

@saurav-bengani-sada
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to use below values for setting up the maintenance widow but TF apply is throwing error:

composer_maintenance_start_time = "1600"
composer_maintenance_stop_time = "2000"
composer_maintenance_recurrence = "'FREQ=WEEKLY;BYDAY=MO,WE'"

Error: Unsupported argument

│ on main.tf line 47:
│ 47: composer_maintenance_start_time = "1600"

│ An argument named "composer_maintenance_start_time" is not expected here.


│ Error: Unsupported argument

│ on main.tf line 48:
│ 48: composer_maintenance_stop_time = "2000"

│ An argument named "composer_maintenance_stop_time" is not expected here.


│ Error: Unsupported argument

│ on main.tf line 49:
│ 49: composer_maintenance_recurrence = "'FREQ=WEEKLY;BYDAY=MO,WE'"

│ An argument named "composer_maintenance_recurrence" is not expected here.

time=2021-08-03T12:16:43-04:00 level=error msg=Hit multiple errors:
Hit multiple errors:
exit status 1

Please sign in to comment.