Skip to content

Commit

Permalink
fix: change required modules constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
KoLiBer committed Jul 20, 2022
1 parent b495267 commit 6b1e50e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 32 deletions.
34 changes: 17 additions & 17 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 1 addition & 15 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,7 @@ terraform {
required_providers {
hcloud = {
source = "hetznercloud/hcloud"
version = "1.33.2"
version = "~> 1.35.0"
}
}
}

resource "hcloud_network" "this" {
name = var.name
ip_range = var.cidr
}

resource "hcloud_network_subnet" "this" {
for_each = { for idx, val in var.subnets : idx => val }

network_id = hcloud_network.this.id
network_zone = "???"
ip_range = each.value
type = "cloud"
}
13 changes: 13 additions & 0 deletions network.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "hcloud_network" "this" {
name = var.name
ip_range = var.cidr
}

resource "hcloud_network_subnet" "this" {
for_each = { for idx, val in var.subnets : idx => val }

network_id = hcloud_network.this.id
network_zone = var.zone
ip_range = each.value
type = "cloud"
}
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ variable "name" {
description = "Network Name"
}

variable "zone" {
type = string
default = "eu-central"
sensitive = false
description = "Network Zone"
}

variable "cidr" {
type = string
default = ""
Expand Down

0 comments on commit 6b1e50e

Please sign in to comment.