Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created July 25, 2018 17:27

Revisions

  1. cleverca22 renamed this gist Jul 25, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. cleverca22 created this gist Jul 25, 2018.
    28 changes: 28 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    {
    hostname = { resources, ... }:
    {
    deployment = {
    targetEnv = "ec2";
    ec2 = {
    instanceType = "t2.small";
    accessKeyId = "awskeyname";
    region = "us-east-1";
    keyPair = resources.ec2KeyPairs.keypair;
    securityGroups = [ resources.ec2SecurityGroups.allowSsh ];
    };
    };
    };
    resources = {
    ec2SecurityGroups.allowSsh = {
    accessKeyId = "awskeyname";
    region = "us-east-1";
    rules = [
    { protocol = "tcp"; fromPort = 22; toPort = 22; sourceIp = "0.0.0.0/0"; }
    ];
    };
    ec2KeyPairs.keypair = {
    accessKeyId = "awskeyname";
    region = "us-east-1";
    };
    };
    }