Skip to content

Instantly share code, notes, and snippets.

View cmendible's full-sized avatar
🖖
Cloud for all

Carlos Mendible cmendible

🖖
Cloud for all
View GitHub Profile
@cmendible
cmendible / debug.log
Last active December 10, 2019 18:41
terraform destroy fails for azurerm_role_definition if role scope is a Management Group
This file has been truncated, but you can view the full file.
2019/12/10 19:22:08 [INFO] Terraform version: 0.12.17
2019/12/10 19:22:08 [INFO] Go runtime version: go1.12.13
2019/12/10 19:22:08 [INFO] CLI args: []string{"C:\\ProgramData\\chocolatey\\lib\\terraform\\tools\\terraform.exe", "destroy"}
2019/12/10 19:22:08 [DEBUG] Attempting to open CLI config file: C:\Users\terraformuser\AppData\Roaming\terraform.rc
2019/12/10 19:22:08 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/12/10 19:22:08 [INFO] CLI command args: []string{"destroy"}
2019/12/10 19:22:08 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2019/12/10 19:22:08 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2019/12/10 19:22:08 [DEBUG] New state was assigned lineage "eb32be79-5d30-b86d-2b34-21097b634648"
2019/12/10 19:22:08 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
@cmendible
cmendible / azure_cli_ansible_install.sh
Last active May 21, 2019 18:52
Script to Install Azure CLI and Ansible on Ubuntu
#!/bin/bash
# Install Azure CLI
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-get install -y apt-transport-https
sudo apt-get update && sudo apt-get install -y azure-cli
@cmendible
cmendible / README.md
Last active April 27, 2019 16:05
Kubernetes deployment for the Global Azure Bootcamp 2019 Science Lab

Kubernetes deployment for the Global Azure Bootcamp 2019 Science Lab

This deployment file will attempt to deploy 3 replicas of the container used in the Global Azure Bootcamp 2019 Science Lab.

Just run:

kubectl apply -f ./gab-2019-science-lab.yaml
@cmendible
cmendible / dotnetlayout.md
Created November 16, 2018 11:05 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@cmendible
cmendible / addcasa.ps1
Created February 3, 2018 19:59
Powershell Script to add Code Analysis and Style Cop to all your .NET Core Projects.
# Place the script in the solution folder
# Add the ca.ruleset to the solution folder
# Run the Powershell Script to add Code Analysis and StyleCop to all your .NET Core Projects.
$projects = (Get-ChildItem . -recurse) | Where-Object {$_.extension -eq ".csproj"}
foreach ($project in $projects) {
$content = Get-Content $project.FullName
if (!($content | Select-String -pattern "<CodeAnalysisRuleSet>ca.ruleset</CodeAnalysisRuleSet>")) {
$content = $content.Replace("</Project>", "`t<PropertyGroup>`r`n`t`t<CodeAnalysisRuleSet>ca.ruleset</CodeAnalysisRuleSet>`r`n`t</PropertyGroup>`r`n</Project>")
$content | Out-File $project.FullName -Encoding Default
}