aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base')
-rw-r--r--fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/main.tf11
-rw-r--r--fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/output.tf0
-rw-r--r--fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/providers.tf11
-rw-r--r--fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/variables.tf28
-rw-r--r--fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/versions.tf17
5 files changed, 67 insertions, 0 deletions
diff --git a/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/main.tf b/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/main.tf
new file mode 100644
index 0000000000..1de8c391b1
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-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/terraform-aws-fdio-csit-dash-app-base/output.tf b/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/output.tf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/output.tf
diff --git a/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/providers.tf b/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/providers.tf
new file mode 100644
index 0000000000..7241b27c16
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-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/terraform-aws-fdio-csit-dash-app-base/variables.tf b/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/variables.tf
new file mode 100644
index 0000000000..25790290bc
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-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/terraform-aws-fdio-csit-dash-app-base/versions.tf b/fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base/versions.tf
new file mode 100644
index 0000000000..4afbbc00a7
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-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"
+}