Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created July 25, 2018 17:27
Show Gist options
  • Save cleverca22/7ae0ee0847b3da2150d22ee63175dbad to your computer and use it in GitHub Desktop.
Save cleverca22/7ae0ee0847b3da2150d22ee63175dbad to your computer and use it in GitHub Desktop.
{
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";
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment