aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2022-03-16 16:42:57 +0100
committerPeter Mikus <pmikus@cisco.com>2022-03-17 13:06:15 +0000
commit6c8ca0ad2a9fe0bab2033e41c6b056226cf9a856 (patch)
tree532941f4850185b3c174de1696d58357bacdc0f7 /fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example
parent273a9aa49bba07740b7f7e15277d05f334ab6cc1 (diff)
feat(dash): Terraform AWS Beanstalk split
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I6a9f54be0f734cd267c7ea5aa7f9933e04a8e139
Diffstat (limited to 'fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example')
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/main.tf12
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/output.tf9
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/providers.tf3
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/variables.tf23
-rw-r--r--fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/versions.tf9
5 files changed, 56 insertions, 0 deletions
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/main.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/main.tf
new file mode 100644
index 0000000000..c6fcbf858b
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/main.tf
@@ -0,0 +1,12 @@
+module "elastic_beanstalk_application" {
+ source = "../../terraform-aws-elastic-beanstalk-application"
+ application_description = "FD.io CSIT Results Dashboard"
+ application_name = "fdio-csit-dash-app"
+}
+
+module "elastic_beanstalk_environment" {
+ source = "../"
+ environment_application = module.elastic_beanstalk_application.application_name
+ environment_description = module.elastic_beanstalk_application.application_description
+ environment_name = "fdio-csit-dash-env"
+}
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/output.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/output.tf
new file mode 100644
index 0000000000..290e2a1c5a
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/output.tf
@@ -0,0 +1,9 @@
+output "elastic_beanstalk_application_name" {
+ value = module.elastic_beanstalk_application.application_name
+ description = "Elastic Beanstalk Application name"
+}
+
+output "elastic_beanstalk_application_description" {
+ value = module.elastic_beanstalk_application.application_description
+ description = "Elastic Beanstalk Application description"
+}
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/providers.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/providers.tf
new file mode 100644
index 0000000000..5ff54f0d65
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/providers.tf
@@ -0,0 +1,3 @@
+provider "aws" {
+ region = var.region
+} \ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/variables.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/variables.tf
new file mode 100644
index 0000000000..3c07178e06
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/variables.tf
@@ -0,0 +1,23 @@
+variable "region" {
+ description = "AWS Region."
+ type = string
+ default = "us-east-1"
+}
+
+variable "environment_application" {
+ description = "The name of the application, must be unique within account."
+ type = string
+ default = "Beanstalk Application"
+}
+
+variable "application_description" {
+ description = "Short description of the application."
+ type = string
+ default = "Beanstalk Application"
+}
+
+variable "application_name" {
+ description = "The name of the application, must be unique within account."
+ type = string
+ default = "Beanstalk"
+}
diff --git a/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/versions.tf b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/versions.tf
new file mode 100644
index 0000000000..af1be4a4e1
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-elastic-beanstalk-environment/example/versions.tf
@@ -0,0 +1,9 @@
+terraform {
+ required_providers {
+ aws = {
+ source = "hashicorp/aws"
+ version = ">= 4.3.0"
+ }
+ }
+ required_version = ">= 1.1.4"
+}