Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the azurerm version along with the resource variables #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
azurerm = {
version = "~>2.67.0"
version = "~>3.38.0"
source = "hashicorp/azurerm"
}
tls = {
Expand Down
11 changes: 4 additions & 7 deletions modules/lb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "azurerm_public_ip" "pip" {
name = "${var.name}-pip"
allocation_method = "Static"
sku = "Standard"
availability_zone = var.zone
zones = [var.zone]

resource_group_name = data.azurerm_resource_group.rg.name
location = data.azurerm_resource_group.rg.location
Expand All @@ -31,7 +31,7 @@ resource "azurerm_lb" "this" {
subnet_id = var.type == "public" ? null : var.subnet_id
private_ip_address = var.private_ip_address
private_ip_address_allocation = var.private_ip_address_allocation
availability_zone = var.zone
zones = [var.zone]
}

tags = merge({}, var.tags)
Expand All @@ -52,7 +52,6 @@ resource "azurerm_lb_backend_address_pool" "bepool" {
resource "azurerm_lb_probe" "this" {
name = "${var.name}-lb-cp-probe"
loadbalancer_id = azurerm_lb.this.id
resource_group_name = data.azurerm_resource_group.rg.name

protocol = "Tcp"
interval_in_seconds = 10
Expand All @@ -64,28 +63,26 @@ resource "azurerm_lb_probe" "this" {
resource "azurerm_lb_rule" "controlplane" {
name = "${var.name}-cp"
loadbalancer_id = azurerm_lb.this.id
resource_group_name = data.azurerm_resource_group.rg.name

protocol = "Tcp"
frontend_port = 6443
backend_port = 6443

frontend_ip_configuration_name = azurerm_lb.this.frontend_ip_configuration.0.name
backend_address_pool_id = azurerm_lb_backend_address_pool.bepool.id
backend_address_pool_ids = [azurerm_lb_backend_address_pool.bepool.id]
probe_id = azurerm_lb_probe.this.id
}

resource "azurerm_lb_rule" "supervisor" {
name = "${var.name}-supervisor"
loadbalancer_id = azurerm_lb.this.id
resource_group_name = data.azurerm_resource_group.rg.name

protocol = "Tcp"
backend_port = 9345
frontend_port = 9345

frontend_ip_configuration_name = azurerm_lb.this.frontend_ip_configuration.0.name
backend_address_pool_id = azurerm_lb_backend_address_pool.bepool.id
backend_address_pool_ids = [azurerm_lb_backend_address_pool.bepool.id]
probe_id = azurerm_lb_probe.this.id
}

Expand Down
2 changes: 1 addition & 1 deletion modules/rke2-server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource "random_string" "uid" {
special = false
lower = true
upper = false
number = true
numeric = true
}

resource "random_password" "token" {
Expand Down