diff --git a/examples/automatic_labelling/main.tf b/examples/automatic_labelling/main.tf index e39247d..850c798 100644 --- a/examples/automatic_labelling/main.tf +++ b/examples/automatic_labelling/main.tf @@ -14,10 +14,6 @@ * limitations under the License. */ -resource "random_pet" "main" { - separator = "-" -} - module "event_function" { source = "../../" @@ -41,7 +37,7 @@ module "event_function" { ) }" - name = "${random_pet.main.id}" + name = "${var.name}" project_id = "${var.project_id}" region = "${var.region}" } diff --git a/examples/automatic_labelling/variables.tf b/examples/automatic_labelling/variables.tf index 0579e01..b3102f9 100644 --- a/examples/automatic_labelling/variables.tf +++ b/examples/automatic_labelling/variables.tf @@ -14,6 +14,11 @@ * limitations under the License. */ +variable "name" { + type = "string" + description = "The name to apply to any nameable resources." +} + variable "project_id" { type = "string" description = "The ID of the project to which resources will be applied." diff --git a/test/fixtures/automatic_labelling/main.tf b/test/fixtures/automatic_labelling/main.tf index 7e2874e..9de0018 100644 --- a/test/fixtures/automatic_labelling/main.tf +++ b/test/fixtures/automatic_labelling/main.tf @@ -30,10 +30,15 @@ provider "null" { version = "~> 1.0" } +resource "random_pet" "main" { + separator = "-" +} + module "automatic_labelling" { source = "../../../examples/automatic_labelling" project_id = "${var.project_id}" + name = "automatic-labelling-${random_pet.main.id}" region = "${var.region}" }