ec2-instance-role

dod-iac/ec2-instance-role/aws

Terraform Module HCL AWS

IAM role for use as an EC2 instance role

Install
module "ec2-instance-role" {
source = "dod-iac/ec2-instance-role/aws"
version = "1.0.3"
}
plain text: /constructs/tfmod-dod-iac-ec2-instance-role-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Usage Creates a IAM role with no permissions for use as a EC2 instance role. ``hcl module "instance_role" { source = "dod-iac/ec2-instance-role/aws" name = format("app-%s-instance-role-%s", var.application, var.environment) tags = { Application = var.application Environment = var.environment Automation = "Terraform" } } ` Creates an IAM role for a EC2 instance that can join a AWS Managed Microsoft AD. `hcl module "domain_instance_role" { source = "dod-iac/ec2-instance-role/aws" allow_seamless_domain_join = true name = format("app-%s-domain-instance-role-%s", var.application, var.environment) tags = { Application = var.application Environment = var.environment Automation = "Terraform" } } ` For more information on joining AD domains see https://docs.aws.amazon.com/directoryservice/latest/ad

Inputs (6)
NameTypeDescriptionDefault
namestringThe name of the AWS IAM role. required
allow_ecsboolAllow instance to create or join an ECS cluster.false
allow_image_builderboolAllow instance to be managed by EC2 Image Builder.false
allow_seamless_domain_joinboolAllow instance to seamlessly join to your AWS Managed Microsoft AD directory.false
assume_role_policystringThe assume role policy for the AWS IAM role. If blank, allows EC2 instances in ""
tagsmap(string)Tags applied to the AWS IAM role.{}
Outputs (2)
arn — The Amazon Resource Name (ARN) of the AWS IAM Role.
name — The name of the AWS IAM Role.
Resources (2)
aws_iam_roleaws_iam_role_policy_attachment
Topics & Tags
terraformec2awsiam
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.3
Cloud AWS
★ Stars1
Forks2
Total downloads6.3k
Inputs6
Outputs2
Resources2
LicenseMIT
Namespacedod-iac
Updated