Skip to content

Instantly share code, notes, and snippets.

View mikaelkrief's full-sized avatar

Mikael mikaelkrief

View GitHub Profile
kind: Pod
apiVersion: v1
metadata:
name: app
namespace: myapp
spec:
containers:
- name: mypod
image: mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine
resources:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: azurefile
namespace: myapp
spec:
accessModes:
- ReadWriteMany
storageClassName: azurefile-csi
volumeName: azurefile
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/provisioned-by: file.csi.azure.com
name: azurefile
spec:
capacity:
storage: 5Gi
accessModes:
@mikaelkrief
mikaelkrief / rg.yaml
Last active January 9, 2024 17:56
ASO Azure file Share
apiVersion: resources.azure.com/v1api20200601
kind: ResourceGroup
metadata:
name: rg-app
namespace: myapp
spec:
location: eastus
@mikaelkrief
mikaelkrief / tfinfracostdemo.tf
Created January 11, 2023 13:34
Terraform code from infracost demo
terraform {
required_version = "~> 1.0"
required_providers {
azurerm = {
version = "~> 3.35"
}
}
}
provider "azurerm" {
TERRAFORM_VERSION="0.12.20"
curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_SHA256SUMS \
&& curl https://keybase.io/hashicorp/pgp_keys.asc | gpg --import \
&& curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_SHA256SUMS.sig \
&& gpg --verify terraform_${TERRAFORM_VERSION}_SHA256SUMS.sig terraform_${TERRAFORM_VERSION}_SHA256SUMS \
&& shasum -a 256 -c terraform_${TERRAFORM_VERSION}_SHA256SUMS 2>&1 | grep "${TERRAFORM_VERSION}_linux_amd64.zip:\sOK" \
&& unzip -o terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin
resource "azuredevops_build_definition" "build-def1" {
name = "build-def-CI"
project_id = "${azuredevops_project.project.name}"
description = "It' definition created by Terraform"
repository {
name = "${azuredevops_project.project.name}"
type = "TfsGit"
branch = "master"
}
resource "azuredevops_build_definition" "build-def1" {
.........
designer_phase {
name = "phase1"
step {
display_name = "teststep"
task_id = "d9bafed4-0b18-4f58-968d-86655b4d2ce9"
@mikaelkrief
mikaelkrief / provider.tf
Created May 2, 2019 08:06
azure devops Terraform provider
provider "azuredevops" {
organization = "<name of your Azure DevOps organisation>"
token = "<Your PAT authentication>"
}
resource "azurerm_virtual_machine" "myterraformvm" {
name = "myVM"
location = "eastus"
resource_group_name = "${azurerm_resource_group.myterraformgroup.name}"
network_interface_ids = ["${azurerm_network_interface.myterraformnic.id}"]
vm_size = "Standard_DS1_v2"
storage_os_disk {
name = "myOsDisk"
caching = "ReadWrite"