diff options
author | Peter Mikus <pmikus@cisco.com> | 2022-03-31 15:59:10 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2022-04-01 10:54:23 +0000 |
commit | ca81b6ccfdcee62846217f824c1e4a1610b8a950 (patch) | |
tree | f0f836509b346cd59e9d10b5d67abe71cddb3264 /fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base | |
parent | e972e67afac3ab3eb785668d01d3bdf1833eade9 (diff) |
refactor(terraform): Directory structure
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I2f3cdf0241aaf7c4a8ba4e00b701df10c9165cf8
Diffstat (limited to 'fdio.infra.terraform/terraform-aws-fdio-csit-dash-app-base')
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" +} |