Skip to content

Ben's Terraform AWS Terraform Backend & Apply Users Module

License

Notifications You must be signed in to change notification settings

bendoerr-terraform-modules/terraform-aws-tfuser

Repository files navigation


Logo

Ben's Terraform AWS Terraform Backend & Apply Users Module

This is how I do it.

Explore the docs »

Report Bug . Request Feature

GitHub contributors GitHub issues GitHub pull requests GitHub workflow: Terratest GitHub workflow: Linting GitHub tag (with filter) OSSF-Scorecard Score GitHub License

About The Project

Ben's Terraform AWS Terraform Backend & Apply Users Module

Usage

TODO

module "context" {
  source    = "bendoerr-terraform-modules/context/null"
  version   = "xxx"
  namespace = "btm"
  role      = "production"
  region    = "us-east-1"
  project   = "core"
}

module "tfuser" {
  source  = "bendoerr-terraform-modules/tfuser/aws"
  version = "xxx"
  context = module.context.shared
}

Cost

There should be no cost associated with this module as it only creates IAM resources which have no cost.

Requirements

Name Version
terraform >= 0.13
aws ~> 5.0

Providers

Name Version
aws 5.30.0

Modules

Name Source Version
label_apply bendoerr-terraform-modules/label/null 0.4.1
label_backend bendoerr-terraform-modules/label/null 0.4.1
label_backend_dynamodb_rw bendoerr-terraform-modules/label/null 0.4.1
label_backend_s3_rw bendoerr-terraform-modules/label/null 0.4.1

Resources

Name Type
aws_iam_access_key.apply resource
aws_iam_access_key.backend resource
aws_iam_policy.apply_1 resource
aws_iam_policy.apply_2 resource
aws_iam_policy.backend_dynamodb_rw resource
aws_iam_policy.backend_s3_rw resource
aws_iam_role.apply resource
aws_iam_role.backend resource
aws_iam_role_policy_attachment.apply_1 resource
aws_iam_role_policy_attachment.apply_2 resource
aws_iam_role_policy_attachment.backend_dynamodb resource
aws_iam_role_policy_attachment.backend_s3 resource
aws_iam_user.apply resource
aws_iam_user.backend resource
aws_iam_policy_document.apply_1 data source
aws_iam_policy_document.apply_2 data source
aws_iam_policy_document.apply_assume_role data source
aws_iam_policy_document.backend_assume_role data source
aws_iam_policy_document.backend_dynamodb_rw data source
aws_iam_policy_document.backend_s3_rw data source
aws_iam_role.apply data source
aws_iam_role.backend data source
aws_iam_user.apply data source
aws_iam_user.backend data source

Inputs

Name Description Type Default Required
apply_role n/a
object({
create = bool
arn = optional(string) # req, if create is false

extra_assume_statements = optional(list(object({
actions = list(string)
principals = object({
type = string
identifiers = list(string)
})
conditions = optional(list(object({
test = string
variable = string
values = list(string)
})))
})))

budgets = optional(bool, false)
dynamodb = optional(bool, false)
ec2_account = optional(bool, false)
ec2_networking = optional(bool, false)
ec2_tags = optional(bool, false)
ecs = optional(bool, false)
efs = optional(bool, false)
iam = optional(bool, false)
kms = optional(bool, false)
lambda = optional(bool, false)
logs = optional(bool, false)
route53 = optional(bool, false)
s3 = optional(bool, false)
sns = optional(bool, false)
ssm_params = optional(bool, false)
})
n/a yes
apply_user n/a
object({
create = bool
name = optional(string) # req, if create is false or invalid
force_destroy = optional(bool) # opt
pgp_key = optional(string) # req if create is true or invalid
})
n/a yes
backend_role n/a
object({
create = bool
arn = optional(string) # opt, if create is false

extra_assume_statements = optional(list(object({
actions = list(string)
principals = object({
type = string
identifiers = list(string)
})
conditions = optional(list(object({
test = string
variable = string
values = list(string)
})))
})))

dynamodb_policy = optional(object({
create = bool
policy_arn = optional(string) # req, if create is false or invalid
table_arn = optional(string) # req, if create is true or invalid
kms_key = optional(string) # opt, if create is true or invalid
}), { create = false })

s3_policy = optional(object({
create = bool
policy_arn = optional(string) # req, if create is false or invalid
bucket_arn = optional(string) # req, if create is true or invalid
kms_key = optional(string) # opt, if create is true or invalid
}), { create = false })
})
{
"create": false
}
no
backend_user n/a
object({
create = bool
name = optional(string) # req, if create is false or invalid
force_destroy = optional(bool) # opt
pgp_key = optional(string) # req if create is true or invalid
})
{
"create": false
}
no
context Shared Context from Ben's terraform-null-context
object({
attributes = list(string)
dns_namespace = string
environment = string
instance = string
instance_short = string
namespace = string
region = string
region_short = string
role = string
role_short = string
project = string
tags = map(string)
})
n/a yes

Outputs

Name Description
apply_role_arn n/a
apply_role_name n/a
apply_user_access_key_encrypted_secret n/a
apply_user_access_key_id n/a
apply_user_arn n/a
apply_user_name n/a
apply_user_unique_id n/a
backend_dynamodb_rw_policy_arn n/a
backend_role_arn n/a
backend_role_name n/a
backend_s3_rw_policy_arn n/a
backend_user_access_key_encrypted_secret n/a
backend_user_access_key_id n/a
backend_user_arn n/a
backend_user_name n/a
backend_user_unique_id n/a

Roadmap

GitHub issues

See the open issues for a list of proposed features (and known issues).

Contributing

GitHub pull requests

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.

Creating A Pull Request

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

GitHub License

Distributed under the MIT License. See LICENSE for more information.

Authors

GitHub contributors

  • Benjamin R. Doerr - Terraformer - Benjamin R. Doerr - Built Ben's Terraform Modules

Supported Versions

Only the latest tagged version is supported.

Reporting a Vulnerability

See SECURITY.md.

Acknowledgements