Prechádzať zdrojové kódy

CAASP-400: Enable CloudFormation Instance Scheduler for the Cyber Range

Colby Williams 3 rokov pred
rodič
commit
e0456e86a9
1 zmenil súbory, kde vykonal 10 pridanie a 10 odobranie
  1. 10 10
      base/aws_scheduler/main.tf

+ 10 - 10
base/aws_scheduler/main.tf

@@ -3,21 +3,21 @@ resource "aws_cloudformation_stack" "aws_scheduler" {
   # the `schedule` tag is set correctly.
   #
   # Until then, this should prevent it, along with a warning in outputs.tf
-  count = var.environment == "test" ? 1 : 0
+  count = (var.environment == "test" || var.environment == "common") ? 1 : 0
 
-  name = "aws-scheduler"
+  name       = "aws-scheduler"
   on_failure = "ROLLBACK"
   #iam_role_arn = "${lookup(local.workspace_to_full_admin_assumerole,terraform.workspace,"")}"
-  capabilities = [ "CAPABILITY_IAM" ]
+  capabilities = ["CAPABILITY_IAM"]
 
   parameters = {
-    UseCloudWatchMetrics = "Yes"  
-    Regions = var.aws_region
-    SchedulerFrequency = "15"
-    Trace = "Yes"   # Detailed logs in Cloudwatch
-    StartedTags = ""
-    StoppedTags = ""
-    CrossAccountRoles = ""
+    UseCloudWatchMetrics = "Yes"
+    Regions              = var.aws_region
+    SchedulerFrequency   = "15"
+    Trace                = "Yes" # Detailed logs in Cloudwatch
+    StartedTags          = ""
+    StoppedTags          = ""
+    CrossAccountRoles    = ""
 
     # These will probably cause terraform drift so right now not doing them
     #StartedTags = "SchedulerStatus=Started {year}-{month}-{day} {hour}:{minute} {timezone}"