@@ -230,6 +230,7 @@ module "data_processor" {
230230- ` timeout_seconds ` - Timeout for functions (60)
231231- ` environment_variables ` - Environment vars ({})
232232- ` secrets ` - Secret Manager secrets ([ ] )
233+ - ` tags ` - A map of tags to assign to all resources ({})
233234
234235### Cloud Run Job specific (when ` execution_type = "job" ` )
235236- ` job_cpu ` - CPU allocation (e.g., "1000m", "2") ("1000m")
@@ -389,6 +390,43 @@ Or use Cloud Build directly:
389390gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/YOUR_JOB_NAME:latest ./jobs/your-job
390391```
391392
393+ ## Resource Tagging
394+
395+ All resources created by this module are automatically tagged with common metadata:
396+
397+ ### Automatic Tags
398+ - ` module ` - Set to "scheduled-job"
399+ - ` job_name ` - The name of your function/job
400+ - ` execution_type ` - Either "function" or "job"
401+
402+ ### Custom Tags
403+ You can add custom tags using the ` tags ` variable:
404+
405+ ``` hcl
406+ module "my_function" {
407+ source = "git::https://github.com/Khan/terraform-modules.git//terraform/modules/scheduled-job?ref=v1.0.0"
408+
409+ job_name = "my-function"
410+ # ... other configuration
411+
412+ tags = {
413+ "environment" = "production"
414+ "team" = "data-engineering"
415+ "cost-center" = "infrastructure"
416+ "owner" = "data-team"
417+ }
418+ }
419+ ```
420+
421+ ### Supported Resources
422+ The following resources support tagging/labeling:
423+ - ** Storage Buckets** - Labels applied
424+ - ** Storage Objects** - Metadata applied
425+ - ** PubSub Topics** - Labels applied
426+ - ** Cloud Scheduler Jobs** - Labels applied
427+ - ** Cloud Functions** - Labels applied
428+ - ** Cloud Run Jobs** - Labels applied
429+
392430## Common Cron Patterns
393431
394432| Schedule | Description |
0 commit comments