diff options
author | 2021-10-29 06:19:46 +0000 | |
---|---|---|
committer | 2021-10-29 06:19:46 +0000 | |
commit | 5747228f8c7c793dcf62a94aeb11fdb96ee7a37e (patch) | |
tree | 73f06cc812604071f6d8517382b0c5ffa027da1b /fdio.infra.terraform/1n_nmd/aws | |
parent | 585b9d8bbf21b0c5a2d2c28809688563007760db (diff) |
feat(Terraform): AWS backend role migration
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I8c93eaaa766c48b705a19e38123b69c994669dc0
Diffstat (limited to 'fdio.infra.terraform/1n_nmd/aws')
-rw-r--r-- | fdio.infra.terraform/1n_nmd/aws/main.tf | 37 | ||||
-rw-r--r-- | fdio.infra.terraform/1n_nmd/aws/providers.tf | 14 | ||||
-rw-r--r-- | fdio.infra.terraform/1n_nmd/aws/variables.tf | 11 |
3 files changed, 0 insertions, 62 deletions
diff --git a/fdio.infra.terraform/1n_nmd/aws/main.tf b/fdio.infra.terraform/1n_nmd/aws/main.tf deleted file mode 100644 index be7eb7c577..0000000000 --- a/fdio.infra.terraform/1n_nmd/aws/main.tf +++ /dev/null @@ -1,37 +0,0 @@ -resource "vault_aws_secret_backend" "aws" { - access_key = var.aws_access_key - secret_key = var.aws_secret_key - path = "${var.name}-path" - - default_lease_ttl_seconds = "43200" - max_lease_ttl_seconds = "43200" -} - -resource "vault_aws_secret_backend_role" "admin" { - backend = vault_aws_secret_backend.aws.path - name = "${var.name}-role" - credential_type = "iam_user" - - policy_document = <<EOF -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "iam:*", "ec2:*" - ], - "Resource": "*" - } - ] -} -EOF -} - -output "backend" { - value = vault_aws_secret_backend.aws.path -} - -output "role" { - value = vault_aws_secret_backend_role.admin.name -} diff --git a/fdio.infra.terraform/1n_nmd/aws/providers.tf b/fdio.infra.terraform/1n_nmd/aws/providers.tf deleted file mode 100644 index 9bcd95ec57..0000000000 --- a/fdio.infra.terraform/1n_nmd/aws/providers.tf +++ /dev/null @@ -1,14 +0,0 @@ -terraform { - required_providers { - vault = { - version = ">=2.22.1" - } - } - required_version = ">= 1.0.3" -} - -provider "vault" { - address = "http://10.30.51.28:8200" - skip_tls_verify = true - token = "s.4z5PsufFwV3sHbCzK9Y2Cojd" -}
\ No newline at end of file diff --git a/fdio.infra.terraform/1n_nmd/aws/variables.tf b/fdio.infra.terraform/1n_nmd/aws/variables.tf deleted file mode 100644 index ee9fb73a73..0000000000 --- a/fdio.infra.terraform/1n_nmd/aws/variables.tf +++ /dev/null @@ -1,11 +0,0 @@ -variable "aws_access_key" { - sensitive = true -} - -variable "aws_secret_key" { - sensitive = true -} - -variable "name" { - default = "dynamic-aws-creds-vault-admin" -}
\ No newline at end of file |