terraform-google-modules/terraform-google-scheduled-function

Support for create_bucket argument.

zcherry17 opened this issue · 2 comments

TL;DR

The event-function module has a create_bucket input argument that should also be supported by this module.
The inclusion of this input argument permits the use case of using a bucket that already exists for the storage of function deployment sources when create_bucket is false and bucket_name points to an existing bucket.

Terraform Resources

https://registry.terraform.io/modules/terraform-google-modules/event-function/google/latest?tab=inputs

Detailed design

In main.tf:

module "main" {
    ...
    create_bucket = var.function_create_bucket
    ...
}

In variables.tf:

variable "function_create_bucket" {
    type = bool
    default = true
    description = "Whether to create a new bucket or use an existing one. If false, `bucket_name` should reference the name of the alternate bucket to use."
}

Additional information

I am more than happy to create a PR for this, and I think this should be supported since finer control is always nice, especially since that finer control is already supported by the underlying event functions module this module makes use of.

Happy to review a PR for this!

Does something like #147 work?