mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
d9221bb925
Add has MFA enabled member Add "has console password" member Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
25 lines
No EOL
557 B
HCL
25 lines
No EOL
557 B
HCL
provider "aws" {}
|
|
|
|
resource "aws_instance" "example" {
|
|
ami = "ami-0d729a60"
|
|
instance_type = "t2.micro"
|
|
|
|
tags {
|
|
Name = "Example"
|
|
X-Project = "inspec"
|
|
}
|
|
}
|
|
|
|
resource "aws_iam_user" "mfa_not_enabled_user" {
|
|
name = "mfa_not_enabled_user"
|
|
}
|
|
|
|
resource "aws_iam_user" "console_password_enabled_user" {
|
|
name = "console_password_enabled_user"
|
|
force_destroy = true
|
|
}
|
|
|
|
resource "aws_iam_user_login_profile" "u" {
|
|
user = "${aws_iam_user.console_password_enabled_user.name}"
|
|
pgp_key = "${var.login_profile_pgp_key}"
|
|
} |