From b641368c0ab43f4b2d701057c0d0d86368dc7448 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sat, 27 Apr 2024 17:51:14 -0700 Subject: [PATCH] Getting creds from output --- infra/static-vultr/output.tf | 6 ++++++ infra/static-vultr/s3-reader.tf | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/infra/static-vultr/output.tf b/infra/static-vultr/output.tf index 556065d..1d553ad 100644 --- a/infra/static-vultr/output.tf +++ b/infra/static-vultr/output.tf @@ -2,3 +2,9 @@ output host_ssh_key { sensitive = true value = tls_private_key.host.private_key_pem } + +output vultr_keys { + sensitive = true + value = aws_iam_access_key.vultr.secret +} + diff --git a/infra/static-vultr/s3-reader.tf b/infra/static-vultr/s3-reader.tf index f6cfc34..0c96000 100644 --- a/infra/static-vultr/s3-reader.tf +++ b/infra/static-vultr/s3-reader.tf @@ -47,5 +47,14 @@ resource aws_iam_role_policy_attachment vultr { policy_arn = aws_iam_policy.vultr.arn } +resource aws_iam_user_policy_attachment vultr { + user = aws_iam_user.vultr.name + policy_arn = aws_iam_policy.vultr.arn +} +# Keys for the user to do stuff +resource aws_iam_access_key vultr { + user = aws_iam_user.vultr.name +} +