-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d451367
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM hashicorp/terraform:light AS runner | ||
MAINTAINER "Dwight Spencer (@denzuko)" | ||
|
||
LABEL org.label-schema.schema-version = "1.0" | ||
LABEL org.label-schema.name "workstation" | ||
LABEL org.label-schema.description "Terraform workload contianier for assets/workstation" | ||
|
||
LABEL org.label-schema.docker.cmd "docker run --rm -ti denzuko/assets/workstation:latest" | ||
LABEL org.label-schema.docker.cmd.prune "docker run --rm -ti denzuko/assets/workstation:latest destroy" | ||
LABEL org.label-schema.docker.cmd.help "docker run --rm -ti denzuko/assets/workstation:latest --help" | ||
LABEL org.label-schema.docker.cmd.debug "docker run --rm -ti denzuko/assets/workstation:latest show" | ||
|
||
WORKDIR /app | ||
COPY main.tf variables.tf /app | ||
RUN terraform init && terraform plan | ||
ENTRYPOINT ["/bin/terraform"] | ||
CMD ["apply"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
$VAGRANT_CONFIG_VERSON = 2 | ||
Vagrant.require_plugin "vagrant-aws" | ||
Vagrant.require_plugin "vagrant-winrm-syncedfolders" | ||
|
||
Vagrant.configure($VAGRANT_CONFIG_VERSION) do |config| | ||
config.vm.box = "dummy" | ||
config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/blob/master/dummy.box?raw=true" | ||
config.vm.communicator = "winrm" | ||
config.vm.guest = :windows | ||
|
||
config.vm.provider :aws do |aws, override| | ||
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID'] | ||
aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"] | ||
aws.keypair_name = ENV["AWS_KEYPAIR_NAME"] | ||
|
||
aws.ami = "ami-fa05b392" | ||
aws.tags = { | ||
'Name' => ENV["ASSET_NAME"], | ||
'net.matrix.orgunit' => "Matrix NOC", | ||
'net.matrix.organization' => "Private Ops", | ||
'net.matrix.commonname' => "cloud", | ||
'net.matrix.locality' => "Dallas", | ||
'net.matrix.state' => "Texas", | ||
'net.matrix.country' => "USA", | ||
'net.matrix.environment' => "<nonprod|production|staging>", | ||
'net.matrix.application' => "infrastructure", | ||
'net.matrix.role' => "application services", | ||
'net.matrix.owner' => "[email protected]", | ||
'net.matrix.customer' => "PVT-01", | ||
'net.matrix.costcenter' => "INT-01" | ||
} | ||
|
||
aws.instance_type = "t3.medium" | ||
aws.region = ENV["AWS_DEFAULT_REGION"] | ||
aws.subnet_id = ENV["AWS_SUBNET"] | ||
aws.security_groups = ENV["AWS_SECURITY_GROUPS"] | ||
override.nfs.functional = false | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module "ecs-windows" { | ||
source = "jjno91/ecs-windows/aws" | ||
version = "0.1.0" | ||
instance_type = "t3.medium" | ||
tags = vars.aws_labels | ||
min_size = 0 | ||
max_size = 1 | ||
env = "ustx-dev-lab" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
variable "keypair" { default = "${env.AWS_KEYPAIR_NAME}" | ||
variable "instance_type" { default = "t2.micro" } | ||
variable "security_groups" { default = "${env.AWS_SECURITY_GROUPS}" } | ||
variable "monitoring" { default = true } | ||
variable "ami_id" { default = "ami-fa05b392" } | ||
variable "subnet_id" { default = "${env.AWS_SUBNET}" } | ||
variable "region" { default = "${env.AWS_DEFAULT_REGION}" } | ||
variable "aws_labels" { | ||
type = "map" | ||
default = { | ||
"net.matrix.orgunit" = "Matrix NOC" | ||
"net.matrix.organization" = "Private Ops" | ||
"net.matrix.commonname" = "cloud" | ||
"net.matrix.locality" = "Dallas" | ||
"net.matrix.state" = "Texas" | ||
"net.matrix.country" = "USA" | ||
"net.matrix.environment" = "${env.ENVIRONMENT}" | ||
"net.matrix.application" = "infrastructure" | ||
"net.matrix.role" = "application services" | ||
"net.matrix.owner" = "[email protected]" | ||
"net.matrix.customer" = "PVT-01" | ||
"net.matrix.costcenter" = "INT-01" | ||
} | ||
} |