Skip to content

Instantly share code, notes, and snippets.

View aw230012's full-sized avatar

Josh Wood aw230012

View GitHub Profile
@aw230012
aw230012 / MyCard.json
Created August 22, 2018 13:45
Adaptive Card json
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
@aw230012
aw230012 / template.yaml
Created August 15, 2018 18:27
Example SAM Template to test lambda functions locally.
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Sample SAM Template for AWSLambdaTest
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 10
@aw230012
aw230012 / azuredeploy.parameters.json
Created January 3, 2018 20:09
ARM Template Parameters file for Azure Recovery Services Vault and Policy
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vaultName": {
"value": "RSvault1"
},
"skuTier": {
"value": "Standard"
},
@aw230012
aw230012 / New-RecoveryVault.Tests.ps1
Created January 3, 2018 18:16
New Recovery Vault Pester Tests
Describe 'New-RecoveryVault Tests' {
$configurationFile = "$PSScriptRoot\\..\\Data\\RecoveryVaultConfiguration.json"
$configurationData = (Get-Content $configurationFile -Raw | ConvertFrom-Json).ConfigurationItems
Context 'Resource Group Tests' {
$rg = Get-AzureRmResourceGroup -Name $configurationData.ResourceGroup.Name
It 'Resource Group Exists' {
$rg | Select-Object -ExpandProperty ResourceGroupName | Should Be $configurationData.ResourceGroup.Name
}
@aw230012
aw230012 / deploy.ps1
Last active January 3, 2018 21:00
PowerShell Deploy script for Azure Recovery Services Vault, policy, and automated Pester test
$subscriptionId = '<your subscription id>'
$deployment = '<unique deployment name>'
$configurationFile = "$PSScriptRoot\\Data\\RecoveryVaultConfiguration.json"
$configurationData = (Get-Content $configurationFile -Raw | ConvertFrom-Json).ConfigurationItems
Login-AzureRmAccount
Select-AzureRmSubscription -SubscriptionId $subscriptionId
New-AzureRmResourceGroup -Name $configurationData.ResourceGroup.Name -Location $configurationData.Location.Name -Force
@aw230012
aw230012 / RecoveryVaultConfiguration.json
Last active January 3, 2018 18:53
Recovery Vault Configuration JSON
{
"ConfigurationItems": {
"ResourceGroup": {
"Name": "PESTERTESTING-rg"
},
"Location": {
"Name": "East US 2"
},
"RecoveryVault": {
"Name": "RSvault1",
@aw230012
aw230012 / azuredeploy.json
Created January 3, 2018 18:02
ARM Template for deploying an Azure Recovery Services Vault with a Daily policy
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vaultName": {
"type": "string",
"metadata": {
"description": "Name of the Vault"
}
},
@aw230012
aw230012 / gist:636e0d925bdc6625875cb718117723bf
Created September 20, 2017 20:16
Test-AzureRmResourceGroupDeployment debug output
DEBUG: 4:13:20 PM - TestAzureResourceGroupDeploymentCmdlet begin processing with ParameterSet 'Deployment via template file without parameters'.
DEBUG: 4:13:20 PM - using account id 'ajwood@cardinalsolutions.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'ajwood@cardinalsolutions.com', environment: 'AzureCloud', tenant: '414efc33-68fe-4520-802f-aea4401192d0'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 09/20/2017 20:13:20: de1aeee7-690a-4798-bce6-4066bed44690 - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/414efc33-68fe-4520-802f-aea4401192d0/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (13 items)
Authentication Target: User
---
timestamp: 2017-09-19 17:22:44 UTC
kitchen_version: 1.17.0
plugins:
driver:
Vagrant:
class: Kitchen::Driver::Vagrant
version: 1.2.1
api_version: 2
provisioner: