Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support to excludes parameter #68

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module "localhost_function" {
| environment\_variables | A set of key/value environment variable pairs to assign to the function. | map(string) | `<map>` | no |
| event\_trigger | A source that fires events in response to a condition in another service. | map(string) | n/a | yes |
| event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | bool | `"false"` | no |
| files\_to\_exclude\_in\_source\_dir | Specify files to ignore when reading the source_dir | list(string) | `<list>` | no |
| ingress\_settings | The ingress settings for the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function. | string | `"ALLOW_ALL"` | no |
| labels | A set of key/value label pairs to assign to the Cloud Function. | map(string) | `<map>` | no |
| max\_instances | The maximum number of parallel executions of the function. | number | `"0"` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ data "archive_file" "main" {
type = "zip"
output_path = pathexpand("${var.source_directory}.zip")
source_dir = data.null_data_source.wait_for_files.outputs["source_dir"]
excludes = var.files_to_exclude_in_source_dir
}

resource "google_storage_bucket" "main" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ variable "source_dependent_files" {
default = []
}

variable "files_to_exclude_in_source_dir" {
type = list(string)
description = "Specify files to ignore when reading the source_dir"
default = []
}

variable "timeout_s" {
type = number
default = 60
Expand Down