This Terraform module creates structured mfa for aws resources with specific attributes.
- Use the module by referencing its source and providing the required variables.
module "mfa" {
source = "git::https://github.com/opsstation/terraform-aws-mfa.git?ref=v1.0.0"
name = "mfa1"
environment = "test"
users = []
groups = []
}
Please ensure you specify the correct 'source' path for the module.
name
: The name of the application.environment
: The environment (e.g., "test", "production").label_order
: Label order, e.g.name
,application
.enabled
: Flag to control the mfa creation.managedby
: ManagedBy, eg 'opsstation'.floating_ip
: Boolean to control whether floating IPs should be created.
- This module currently does not provide any outputs.
For detailed examples on how to use this module, please refer to the 'example' directory within this repository.
Your Name Replace '[License Name]' and '[Your Name]' with the appropriate license and your information. Feel free to expand this README with additional details or usage instructions as needed for your specific use case.
This project is licensed under the MIT License - see the LICENSE file for details.
Name | Version |
---|---|
terraform | >= 1.7.3 |
aws | >= 5.31.0 |
Name | Version |
---|---|
aws | >= 5.31.0 |
Name | Source | Version |
---|---|---|
labels | git::https://github.com/opsstation/terraform-aws-labels.git | v1.0.0 |
Name | Type |
---|---|
aws_iam_group_policy_attachment.assign_force_mfa_policy_to_groups | resource |
aws_iam_policy.enable_mfa | resource |
aws_iam_user_policy_attachment.assign_force_mfa_policy_to_users | resource |
aws_iam_policy_document.enable_mfa | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
environment | Environment (e.g. prod , dev , staging ). |
string |
"" |
no |
groups | enable MFA for the members in these groups | list(string) |
[] |
no |
label_order | Label order, e.g. name ,application . |
list(any) |
[ |
no |
managedby | ManagedBy, eg 'opsstation'. | string |
"opsstation" |
no |
name | Name (e.g. test or mfa ). |
string |
n/a | yes |
path | The path of the policy in MFA. | string |
"/" |
no |
repository | Terraform current module repo | string |
"https://github.com/opsstation/terraform-aws-mfa" |
no |
tags | Additional tags (e.g. map(BusinessUnit ,XYZ ). |
map(any) |
{} |
no |
users | enable MFA for these users | list(string) |
[] |
no |
Name | Description |
---|---|
iam-arn | The ARN (Amazon Resource Name) of the IAM policy with MFA (Multi-Factor Authentication) enabled. |
tags_all | All tags associated with the IAM policy with MFA enabled. |