From c667deea19f4dca996f7a284a5e5c818935c0a3f Mon Sep 17 00:00:00 2001 From: zimbatm <zimbatm@zimbatm.com> Date: Wed, 25 Jan 2023 09:58:13 +0100 Subject: [PATCH] terraform: remove main A good main.tf acts as an entrypoint to a module and is typically used when the module is smaller. For larger module it's best to split things up and try to map the resources with the filename to make them easier to find. --- terraform/terraform_backend.tf | 6 ++++++ terraform/{main.tf => terraform_providers.tf} | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 terraform/terraform_backend.tf rename terraform/{main.tf => terraform_providers.tf} (76%) diff --git a/terraform/terraform_backend.tf b/terraform/terraform_backend.tf new file mode 100644 index 0000000..4f676cf --- /dev/null +++ b/terraform/terraform_backend.tf @@ -0,0 +1,6 @@ +terraform { + backend "remote" { + organization = "nix-community" + workspaces { name = "nix-community" } + } +} diff --git a/terraform/main.tf b/terraform/terraform_providers.tf similarity index 76% rename from terraform/main.tf rename to terraform/terraform_providers.tf index 6bdbfc7..5e6464d 100644 --- a/terraform/main.tf +++ b/terraform/terraform_providers.tf @@ -1,9 +1,4 @@ terraform { - backend "remote" { - organization = "nix-community" - workspaces { name = "nix-community" } - } - required_providers { cloudflare = { source = "cloudflare/cloudflare"