Skip to content

Commit

Permalink
adding init
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmordasiewicz committed Sep 17, 2024
1 parent cf54acf commit dc5b72b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion terraform/hub-network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resource "azurerm_network_security_group" "hub-external_network_security_group"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_ranges = var.spoke-aks-node-image-gpu == true ? ["80", "443", "8080", "11434"] : ["80", "443"] #checkov:skip=CKV_AZURE_160: Allow HTTP redirects
destination_port_ranges = var.spoke-k8s-node-pool-gpu == true ? ["80", "443", "8080", "11434"] : ["80", "443"] #checkov:skip=CKV_AZURE_160: Allow HTTP redirects
source_address_prefix = "*"
destination_address_prefix = var.hub-nva-vip
}
Expand Down
5 changes: 3 additions & 2 deletions terraform/terraform.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ spoke-aks-subnet_prefix = "10.1.2.0/24"
spoke-aks_dns_service_ip = "10.1.2.10"
spoke-check-internet-up-ip = "8.8.8.8"
spoke-aks-node-ip = "10.1.1.4"
spoke-aks-node-image-gpu = false
spoke-k8s-node-pool-gpu = false
#spoke-aks-node-image-gpu = false
spoke-k8s-node-pool-gpu = true
subscription_id = "6dced100-9c31-416f-aed1-67e8cfc9fe5f"
19 changes: 9 additions & 10 deletions terraform/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ terraform {
source = "hashicorp/external"
version = "2.3.4"
}
#kubernetes = {
# source = "hashicorp/kubernetes"
# version = "2.31.0"
#}
}
# backend "azurerm" {}
}

data "azurerm_subscription" "current" {
}

data "azurerm_client_config" "current" {
}

provider "azurerm" {
features {
api_management {
Expand All @@ -51,15 +53,12 @@ provider "azurerm" {
prevent_deletion_if_contains_resources = false
}
}
skip_provider_registration = true
subscription_id = var.subscription_id
#resource_provider_registrations = "none"
}

provider "random" {}
provider "tls" {}
provider "http" {}
provider "local" {}
provider "git" {}
#provider "kubernetes" {
# config_path = local_file.kube_config.filename
#}

provider "git" {}
15 changes: 10 additions & 5 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
variable "subscription_id" {
description = "Azure subscription ID"
type = string
}

variable "owner_email" {
default = "[email protected]"
description = "Email address for use with Owner tag."
Expand Down Expand Up @@ -222,11 +227,11 @@ variable "spoke-aks-node-image" {
type = string
}

variable "spoke-aks-node-image-gpu" {
default = false
description = "Set to true to enable GPU workloads"
type = bool
}
#variable "spoke-aks-node-image-gpu" {
# default = false
# description = "Set to true to enable GPU workloads"
# type = bool
#}

variable "spoke-k8s-node-pool-gpu" {
default = false
Expand Down

0 comments on commit dc5b72b

Please sign in to comment.