Move modules into a dedicated folder

This commit is contained in:
Daniel_Groß 2025-08-25 16:14:28 +02:00
parent cb8dec0e30
commit 000a129efc
Signed by: daniel.gross
SSH key fingerprint: SHA256:tyyj1WVL1JmKHP6+jZjOtTzMj9U13qRk7jUcGI/zkRQ
8 changed files with 10 additions and 12 deletions

View file

@ -17,7 +17,3 @@ provider "stackit" {
service_account_key_path = var.service_account_key_path
enable_beta_resources = true
}
module "project" {
source = "./project"
}

View file

@ -43,10 +43,10 @@ resource "stackit_network_interface" "p2_lan1" {
network_id = stackit_network.p2_lan_network1.network_id
security = false
name = "P2LAN1"
//security_group_ids = [ stackit_security_group.example.security_group_id ]
security_group_ids = [ stackit_security_group.example.security_group_id ]
}
/* this is for adding a second network interface to the core project (for WAN access).
/* this is for adding a second network interface to the core project (for WAN access).*/
resource "stackit_network" "p2_wan_network1" {
project_id = module.project.project_info["project2"].project_id
name = "wan"
@ -60,7 +60,7 @@ resource "stackit_network_interface" "p2_wan_interface1" {
security = false
name = "wan_if"
}
*/
/**/
/* ---------- project 3 backup ------------------ */
resource "stackit_network" "p3_lan_network1" {
@ -125,7 +125,7 @@ resource "stackit_network_interface" "p6_lan1" {
network_id = stackit_network.p6_lan_network1.network_id
security = false
name = "P6LAN1"
//security_group_ids = [ stackit_security_group.example_beta.security_group_id ]
security_group_ids = [ stackit_security_group.example_beta.security_group_id ]
}
/* ---------- public IP configuration------------- */
@ -138,19 +138,18 @@ resource "stackit_public_ip" "wan_ip_beta" {
network_interface_id = stackit_network_interface.wan_beta.network_interface_id
}
*/ this is for adding a public IP to the second project (core) for WAN access.
/* this is for adding a public IP to the second project (core) for WAN access. */
resource "stackit_public_ip" "wan_server" {
project_id = module.project.project_info["project2"].project_id
network_interface_id = stackit_network_interface.p2_wan_interface1.network_interface_id
}
*/
/* Output the public IPs for both projects */
output "public_ips" {
value = {
"pfsense-alpha" = stackit_public_ip.wan_ip.ip
"pfsense-beta" = stackit_public_ip.wan_ip_beta.ip
//"wan_server" = stackit_public_ip.wan_server.ip
"wan_server" = stackit_public_ip.wan_server.ip
}
}

View file

@ -1,6 +1,6 @@
// keypair adding to the server
resource "stackit_key_pair" "keypair" {
name = "073a0ea0-9282-4ed6-8990-d5c4bff7cc3f"
public_key = chomp(file("/root/.ssh/id_ed25519.pub"))
public_key = chomp(file(var.public_key_file))
}

3
modules.tf Normal file
View file

@ -0,0 +1,3 @@
module "project" {
source = "./modules/project"
}