aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base
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/1n_aws_t3/fdio-csit-dash-app-base
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/1n_aws_t3/fdio-csit-dash-app-base')
-rw-r--r--fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/main.tf11
-rw-r--r--fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/output.tf0
-rw-r--r--fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/providers.tf11
-rw-r--r--fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/variables.tf28
-rw-r--r--fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/versions.tf17
5 files changed, 67 insertions, 0 deletions
diff --git a/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/main.tf b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/main.tf
new file mode 100644
index 0000000000..63d30e4098
--- /dev/null
+++ b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/main.tf
@@ -0,0 +1,11 @@
+data "vault_aws_access_credentials" "creds" {
+ backend = "${var.vault_name}-path"
+ role = "${var.vault_name}-role"
+}
+
+module "elastic_beanstalk_application_version" {
+ source = "../../terraform-aws-elastic-beanstalk-application-version"
+ application_description = "FD.io CSIT Results Dashboard"
+ application_name = "fdio-csit-dash-app"
+ application_version_name = "fdio-csit-dash-app-base"
+}
diff --git a/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/output.tf b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/output.tf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/output.tf
diff --git a/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/providers.tf b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/providers.tf
new file mode 100644
index 0000000000..7241b27c16
--- /dev/null
+++ b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/providers.tf
@@ -0,0 +1,11 @@
+provider "aws" {
+ region = var.region
+ access_key = data.vault_aws_access_credentials.creds.access_key
+ secret_key = data.vault_aws_access_credentials.creds.secret_key
+}
+
+provider "vault" {
+ address = var.vault_provider_address
+ skip_tls_verify = var.vault_provider_skip_tls_verify
+ token = var.vault_provider_token
+}
diff --git a/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/variables.tf b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/variables.tf
new file mode 100644
index 0000000000..25790290bc
--- /dev/null
+++ b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/variables.tf
@@ -0,0 +1,28 @@
+variable "region" {
+ description = "AWS Region."
+ type = string
+ default = "us-east-1"
+}
+
+variable "vault_provider_address" {
+ description = "Vault cluster address."
+ type = string
+ default = "http://10.30.51.28:8200"
+}
+
+variable "vault_provider_skip_tls_verify" {
+ description = "Verification of the Vault server's TLS certificate."
+ type = bool
+ default = false
+}
+
+variable "vault_provider_token" {
+ description = "Vault root token."
+ type = string
+ sensitive = true
+}
+
+variable "vault_name" {
+ type = string
+ default = "dynamic-aws-creds-vault-fdio-csit-jenkins"
+}
diff --git a/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/versions.tf b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/versions.tf
new file mode 100644
index 0000000000..4afbbc00a7
--- /dev/null
+++ b/fdio.infra.terraform/1n_aws_t3/fdio-csit-dash-app-base/versions.tf
@@ -0,0 +1,17 @@
+terraform {
+ backend "consul" {
+ address = "10.32.8.14:8500"
+ scheme = "http"
+ path = "terraform/dash"
+ }
+ required_providers {
+ aws = {
+ source = "hashicorp/aws"
+ version = ">= 4.3.0"
+ }
+ vault = {
+ version = ">= 3.2.1"
+ }
+ }
+ required_version = ">= 1.1.4"
+}