iam-s3-user

cloudposse/iam-s3-user/aws

Terraform Module HCL AWS

Terraform module to provision a basic IAM user with permissions to access S3 resources, e.g. to give the user read/write/delete access to the objects in an S3 bucket

Install
module "iam-s3-user" {
source = "cloudposse/iam-s3-user/aws"
version = "1.2.1"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-iam-s3-user Terraform module to provision a basic IAM user with permissions to access S3 resources, e.g. to give the user read/write/delete access to the objects in an S3 bucket. Suitable for CI/CD systems (_e.g._ TravisCI, CircleCI) or systems which are external to AWS that cannot leverage AWS IAM Instance Profiles or AWS OIDC. By default, IAM users, groups, and roles have no access to AWS resources. IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended that IAM policies be applied directly to groups and roles but not users. This module intentionally attaches an IAM policy directly to the user and does not use groups The IAM user name is constructed using terraform-null-label and some input is required. The simplest input is

Inputs (26)
NameTypeDescriptionDefault
s3_resourceslist(string)S3 resources to apply the actions specified in the policy required
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
force_destroyboolDestroy even if it has non-Terraform-managed IAM access keys, login profiles or false
pathstringPath in which to create the user"/"
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
ssm_base_pathstringThe base path for SSM parameters where secrets are stored"/s3_user/"
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
create_iam_access_keyboolSet `true` to create an IAM Access Key for the user. To rotate the key, set `faltrue
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
ssm_enabledboolSet `true` to store secrets in SSM Parameter Store, `false` to store secrets in false
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
s3_actionslist(string)Actions to allow in the policy[ "s3:GetObject" ]
permissions_boundarystringPermissions Boundary ARN to attach to our created usernull
Outputs (7)
secret_access_key — Secret Access Key. This will be written to the state file in plain-text
access_key_id_ssm_path — The SSM Path under which the S3 User's access key ID is stored
secret_access_key_ssm_path — The SSM Path under which the S3 User's secret access key is stored
user_name — Normalized IAM user name
user_arn — The ARN assigned by AWS for the user
user_unique_id — The user unique ID assigned by AWS
access_key_id — Access Key ID
Resources (1)
aws_iam_user_policy
Details
FrameworkTerraform Module
LanguageHCL
Version1.2.1
Cloud AWS
★ Stars57
Forks42
Total downloads19.5M
Inputs26
Outputs7
Resources1
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated