aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment')
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/main.tf33
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/variables.tf33
2 files changed, 66 insertions, 0 deletions
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/main.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/main.tf
index 7fbf50c711..fd570ab575 100644
--- a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/main.tf
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/main.tf
@@ -422,6 +422,39 @@ resource "aws_elastic_beanstalk_environment" "environment" {
value = aws_iam_instance_profile.ec2_iam_instance_profile.name
}
+ # aws:autoscaling:updatepolicy:rollingupdate
+ setting {
+ namespace = "aws:autoscaling:updatepolicy:rollingupdate"
+ name = "RollingUpdateEnabled"
+ value = var.autoscaling_updatepolicy_rolling_update_enabled
+ }
+
+ setting {
+ namespace = "aws:autoscaling:updatepolicy:rollingupdate"
+ name = "RollingUpdateType"
+ value = var.autoscaling_updatepolicy_rolling_update_type
+ }
+
+ setting {
+ namespace = "aws:autoscaling:updatepolicy:rollingupdate"
+ name = "MinInstancesInService"
+ value = var.autoscaling_updatepolicy_min_instance_in_service
+ }
+
+ # aws:elasticbeanstalk:command
+ setting {
+ namespace = "aws:elasticbeanstalk:command"
+ name = "DeploymentPolicy"
+ value = var.command_deployment_policy
+ }
+
+ # aws:autoscaling:updatepolicy:rollingupdate
+ setting {
+ namespace = "aws:autoscaling:updatepolicy:rollingupdate"
+ name = "MaxBatchSize"
+ value = var.updatepolicy_max_batch_size
+ }
+
# aws:elasticbeanstalk:healthreporting:system
setting {
namespace = "aws:elasticbeanstalk:healthreporting:system"
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/variables.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/variables.tf
index c2a1ea3cf7..b0c41899b7 100644
--- a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/variables.tf
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/variables.tf
@@ -163,6 +163,39 @@ variable "environment_process_default_unhealthy_threshold_count" {
default = 3
}
+# aws:autoscaling:updatepolicy:rollingupdate
+variable "autoscaling_updatepolicy_rolling_update_enabled" {
+ description = "Whether to enable rolling update."
+ type = bool
+ default = true
+}
+
+variable "autoscaling_updatepolicy_rolling_update_type" {
+ description = "`Health` or `Immutable`. Set it to `Immutable` to apply the configuration change to a fresh group of instances."
+ type = string
+ default = "Immutable"
+}
+
+variable "autoscaling_updatepolicy_min_instance_in_service" {
+ description = "Minimum number of instances in service during update."
+ type = number
+ default = 1
+}
+
+# aws:elasticbeanstalk:command
+variable "command_deployment_policy" {
+ description = "Use the DeploymentPolicy option to set the deployment type. The following values are supported: `AllAtOnce`, `Rolling`, `RollingWithAdditionalBatch`, `Immutable`, `TrafficSplitting`."
+ type = string
+ default = "Rolling"
+}
+
+# aws:autoscaling:updatepolicy:rollingupdate
+variable "updatepolicy_max_batch_size" {
+ description = "Maximum number of instances to update at once."
+ type = number
+ default = 1
+}
+
# aws:elasticbeanstalk:healthreporting:system
variable "healthreporting_system_type" {
description = "Whether to enable enhanced health reporting for this environment"