This file contains hidden or 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
variable "aws_account_id" {} | |
variable "aws_role" {} | |
variable "org_name" { | |
default = "example" | |
} | |
locals { | |
env = { | |
nonprod-ap-southeast-2-dev = { |
This file contains hidden or 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
image: dnxsolutions/musketeers:1.1.1-ecr | |
services: | |
- docker:18.03.1-ce-dind # needs to match gitlab runner version | |
variables: | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
BUILD_VERSION: $CI_COMMIT_SHORT_SHA | |
AWS_ROLE: ci-deploy | |
AWS_DEFAULT_REGION: ap-southeast-2 |
This file contains hidden or 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
image: dnxsolutions/musketeers:1.1.1-ecr | |
services: | |
- docker:18.03.1-ce-dind # needs to match gitlab runner version | |
variables: | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
AWS_DEFAULT_REGION: ap-southeast-2 | |
AWS_HOSTED_ZONE: dev.cloud.example.com.au |
This file contains hidden or 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
import boto3 | |
import datetime | |
client = boto3.client('ec2', region_name='us-west-2') | |
regions = [x["RegionName"] for x in client.describe_regions()["Regions"]] | |
print(regions) | |
INSTANCE = "t3.xlarge" | |
print("Instance: %s" % INSTANCE) | |
results = [] | |
for region in regions: | |
client = boto3.client('ec2', region_name=region) |
This file contains hidden or 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
#!/bin/bash | |
# set up some variables | |
NOW_DATE=$(date '+%Y-%m-%d-%H-%M') | |
RESTORE_FROM_INSTANCE_ID=<source name> | |
TARGET_INSTANCE_ID=<target name> | |
TARGET_INSTANCE_CLASS=db.m4.large | |
VPC_ID=<vpc subnet id> | |
NEW_MASTER_PASS=<root password> |
This file contains hidden or 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
#!/bin/bash | |
# Set output file | |
report_file="aws_network_report_$(date +%Y%m%d_%H%M%S).txt" | |
echo "AWS Network Infrastructure Report" > "$report_file" | |
echo "Generated on: $(date)" >> "$report_file" | |
echo "========================================" >> "$report_file" | |
# First, let's get Transit Gateways information |
OlderNewer