refactoring
This commit is contained in:
parent
e446d33a51
commit
39b3f988ef
5 changed files with 20 additions and 20 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
||||||
Copyright 2024 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
Copyright 2024-2025 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
||||||
|
|
||||||
Use of this source code is governed by an MIT-style
|
Use of this source code is governed by an MIT-style
|
||||||
license that can be found in the LICENSE file or at
|
license that can be found in the LICENSE file or at
|
||||||
|
|
@ -12,14 +12,14 @@ terraform {
|
||||||
required_version = ">= 0.14.0"
|
required_version = ">= 0.14.0"
|
||||||
required_providers {
|
required_providers {
|
||||||
stackit = {
|
stackit = {
|
||||||
source = "stackitcloud/stackit"
|
source = "stackitcloud/stackit"
|
||||||
version = "0.47.0"
|
version = "0.47.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "stackit" {
|
provider "stackit" {
|
||||||
default_region = "eu01"
|
default_region = "eu01"
|
||||||
service_account_token = var.STACKIT_SERVICE_ACCOUNT_TOKEN
|
service_account_token = var.STACKIT_SERVICE_ACCOUNT_TOKEN
|
||||||
enable_beta_resources = true
|
enable_beta_resources = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
||||||
Copyright 2024 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
Copyright 2024-2025 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
||||||
|
|
||||||
Use of this source code is governed by an MIT-style
|
Use of this source code is governed by an MIT-style
|
||||||
license that can be found in the LICENSE file or at
|
license that can be found in the LICENSE file or at
|
||||||
|
|
@ -42,4 +42,4 @@ variable "STACKIT_PROJECT_ID" {
|
||||||
variable "STACKIT_SERVICE_ACCOUNT_TOKEN" {
|
variable "STACKIT_SERVICE_ACCOUNT_TOKEN" {
|
||||||
type = string
|
type = string
|
||||||
description = ""
|
description = ""
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
||||||
Copyright 2024 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
Copyright 2024-2025 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
||||||
|
|
||||||
Use of this source code is governed by an MIT-style
|
Use of this source code is governed by an MIT-style
|
||||||
license that can be found in the LICENSE file or at
|
license that can be found in the LICENSE file or at
|
||||||
|
|
@ -9,7 +9,7 @@ https://opensource.org/licenses/MIT.
|
||||||
|
|
||||||
# Local copy of the Image
|
# Local copy of the Image
|
||||||
resource "null_resource" "pfsense_image_file" {
|
resource "null_resource" "pfsense_image_file" {
|
||||||
triggers = {
|
triggers = {
|
||||||
always_run = timestamp()
|
always_run = timestamp()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -20,14 +20,14 @@ resource "null_resource" "pfsense_image_file" {
|
||||||
|
|
||||||
# Upload VPN Appliance Image to STACKIT
|
# Upload VPN Appliance Image to STACKIT
|
||||||
resource "stackit_image" "pfsense_image" {
|
resource "stackit_image" "pfsense_image" {
|
||||||
project_id = var.STACKIT_PROJECT_ID
|
project_id = var.STACKIT_PROJECT_ID
|
||||||
name = "pfsense-2.7.2-amd64-image"
|
name = "pfsense-2.7.2-amd64-image"
|
||||||
local_file_path = "./pfsense.qcow2"
|
local_file_path = "./pfsense.qcow2"
|
||||||
disk_format = "qcow2"
|
disk_format = "qcow2"
|
||||||
depends_on = [null_resource.pfsense_image_file]
|
depends_on = [null_resource.pfsense_image_file]
|
||||||
min_disk_size = 10
|
min_disk_size = 10
|
||||||
min_ram = 2
|
min_ram = 2
|
||||||
config = {
|
config = {
|
||||||
uefi = false
|
uefi = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
Copyright 2023 Schwarz IT KG <markus.brunsch@mail.schwarz>
|
||||||
Copyright 2024 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
Copyright 2024-2025 STACKIT GmbH & Co. KG <markus.brunsch@stackit.cloud>
|
||||||
|
|
||||||
Use of this source code is governed by an MIT-style
|
Use of this source code is governed by an MIT-style
|
||||||
license that can be found in the LICENSE file or at
|
license that can be found in the LICENSE file or at
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ resource "stackit_volume" "pfsense_vol" {
|
||||||
size = 16
|
size = 16
|
||||||
performance_class = "storage_premium_perf4"
|
performance_class = "storage_premium_perf4"
|
||||||
source = {
|
source = {
|
||||||
id = stackit_image.pfsense_image.image_id
|
id = stackit_image.pfsense_image.image_id
|
||||||
type = "image"
|
type = "image"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "stackit_server" "pfsense_Server" {
|
resource "stackit_server" "pfsense_Server" {
|
||||||
|
|
@ -34,10 +34,10 @@ resource "stackit_server_network_interface_attach" "nic-attachment-lan" {
|
||||||
project_id = var.STACKIT_PROJECT_ID
|
project_id = var.STACKIT_PROJECT_ID
|
||||||
server_id = stackit_server.pfsense_Server.server_id
|
server_id = stackit_server.pfsense_Server.server_id
|
||||||
network_interface_id = stackit_network_interface.nic_lan.network_interface_id
|
network_interface_id = stackit_network_interface.nic_lan.network_interface_id
|
||||||
depends_on = [ stackit_server_network_interface_attach.nic-attachment-wan ]
|
depends_on = [stackit_server_network_interface_attach.nic-attachment-wan]
|
||||||
}
|
}
|
||||||
resource "stackit_server_network_interface_attach" "nic-attachment-wan" {
|
resource "stackit_server_network_interface_attach" "nic-attachment-wan" {
|
||||||
project_id = var.STACKIT_PROJECT_ID
|
project_id = var.STACKIT_PROJECT_ID
|
||||||
server_id = stackit_server.pfsense_Server.server_id
|
server_id = stackit_server.pfsense_Server.server_id
|
||||||
network_interface_id = stackit_network_interface.nic_wan.network_interface_id
|
network_interface_id = stackit_network_interface.nic_wan.network_interface_id
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue