Skip to content

Instantly share code, notes, and snippets.

@Jagdeep1
Jagdeep1 / tf-pipeline.yaml
Created December 17, 2020 18:43
Azure DevOps pipeline to trigger terraform
trigger:
branches:
include:
- development
pool:
name: AWS_AGENT_POOL # Name of the agent pool that has AWS agent created in step 1
resources:
containers:
@Jagdeep1
Jagdeep1 / main.tf
Created December 17, 2020 17:16
Terraform example
terraform {
backend "s3" {
bucket = "tfrb"
key = "tfrb.state"
region = "eu-west-1"
}
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
trigger:
- development
variables:
- group: tf-aws-agent
pool:
vmImage: ubuntu-latest
steps:
@Jagdeep1
Jagdeep1 / vm-cfn.yaml
Last active March 28, 2022 05:15
VM CloudFormation template
AWSTemplateFormatVersion: "2010-09-09"
Description: |
VM for Azure DevOps build agent to execute terraform code
Resources:
AzTFVpc:
Type: AWS::EC2::VPC
Properties:
@Jagdeep1
Jagdeep1 / istio.multiple-ingress.yaml
Created August 9, 2020 16:47
Istio configuration to setup multiple ingress gateways
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
name: multiple-ingress-istiocontrolplane
spec:
profile: default
values:
security:
selfSigned: false
@Jagdeep1
Jagdeep1 / istio.overlay-properties.yaml
Last active August 11, 2020 07:57
Modify default property using overlay object
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
name: multiple-ingress-istiocontrolplane
spec:
profile: default
values:
security:
selfSigned: false
@Jagdeep1
Jagdeep1 / istio.default.yaml
Last active August 9, 2020 16:46
Sample istio profile
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
name: multiple-ingress-istiocontrolplane
spec:
profile: default
values:
security:
selfSigned: false
@Jagdeep1
Jagdeep1 / sample-app.yaml
Created June 6, 2020 15:52
Sample app with secret store volume mount
kind: Pod
apiVersion: v1
metadata:
name: nginx-secrets-store
spec:
containers:
- image: nginx
name: nginx
volumeMounts:
- name: secrets-store-inline
@Jagdeep1
Jagdeep1 / azure-kv-provider.yaml
Last active June 6, 2020 14:07
Provider class for secret store
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClass
metadata:
name: azure-kv-provider
spec:
provider: azure
parameters:
usePodIdentity: "false" # We will not use pod identity for this example. We will use SP
keyvaultName: "db-keys" # This is the name of KeyVault resource that we created in previous step
cloudName: "AzurePublicCloud"
@Jagdeep1
Jagdeep1 / cluster-aware-gateway.yaml
Created May 11, 2020 18:33
Cluster aware gateway
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: cluster-aware-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port: