Skip to content

Instantly share code, notes, and snippets.

View spy86's full-sized avatar
🎯
Focusing

Maciej Michalski spy86

🎯
Focusing
View GitHub Profile
data "azurerm_resource_group" "existing" {
name = "rg-shared-network"
}
output "existing_rg_location" {
value = data.azurerm_resource_group.existing.location
}
resource "azurerm_storage_account" "sa_safe" {
name = local.storage_name
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
account_tier = "Standard"
account_replication_type = "LRS"
tags = local.common_tags
lifecycle {
prevent_destroy = true
resource "azurerm_role_assignment" "ra" {
scope = azurerm_resource_group.rg.id
role_definition_name = "Reader"
principal_id = data.azurerm_client_config.current.object_id
}
resource "azurerm_storage_account" "sa_dep" {
name = local.storage_name
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
variable "envs" {
type = map(object({
location = string
}))
default = {
dev = { location = "westeurope" }
staging = { location = "westeurope" }
}
}
@spy86
spy86 / count.tf
Last active April 29, 2026 08:09
variable "rg_count" {
type = number
default = 2
}
resource "azurerm_resource_group" "rg_multi" {
count = var.rg_count
name = "rg-${local.name_prefix}-${count.index}"
location = var.location
tags = local.common_tags
@spy86
spy86 / values.yaml
Created April 24, 2025 06:12
This file contains custom configuration values for the NGINX Ingress Controller Helm chart.
controller:
ingressClass: internal-ingress-nginx
extraArgs:
ingress-class: internal-ingress-nginx
ingressClassResource:
name: internal-ingress-nginx
controllerValue: "k8s.io/ingress-nginx-internal"
enabled: true
service:
annotations:
zabbix_export:
version: '6.4'
media_types:
-
name: 'MS Teams Workflows'
type: WEBHOOK
parameters:
-
name: alert_message
value: '{ALERT.MESSAGE}'
@spy86
spy86 / install_nvidia_cuda.sh
Created June 21, 2024 14:21
script will guide you through the steps to uninstall any existing NVIDIA drivers, install the latest NVIDIA drivers and CUDA toolkit, and verify the installation by running a sample CUDA program.
#!/bin/bash
# Uninstall existing NVIDIA drivers
sudo apt-get purge -y 'nvidia*'
sudo apt-get autoremove -y
sudo apt-get autoclean -y
# Add the graphics drivers PPA
sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt-get update -y
#!/bin/bash
echo "DOCKER"
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y
#!/bin/bash
echo "DOCKER and DOCKER-COMPOSE"
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y