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
resource "aws_db_instance" "postgres" { | |
identifier = "${var.postgres_id}" | |
name = "${var.postgres_name}" | |
engine = "${var.postgres_engine}" | |
engine_version = "${var.postgres_version}" | |
multi_az = "${var.postgres_multi_az}" | |
instance_class = "${var.postgres_class}" | |
db_subnet_group_name = "${var.postgres_subnet_group}" |
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
{ | |
"StartAt": "RegisterBuildkiteAgents", | |
"TimeoutSeconds": 1800, | |
"States": { | |
"RegisterBuildkiteAgents": { | |
"Type": "Pass", | |
"Result": { | |
"TaskDefinitions": { | |
"Definitions": [], | |
"Count": 0 |
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
description: |- | |
### EC2 stopper by tag | |
Stop EC2 instances by tag | |
schemaVersion: '0.3' | |
mainSteps: | |
- name: getInstancesByTag | |
action: 'aws:executeAwsApi' | |
outputs: | |
- Name: InstanceIds |
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
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use: | |
# "${data.external.ssh_key_generator.result.public_key}" (contents) | |
# "${data.external.ssh_key_generator.result.private_key}" (contents) | |
# "${data.external.ssh_key_generator.result.private_key_file}" (path) | |
data "external" "ssh_key_generator" { | |
program = ["bash", "${path.root}/../ssh_key_generator.sh"] | |
query = { | |
customer_name = "${var.customer_name}" | |
customer_group = "${var.customer_group}" |
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
{ | |
"schemaVersion": "0.3", | |
"description": "Updates a Microsoft Windows AMI. By default it will install all Windows updates, Amazon software, and Amazon drivers. It will then sysprep and create a new AMI. Supports Windows Server 2008 R2 and greater.", | |
"assumeRole": "{{ AutomationAssumeRole }}", | |
"parameters": { | |
"SourceAmiId": { | |
"type": "String", | |
"description": "(Required) The source Amazon Machine Image ID." | |
}, | |
"TopicArn": { |
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
data "template_file" "lnx_script" { | |
template = "${file("${path.module}/templates/lnx_script.sh")}" | |
vars { | |
var1 = "${var.var1}" | |
} | |
} | |
resource "aws_instance" "myinstance" { | |
connection { | |
type = "ssh" |