diff --git a/00-backend.tf b/00-backend.tf new file mode 100644 index 0000000..1170dda --- /dev/null +++ b/00-backend.tf @@ -0,0 +1,3 @@ +/*terraform { + backend "s3" {} +}*/ \ No newline at end of file diff --git a/00-provider.tf b/00-provider.tf new file mode 100644 index 0000000..b3ba6c7 --- /dev/null +++ b/00-provider.tf @@ -0,0 +1,26 @@ +/*Copyright 2025 STACKIT GmbH & Co. KG + +Use of this source code is governed by an MIT-style +license that can be found in the LICENSE file or at +https://opensource.org/licenses/MIT.*/ + +terraform { + required_version = ">= 0.14.0" + required_providers { + stackit = { + source = "stackitcloud/stackit" + version = "0.69.0" + } + random = { + source = "hashicorp/random" + version = "3.6.3" + } + } +} + +provider "stackit" { + default_region = var.stackit_region + service_account_key_path = var.stackit_service_account_key_path + experiments = ["routing-tables", "network"] + enable_beta_resources = true +} \ No newline at end of file diff --git a/01-variables.tf b/01-variables.tf new file mode 100644 index 0000000..dead8be --- /dev/null +++ b/01-variables.tf @@ -0,0 +1,20 @@ +/*Copyright 2025 STACKIT GmbH & Co. KG + +Use of this source code is governed by an MIT-style +license that can be found in the LICENSE file or at +https://opensource.org/licenses/MIT.*/ + +variable "stackit_region" { + type = string + default = "eu01" +} + +variable "stackit_service_account_key_path" { + type = string + default = "keys/sa-key.json" +} + +variable "stackit_project_id" { + type = string + default = "XXXX-XXXX-XXXX-XXXX" +} \ No newline at end of file diff --git a/02-example.tf b/02-example.tf new file mode 100644 index 0000000..969f3b5 --- /dev/null +++ b/02-example.tf @@ -0,0 +1,10 @@ +/*Copyright 2025 STACKIT GmbH & Co. KG + +Use of this source code is governed by an MIT-style +license that can be found in the LICENSE file or at +https://opensource.org/licenses/MIT.*/ + +resource "stackit_network" "example" { + project_id = var.stackit_project_id + name = "example" +} \ No newline at end of file diff --git a/README.md b/README.md index 99c3e54..e080c2f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The main goal of this Best Practice (BP) is to [briefly describe the primary ben ```console /* -Copyright 2025 STACKIT GmbH & Co. KG +Copyright 2025 STACKIT GmbH & Co. KG Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at diff --git a/backend.conf.example b/backend.conf.example new file mode 100644 index 0000000..b31c248 --- /dev/null +++ b/backend.conf.example @@ -0,0 +1,8 @@ +bucket = "" +key = "" +endpoint = "https://object.storage.eu01.onstackit.cloud" +region = "eu01" +skip_credentials_validation = true +skip_region_validation = true +access_key = "" +secret_key = "" \ No newline at end of file