aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-aws-elastic-beanstalk-application/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra.terraform/terraform-aws-elastic-beanstalk-application/main.tf')
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-application/main.tf21
1 files changed, 21 insertions, 0 deletions
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-application/main.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-application/main.tf
new file mode 100644
index 0000000000..909d6fca4d
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-application/main.tf
@@ -0,0 +1,21 @@
+locals {
+ tags = {
+ "Name" = "${var.application_name}"
+ "Environment" = "${var.application_name}"
+ }
+}
+
+resource "aws_elastic_beanstalk_application" "application" {
+ name = var.application_name
+ description = var.application_description
+ tags = local.tags
+
+ dynamic "appversion_lifecycle" {
+ for_each = var.appversion_lifecycle_service_role_arn != "" ? ["true"] : []
+ content {
+ service_role = var.appversion_lifecycle_service_role_arn
+ max_count = var.appversion_lifecycle_max_count
+ delete_source_from_s3 = var.appversion_lifecycle_delete_source_from_s3
+ }
+ }
+}