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
# Start w/ a data source to get a list of all the workspaces | |
# See: https://www.terraform.io/docs/providers/tfe/d/workspace_ids.html | |
data "tfe_workspace_ids" "all-workspaces" { | |
names = ["*"] | |
organization = "my-org-name" | |
} | |
# Look up the ID of the teamn you're looking to map | |
# See: https://www.terraform.io/docs/providers/tfe/d/team.html | |
data "tfe_team" "architects" { |
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
[CmdLetBinding()] | |
Param( | |
[Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$true)] | |
[String] $HostedZoneId, | |
[Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$true)] | |
[ValidateSet("CNAME","A","AAAA","MX","TXT","PTR","SRV","SPF","NS","SOA")] | |
[String] $Type, | |
[Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$true)] |
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
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=RunInstances \ | |
--query 'Events[0].CloudTrailEvent' | jq -r . | jq . |
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
wget http://stedolan.github.io/jq/download/linux64/jq | |
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \ | |
"Name=instance-state-name,Values=running" \ | |
| jq -r \ | |
".Reservations[] | .Instances[] | .InstanceId" \ | |
aws ec2 describe-volumes --filters \ | |
"Name=status,Values=available" \ | |
| jq -r ".Volumes[] | .VolumeId" \ |