Skip to content

Commit

Permalink
Merge pull request #160 from YakDriver/up12
Browse files Browse the repository at this point in the history
Upgrade to 0.12
  • Loading branch information
lorengordon authored Sep 20, 2019
2 parents 72c0b9f + b925fc9 commit 90bbded
Show file tree
Hide file tree
Showing 41 changed files with 938 additions and 1,038 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.15.8
current_version = 2.0.0
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ $RECYCLE.BIN/
#*.msm
#*.msp

# local environment
.env

# =========================
# Operating System Files
# =========================
Expand Down Expand Up @@ -97,3 +100,4 @@ htmlcov
*.tfstate
*.tfstate.backup
.terraform/
terraform.log
31 changes: 3 additions & 28 deletions examples/lx-autoscale/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
#Outputs from the Linux Autoscaling Terraform module.

output "watchmaker-lx-autoscale-stack-id" {
description = "This output provides the CloudFormation stack id of the Watchmaker Linux instance"
value = "${module.lx-autoscale.watchmaker-lx-autoscale-stack-id}"
}

output "watchmaker-lx-autoscale-stack-down-schedule-action" {
description = "This output provides the Scale Down Scheduled Action ID"
value = "${module.lx-autoscale.watchmaker-lx-autoscale-scale-down-scheduled-action}"
}

output "watchmaker-lx-autoscale-stack-up-schedule-action" {
description = "This output provides the Scale Up Scheduled Action ID"
value = "${module.lx-autoscale.watchmaker-lx-autoscale-scale-up-scheduled-action}"
}

output "watchmaker-lx-autoscale-autoscaling-group-id" {
description = "This output provides the Autoscaling Group ID"
value = "${module.lx-autoscale.watchmaker-lx-autoscale-autoscaling-group-id}"
}

output "watchmaker-lx-autoscale-launch-config-id" {
description = "This output provides the Launch Configuration ID"
value = "${module.lx-autoscale.watchmaker-lx-autoscale-launch-config-id}"
}

output "watchmaker-lx-autoscale-launch-config-log-group-name" {
description = "This output provides the Log Group Name"
value = "${module.lx-autoscale.watchmaker-lx-autoscale-launch-config-log-group-name}"
output "watchmaker-lx-autoscale" {
description = "CloudFormation stack object for watchmaker-lx-autoscale"
value = module.lx-autoscale.watchmaker-lx-autoscale
}
3 changes: 3 additions & 0 deletions examples/lx-autoscale/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.12"
}
16 changes: 3 additions & 13 deletions examples/lx-instance/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
#Outputs from the Linux Instance Terraform module.

output "watchmaker-lx-instance-stack-id" {
description = "This output provides the CloudFormation stack id of the Watchmaker Linux instance"
value = "${module.lx-instance.watchmaker-lx-instance-stack-id}"
}

output "watchmaker-lx-instance-id" {
description = "This output provides the Instance ID"
value = "${module.lx-instance.watchmaker-lx-instance-id}"
}

output "watchmaker-lx-instance-log-group-name" {
description = "This output provides the Log Group Name"
value = "${module.lx-instance.watchmaker-lx-instance-log-group-name}"
output "watchmaker-lx-instance" {
description = "CloudFormation stack object for watchmaker-lx-instance"
value = module.lx-instance.watchmaker-lx-instance
}
3 changes: 3 additions & 0 deletions examples/lx-instance/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.12"
}
31 changes: 3 additions & 28 deletions examples/win-autoscale/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
#Outputs from the Windows Autoscaling Terraform module.

output "watchmaker-win-autoscale-stack-id" {
description = "This output provides the CloudFormation Stack ID"
value = "${module.win-autoscale.watchmaker-win-autoscale-stack-id}"
}

output "watchmaker-win-autoscale-scale-down-scheduled-action" {
description = "This output provides the Scale Down Scheduled Action ID"
value = "${module.win-autoscale.watchmaker-win-autoscale-scale-down-scheduled-action}"
}

output "watchmaker-win-autoscale-scale-up-scheduled-action" {
description = "This output provides the Scale Up Scheduled Action ID"
value = "${module.win-autoscale.watchmaker-win-autoscale-scale-up-scheduled-action}"
}

output "watchmaker-win-autoscale-autoscaling-group-id" {
description = "This output provides the Autoscaling Group ID"
value = "${module.win-autoscale.watchmaker-win-autoscale-autoscaling-group-id}"
}

output "watchmaker-win-autoscale-launch-config-id" {
description = "This output provides the Launch Configuration ID"
value = "${module.win-autoscale.watchmaker-win-autoscale-launch-config-id}"
}

output "watchmaker-win-autoscale-launch-config-log-group-name" {
description = "This output provides the Log Group Name"
value = "${module.win-autoscale.watchmaker-win-autoscale-launch-config-log-group-name}"
output "watchmaker-win-autoscale" {
description = "CloudFormation stack object for watchmaker-win-autoscale"
value = module.win-autoscale.watchmaker-win-autoscale
}
3 changes: 3 additions & 0 deletions examples/win-autoscale/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.12"
}
16 changes: 3 additions & 13 deletions examples/win-instance/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
#Outputs from the Windows Instance Terraform module.

output "watchmaker-win-instance-stack-id" {
description = "This output provides the CloudFormation Stack ID"
value = "${module.win-instance.watchmaker-win-instance-stack-id}"
}

output "watchmaker-win-instance-id" {
description = "This output provides the Instance ID"
value = "${module.win-instance.watchmaker-win-instance-id}"
}

output "watchmaker-win-instance-log-group-name" {
description = "This output provides the Log Group Name"
value = "${module.win-instance.watchmaker-win-instance-log-group-name}"
output "watchmaker-win-instance" {
description = "CloudFormation stack object for watchmaker-win-instance"
value = module.win-instance.watchmaker-win-instance
}
3 changes: 3 additions & 0 deletions examples/win-instance/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.12"
}
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module "lx-instance" {
source = "git::https://github.com/plus3it/terraform-aws-watchmaker//modules/lx-instance/"

Name = "${var.Name}"
AmiId = "${var.AmiId}"
AmiDistro = "${var.AmiDistro}"
Name = var.Name
AmiId = var.AmiId
AmiDistro = var.AmiDistro
}
118 changes: 59 additions & 59 deletions modules/lx-autoscale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,68 @@
# Assumes that the Watchmaker Cloudformation template is stored in the same directory as main.tf of the module.

resource "aws_cloudformation_stack" "watchmaker-lx-autoscale" {
template_body = "${file("${path.module}/watchmaker-lx-autoscale.template.cfn.yaml")}"
template_body = file("${path.module}/watchmaker-lx-autoscale.template.cfn.yaml")

name = "${var.Name}"
capabilities = "${var.Capabilities}"
disable_rollback = "${var.DisableRollback}"
iam_role_arn = "${var.IamRoleArn}"
notification_arns = "${var.NotificationArns}"
on_failure = "${var.OnFailureAction}"
policy_body = "${var.PolicyBody}"
policy_url = "${var.PolicyUrl}"
tags = "${var.StackTags}"
timeout_in_minutes = "${var.TimeoutInMinutes}"
name = var.Name
capabilities = var.Capabilities
disable_rollback = var.DisableRollback
iam_role_arn = var.IamRoleArn
notification_arns = var.NotificationArns
on_failure = var.OnFailureAction
policy_body = var.PolicyBody
policy_url = var.PolicyUrl
tags = var.StackTags
timeout_in_minutes = var.TimeoutInMinutes

parameters = {
AmiDistro = "${var.AmiDistro}"
AmiId = "${var.AmiId}"
AppScriptParams = "${var.AppScriptParams}"
AppScriptShell = "${var.AppScriptShell}"
AppScriptUrl = "${var.AppScriptUrl}"
AppVolumeDevice = "${var.AppVolumeDevice}"
AppVolumeMountPath = "${var.AppVolumeMountPath}"
AppVolumeSize = "${var.AppVolumeSize}"
AppVolumeSnapshotId = "${var.AppVolumeSnapshotId}"
AppVolumeType = "${var.AppVolumeType}"
AsgMetrics = "${join(",", var.AsgMetrics)}"
AsgNotificationTypes = "${join(",", var.AsgNotificationTypes)}"
AsgSnsArn = "${var.AsgSnsArn}"
CfnEndpointUrl = "${var.CfnEndpointUrl}"
CfnStackSignalTimeout = "${var.TimeoutInMinutes}"
CloudWatchAgentUrl = "${var.CloudWatchAgentUrl}"
CloudWatchAppLogs = "${join(",", var.CloudWatchAppLogs)}"
DesiredCapacity = "${var.DesiredCapacity}"
EbsOptimized = "${var.EbsOptimized}"
EnableRepos = "${var.EnableRepos}"
InstanceRole = "${var.InstanceRole}"
InstanceTerminationPolicies = "${join(",", var.InstanceTerminationPolicies)}"
InstanceType = "${var.InstanceType}"
KeyPairName = "${var.KeyPairName}"
LoadBalancerNames = "${var.LoadBalancerNames}"
MaxCapacity = "${var.MaxCapacity}"
MinCapacity = "${var.MinCapacity}"
NoPublicIp = "${var.NoPublicIp}"
NoReboot = "${var.NoReboot}"
NoUpdates = "${var.NoUpdates}"
PatchGroup = "${var.PatchGroup}"
PypiIndexUrl = "${var.PypiIndexUrl}"
RootVolumeSize = "${var.RootVolumeSize}"
ScaleDownSchedule = "${var.ScaleDownSchedule}"
ScaleUpSchedule = "${var.ScaleUpSchedule}"
SecurityGroupIds = "${var.SecurityGroupIds}"
SubnetIds = "${var.SubnetIds}"
TargetGroupArns = "${var.TargetGroupArns}"
ToggleCfnInitUpdate = "${var.ToggleCfnInitUpdate}"
ToggleNewInstances = "${var.ToggleNewInstances}"
WatchmakerAdminGroups = "${var.WatchmakerAdminGroups}"
WatchmakerAdminUsers = "${var.WatchmakerAdminUsers}"
WatchmakerConfig = "${var.WatchmakerConfig}"
WatchmakerEnvironment = "${var.WatchmakerEnvironment}"
WatchmakerExtraArgs = "${var.WatchmakerExtraArgs}"
WatchmakerOuPath = "${var.WatchmakerOuPath}"
WatchmakerStandaloneUrl = "${var.WatchmakerStandaloneUrl}"
WatchmakerVersion = "${var.WatchmakerVersion}"
AmiDistro = var.AmiDistro
AmiId = var.AmiId
AppScriptParams = var.AppScriptParams
AppScriptShell = var.AppScriptShell
AppScriptUrl = var.AppScriptUrl
AppVolumeDevice = var.AppVolumeDevice
AppVolumeMountPath = var.AppVolumeMountPath
AppVolumeSize = var.AppVolumeSize
AppVolumeSnapshotId = var.AppVolumeSnapshotId
AppVolumeType = var.AppVolumeType
AsgMetrics = join(",", var.AsgMetrics)
AsgNotificationTypes = join(",", var.AsgNotificationTypes)
AsgSnsArn = var.AsgSnsArn
CfnEndpointUrl = var.CfnEndpointUrl
CfnStackSignalTimeout = var.TimeoutInMinutes
CloudWatchAgentUrl = var.CloudWatchAgentUrl
CloudWatchAppLogs = join(",", var.CloudWatchAppLogs)
DesiredCapacity = var.DesiredCapacity
EbsOptimized = var.EbsOptimized
EnableRepos = var.EnableRepos
InstanceRole = var.InstanceRole
InstanceTerminationPolicies = join(",", var.InstanceTerminationPolicies)
InstanceType = var.InstanceType
KeyPairName = var.KeyPairName
LoadBalancerNames = var.LoadBalancerNames
MaxCapacity = var.MaxCapacity
MinCapacity = var.MinCapacity
NoPublicIp = var.NoPublicIp
NoReboot = var.NoReboot
NoUpdates = var.NoUpdates
PatchGroup = var.PatchGroup
PypiIndexUrl = var.PypiIndexUrl
RootVolumeSize = var.RootVolumeSize
ScaleDownSchedule = var.ScaleDownSchedule
ScaleUpSchedule = var.ScaleUpSchedule
SecurityGroupIds = var.SecurityGroupIds
SubnetIds = var.SubnetIds
TargetGroupArns = var.TargetGroupArns
ToggleCfnInitUpdate = var.ToggleCfnInitUpdate
ToggleNewInstances = var.ToggleNewInstances
WatchmakerAdminGroups = var.WatchmakerAdminGroups
WatchmakerAdminUsers = var.WatchmakerAdminUsers
WatchmakerConfig = var.WatchmakerConfig
WatchmakerEnvironment = var.WatchmakerEnvironment
WatchmakerExtraArgs = var.WatchmakerExtraArgs
WatchmakerOuPath = var.WatchmakerOuPath
WatchmakerStandaloneUrl = var.WatchmakerStandaloneUrl
WatchmakerVersion = var.WatchmakerVersion
}

timeouts {
Expand Down
31 changes: 3 additions & 28 deletions modules/lx-autoscale/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
#Outputs from the Linux Autoscaling Terraform module.

output "watchmaker-lx-autoscale-stack-id" {
description = "CloudFormation stack id"
value = "${aws_cloudformation_stack.watchmaker-lx-autoscale.id}"
}

output "watchmaker-lx-autoscale-scale-down-scheduled-action" {
description = "Scale Down Scheduled Action ID"
value = "${lookup(aws_cloudformation_stack.watchmaker-lx-autoscale.outputs, "ScaleDownScheduledAction", "")}"
}

output "watchmaker-lx-autoscale-scale-up-scheduled-action" {
description = "Scale Up Scheduled Action ID"
value = "${lookup(aws_cloudformation_stack.watchmaker-lx-autoscale.outputs, "ScaleUpScheduledAction", "")}"
}

output "watchmaker-lx-autoscale-autoscaling-group-id" {
description = "Autoscaling Group ID"
value = "${lookup(aws_cloudformation_stack.watchmaker-lx-autoscale.outputs, "WatchmakerAutoScalingGroupId", "")}"
}

output "watchmaker-lx-autoscale-launch-config-id" {
description = "Launch Configuration ID"
value = "${lookup(aws_cloudformation_stack.watchmaker-lx-autoscale.outputs, "WatchmakerLaunchConfigId", "")}"
}

output "watchmaker-lx-autoscale-launch-config-log-group-name" {
description = "Log Group Name"
value = "${lookup(aws_cloudformation_stack.watchmaker-lx-autoscale.outputs, "WatchmakerLaunchConfigLogGroupName", "")}"
output "watchmaker-lx-autoscale-stack" {
description = "CloudFormation stack object for watchmaker-lx-autoscale"
value = aws_cloudformation_stack.watchmaker-lx-autoscale
}
Loading

0 comments on commit 90bbded

Please sign in to comment.