Skip to content

Instantly share code, notes, and snippets.

View mikaelkrief's full-sized avatar

Mikael mikaelkrief

View GitHub Profile
int a = 3;
int b = 5;
@mikaelkrief
mikaelkrief / synchrovststotfs.cmd
Last active January 30, 2018 16:40
Script Git synchro VSTS TFS
git remote add VSTS https://youruser:$(vstsToken)@$(vstsRepoUri)
git pull VSTS releaseToTFS --allow-unrelated-histories
git push origin head:master
wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip -O terraform.zip
unzip terraform.zip
mv terraform /home/${USER}/.local/bin/
if [[ “:$PATH:” == *”:$HOME/.local/bin”* ]]; then echo “Your path is correctly set” else PATH=$PATH:/home/${USER}/.local/bin export PATH fi
#/bin/bash
wget https://releases.hashicorp.com/terraform/0.11.11/terraform_0.11.11_linux_amd64.zip && \
unzip terraform_0.11.11_linux_amd64.zip -d /bin
choco install terraform
resource "azurerm_resource_group" "rg" {
name = "rg_app"
location = "northeurope"
}
az ad sp create-for-rbac --name="<nom Sp>" --role="Contributor" --scopes="/subscriptions/<subscription Id>"
provider "azurerm" {
subscription_id = "<l’iD de la suscription>"
client_id = "<Client ID>"
client_secret = "<Client Secret>"
tenant_id = "<Tenant Id>"
}
resource "azurerm_resource_group" "rg" {
name = "rg_monappli"
location = "northeurope"
tags {
environment = "Terraform article"
}
}
export ARM_SUBSCRIPTION_ID="xxxxxx-xxxxx-xxxxx-xxxxx"
export ARM_CLIENT_ID="xxxxxx-xxxxx-xxxxx-xxxxx"
export ARM_CLIENT_SECRET="xxxxxxxxxxxxxxxxxxxx"
export ARM_TENANT_ID="xxxxxx-xxxxx-xxxxx-xxxxx"