diff --git a/.gitignore b/.gitignore index 2ffd1756..6ea2ad7a 100644 --- a/.gitignore +++ b/.gitignore @@ -355,3 +355,5 @@ src/Database/Prototype/Output deploy/clouds/digital-ocean/.terraform/providers/registry.terraform.io deploy/clouds/digital-ocean/terraform.tfstate deploy/clouds/digital-ocean/.terraform.lock.hcl +.terraform.lock.hcl +.terraform \ No newline at end of file diff --git a/deploy/k8s/k8s-cluster.tf b/deploy/k8s/k8s-cluster.tf new file mode 100644 index 00000000..ffc20059 --- /dev/null +++ b/deploy/k8s/k8s-cluster.tf @@ -0,0 +1,4 @@ +resource "azurerm_kubernetes_cluster" "k8s" { + resource_group_name = var.aks_group_name + location = var.aks_group_location +} diff --git a/deploy/k8s/main.tf b/deploy/k8s/main.tf new file mode 100644 index 00000000..17dc7368 --- /dev/null +++ b/deploy/k8s/main.tf @@ -0,0 +1,4 @@ +resource "azurerm_resource_group" "rg" { + name = var.aks_group_name + location = var.aks_group_location +} diff --git a/deploy/k8s/providers.tf b/deploy/k8s/providers.tf new file mode 100644 index 00000000..0e13a331 --- /dev/null +++ b/deploy/k8s/providers.tf @@ -0,0 +1,15 @@ +# Configure the Microsoft Azure Provider +provider "azurerm" { + features {} +} + +# We strongly recommend using the required_providers block to set the +# Azure Provider source and version being used +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "=3.0.0" + } + } +} diff --git a/deploy/k8s/terraform.tfstate b/deploy/k8s/terraform.tfstate new file mode 100644 index 00000000..8abb56d0 --- /dev/null +++ b/deploy/k8s/terraform.tfstate @@ -0,0 +1,29 @@ +{ + "version": 4, + "terraform_version": "1.2.9", + "serial": 1, + "lineage": "3751aec2-830b-d4d4-5989-36ee611bad7e", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "azurerm_resource_group", + "name": "rg", + "provider": "provider[\"registry.terraform.io/hashicorp/azurerm\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "/subscriptions/f1404c6e-2728-40ae-9cd2-fee75bde4c04/resourceGroups/aks-prods", + "location": "westus3", + "name": "aks-prods", + "tags": null, + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo1NDAwMDAwMDAwMDAwLCJkZWxldGUiOjU0MDAwMDAwMDAwMDAsInJlYWQiOjMwMDAwMDAwMDAwMCwidXBkYXRlIjo1NDAwMDAwMDAwMDAwfX0=" + } + ] + } + ] +} diff --git a/deploy/k8s/terraform.tfvars b/deploy/k8s/terraform.tfvars new file mode 100644 index 00000000..a01bb542 --- /dev/null +++ b/deploy/k8s/terraform.tfvars @@ -0,0 +1,2 @@ +aks_group_name = "aks-prods" +aks_group_location = "WestUS3" diff --git a/deploy/k8s/varribles.tf b/deploy/k8s/varribles.tf new file mode 100644 index 00000000..6bb16f82 --- /dev/null +++ b/deploy/k8s/varribles.tf @@ -0,0 +1,8 @@ +variable "aks_group_name" { + type = string + description = "Resourse group for AKS cluster" +} +variable "aks_group_location" { + type = string + description = "Resourse group location for AKS cluster" +}