diff --git a/examples/automatic-labelling-from-repository/main.tf b/examples/automatic-labelling-from-repository/main.tf index 72d6625..828b521 100644 --- a/examples/automatic-labelling-from-repository/main.tf +++ b/examples/automatic-labelling-from-repository/main.tf @@ -39,14 +39,6 @@ resource "null_resource" "configure_repository" { } } -data "null_data_source" "main" { - inputs = { - source_repository_url = "https://source.developers.google.com/projects/${var.project_id}/repos/${random_pet.main.id}/moveable-aliases/master/paths/" - } - - depends_on = [null_resource.configure_repository] -} - module "event_project_log_entry" { source = "../../modules/event-project-log-entry" @@ -71,11 +63,12 @@ module "repository_function" { name = random_pet.main.id project_id = var.project_id region = var.region - source_repository_url = data.null_data_source.main.outputs["source_repository_url"] + source_repository_url = "https://source.developers.google.com/projects/${var.project_id}/repos/${random_pet.main.id}/moveable-aliases/master/paths/" timeouts = { update = "10m" } + depends_on = [null_resource.configure_repository] } resource "null_resource" "wait_for_function" { diff --git a/main.tf b/main.tf index e32673e..da79b14 100644 --- a/main.tf +++ b/main.tf @@ -39,23 +39,13 @@ resource "null_resource" "dependent_files" { } } -data "null_data_source" "wait_for_files" { - inputs = { - # This ensures that this data resource will not be evaluated until - # after the null_resource has been created. - dependent_files_id = null_resource.dependent_files.id - - # This value gives us something to implicitly depend on - # in the archive_file below. - source_dir = pathexpand(var.source_directory) - } -} - 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"] + source_dir = pathexpand(var.source_directory) excludes = var.files_to_exclude_in_source_dir + + depends_on = [null_resource.dependent_files] }