Skip to content

Composer V3. Optional field time_zone in scheduled_snapshots_config needs to be set explicitly. #164

@rafitadiaz

Description

@rafitadiaz

TL;DR

The documentation for scheduled_snapshots_config indicates that the time_zone field is optional. However, if time_zone is not set, resource creation fails with the following error:

Invalid time zone: . Accepted timezones are: UTC, UTC-[hh], UTC+[hh]. Examples: UTC+02, UTC-06, badRequest.

Our code was:

    recovery_config {
      scheduled_snapshots_config {
        enabled = true
        snapshot_location = "gs://composer-snapshots"
        snapshot_creation_schedule = "15 20 * * *" # Everyday an 20:15
      }
    }

Adding the optional filed like this solved the problem:

        time_zone = "UTC"

Expected behavior

No response

Observed behavior

No response

Terraform Configuration

Execution error with the message: 
`Invalid time zone: . Accepted timezones are: UTC, UTC-[hh], UTC+[hh]. Examples: UTC+02, UTC-06, badRequest.`

Terraform Version

1.8.5

Terraform Provider Versions

~6

Additional information

Or a default value should be set or the documentation should say that all those fields are mandatory if the scheduled_snapshots_config is set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamWork required on Terraform core or provider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions