This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extensions": [ | |
"4ops.terraform", | |
"ms-azuretools.vscode-azureterraform", | |
"ms-azure-devops.azure-pipelines", | |
"ms-mssql.mssql", | |
"ms-vscode.azurecli", | |
"ms-vscode.PowerShell" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env pwsh | |
# Runs post create commands to prep Codespace for project | |
# Update relevant packages | |
sudo apt-get update | |
#sudo apt-get install --only-upgrade -y azure-cli powershell | |
if (!(Get-Command tmux -ErrorAction SilentlyContinue)) { | |
sudo apt-get install -y tmux | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env pwsh | |
# Find repo directories (may be different when not using main branch) | |
$repoDirectory = (Split-Path (get-childitem diagram.vsdx -Path ~ -Recurse).FullName -Parent) | |
$scriptDirectory = Join-Path $repoDirectory "scripts" | |
# Manage PATH environment variable | |
[System.Collections.ArrayList]$pathList = $env:PATH.Split(":") | |
# Insert script path into PATH, so scripts can be called from anywhere |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Theme, colors at https://i.stack.imgur.com/e63et.png | |
set -g default-terminal "screen-256color" | |
set -g status-bg default | |
set -g status-fg colour244 | |
set -g window-status-current-bg default | |
#set -g window-status-current-style bg=default | |
set -g window-status-current-fg colour244 | |
#set -g window-status-current-style fg=colour244 | |
#set -g window-status-current-attr bold | |
set -g status-interval 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 7.0 | |
function Connect-TmuxSession ( | |
# Use Terraform workspace variable as default session name | |
[string]$Workspace=($env:TF_WORKSPACE ? $env:TF_WORKSPACE : "default") | |
) { | |
if ($env:TMUX) { | |
Write-Warning "Session already exixts: $env:TMUX" | |
return | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- task: AzureCLI@2 | |
displayName: 'Terraform init' | |
inputs: | |
azureSubscription: '$(subscriptionConnection)' | |
scriptType: pscore | |
scriptLocation: inlineScript | |
inlineScript: | | |
# Propagate pipeline Service Principal as Terraform variables | |
$env:ARM_CLIENT_ID ??= $env:servicePrincipalId | |
$env:ARM_CLIENT_SECRET ??= $env:servicePrincipalKey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$env:ARM_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000 | |
$env:ARM_TENANT_ID=00000000-0000-0000-0000-000000000000 | |
az login -t $env:ARM_TENANT_ID | |
az account set --subscription $env:ARM_SUBSCRIPTION_ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az login | |
az account set --subscription 00000000-0000-0000-0000-000000000000 | |
$env:ARM_SUBSCRIPTION_ID=$(az account show --query "id" -o tsv) | |
$env:ARM_TENANT_ID=$(az account show --query "tenantId" -o tsv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"clientId": "00000000-0000-0000-0000-000000000000", | |
"clientSecret": "00000000-0000-0000-0000-000000000000", | |
"subscriptionId": "00000000-0000-0000-0000-000000000000", | |
"tenantId": "00000000-0000-0000-0000-000000000000", | |
"objectId": "00000000-0000-0000-0000-000000000000", | |
(...) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Get Azure CLI | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Get Terraform | |
uses: hashicorp/setup-terraform@v1 | |
with: | |
terraform_version: 'latest' | |
terraform_wrapper: false |
OlderNewer