Skip to content

Instantly share code, notes, and snippets.

View viktors-telle's full-sized avatar
🏠
Working from home

Viktors Telle viktors-telle

🏠
Working from home
View GitHub Profile
@viktors-telle
viktors-telle / storage-account.json
Last active March 5, 2020 05:35
ARM template to create Azure Storage Account
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
@viktors-telle
viktors-telle / storage-account.tf
Last active March 5, 2020 05:34
Terraform template to create Azure Storage Account.
resource "azurerm_storage_account" "example" {
name = "storageaccountname"
resource_group_name = "resource_group_name"
location = "resource_group_location"
account_tier = "Standard"
account_replication_type = "GRS"
tags = {
environment = "dev"
}
@viktors-telle
viktors-telle / sql-server-module.tf
Created March 4, 2020 20:21
Terraform module example.
module "sql-server" {
source = "./modules/sql-server"
resource_group_name = var.resource_group_name
location = var.location
common_tags = local.common_tags
sql_server_name = var.sql_server_name
sql_administrator_login = var.sql_administrator_login
sql_administrator_password = var.sql_administrator_password
sql_firewall_rules = var.sql_firewall_rules
}
@viktors-telle
viktors-telle / terraform-init.tf
Last active May 22, 2020 12:54
Terraform init command example.
terraform init
-backend-config="storage_account_name=${nameofyourstorageaccount}"
-backend-config="container_name=${blob_container_name}"
-backend-config="key=${blob_file_name}"
-backend-config="access_key=${storage_account_access_key}"
-input=false
@viktors-telle
viktors-telle / terraform-plan.tf
Last active May 22, 2020 12:55
Terraform plan command example.
terraform plan
-var-file="environments/${environment}/variables.tfvars"
-var "azure_client_secret=${azure_client_secret}"
-input=false
-detailed-exitcode
-out=tfplan
@viktors-telle
viktors-telle / deployment-job.yaml
Last active November 6, 2020 13:37
Azure DevOps deployment jobs example.
jobs:
- deployment: dev
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/dev')
displayName: Deploy to dev
environment: dev
variables:
- name: environment
value: dev
- group: ${{ format('terraform-{0}', variables.environment) }}
- ${{ if ne(parameters.variable_group_name, '') }}:
@viktors-telle
viktors-telle / deployment-job-steps.yaml
Created March 14, 2020 20:44
Azure DevOps deployment job steps.
parameters:
container_name:
container_key:
variable_group_name:
environment:
tf_plan_name:
working_directory:
steps:
- checkout: self
@viktors-telle
viktors-telle / azure-devops-pipeline.yaml
Created March 14, 2020 21:07
Example how call Azure DevOps yaml template from another repository.
pool: your-agent-pool-name
trigger:
batch: true
branches:
exclude:
- refs/heads/feature*
resources:
repositories:
using System;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;
namespace Retries
{
internal static class Program
{
static async Task Main(string[] args)
using System;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;
namespace Retries
{
internal static class Program
{
static async Task Main(string[] args)