s3-iam-policy

dod-iac/s3-iam-policy/aws

Terraform Module HCL AWS

IAM policy that allows reading from a AWS S3 bucket.

Install
module "s3-iam-policy" {
source = "dod-iac/s3-iam-policy/aws"
version = "1.0.0"
}
plain text: /constructs/tfmod-dod-iac-s3-iam-policy-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Usage Creates an IAM policy that allows reading from a AWS S3 bucket. ``hcl module "s3_iam_policy" { source = "dod-iac/s3-iam-policy/aws" buckets = var.buckets name = format("%s-s3-user-%s", var.application, var.environment) } ` Creates an IAM policy that allows reading from an encrypted AWS S3 bucket. `hcl module "s3_kms_key" { source = "dod-iac/s3-kms-key/aws" name = format("alias/app-%s-s3-%s", var.application, var.environment) description = format("A KMS key used to encrypt objects at rest in S3 for %s:%s.", var.application, var.environment) principals = [var.instance_role_arn] tags = { Application = var.application Environment = var.environment Automation = "Terraform" } } module "s3_iam_policy" { source = "dod-iac/s3-iam-policy/aws" buckets = var.buckets keys = [module.s3_kms_key.aws

Inputs (5)
NameTypeDescriptionDefault
bucketslist(string)The ARNs of the AWS S3 buckets. Use ["*"] to allow all buckets. required
namestringThe name of the AWS IAM policy. required
require_mfastringIf true, actions require multi-factor authentication.false
descriptionstringThe description of the AWS IAM policy. Defaults to "The policy for [NAME]."""
keyslist(string)The ARNs of the AWS KMS keys. Use ["*"] to allow all keys.[]
Outputs (3)
arn — The Amazon Resource Name (ARN) of the AWS IAM policy.
id — The id of the AWS IAM policy.
name — The name of the AWS IAM policy.
Resources (1)
aws_iam_policy
Topics & Tags
terraformawsiams3
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.0
Cloud AWS
★ Stars1
Forks2
Total downloads5.9k
Inputs5
Outputs3
Resources1
LicenseMIT
Namespacedod-iac
Updated