Getting creds from output

This commit is contained in:
shockrah 2024-04-27 17:51:14 -07:00
parent fb960b2f1f
commit b641368c0a
2 changed files with 15 additions and 0 deletions

View File

@ -2,3 +2,9 @@ output host_ssh_key {
sensitive = true sensitive = true
value = tls_private_key.host.private_key_pem value = tls_private_key.host.private_key_pem
} }
output vultr_keys {
sensitive = true
value = aws_iam_access_key.vultr.secret
}

View File

@ -47,5 +47,14 @@ resource aws_iam_role_policy_attachment vultr {
policy_arn = aws_iam_policy.vultr.arn 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
}