Home

Awesome

terraform-aws-tfaction

Terraform Modules for tfaction (AWS resources)

https://suzuki-shunsuke.github.io/tfaction/docs/config/add-working-directory/#aws-iam-role

Example

module "aws" {
  source = "github.com/suzuki-shunsuke/terraform-aws-tfaction"

  name                               = "AWS"
  repo                               = "suzuki-shunsuke/tfaction-example"
  main_branch                        = "main"
  s3_bucket_tfmigrate_history_name   = "<S3 Bucket Name for tfmigrate hisotry>"
  s3_bucket_terraform_state_name     = "<S3 Bucket Name for terraform state>"
}

# Attach Policies

resource "aws_iam_role_policy_attachment" "terraform_apply_admin" {
  role       = module.aws.aws_iam_role_terraform_apply_name
  policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
}

resource "aws_iam_role_policy_attachment" "terraform_plan_readonly" {
  role       = module.aws.aws_iam_role_terraform_plan_name
  policy_arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"
}

resource "aws_iam_role_policy_attachment" "tfmigrate_plan_readonly" {
  role       = module.aws.aws_iam_role_tfmigrate_plan_name
  policy_arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"
}

resource "aws_iam_role_policy_attachment" "tfmigrate_apply_readonly" {
  role       = module.aws.aws_iam_role_tfmigrate_apply_name
  policy_arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"
}

Requirements

NameVersion
<a name="requirement_terraform"></a> terraform>= 0.13.1
<a name="requirement_aws"></a> aws>= 3.63

Providers

NameVersion
<a name="provider_aws"></a> aws>= 3.63

Modules

No modules.

Resources

NameType
aws_iam_openid_connect_provider.githubresource
aws_iam_policy.put_terraform_stateresource
aws_iam_policy.put_tfmigrate_historyresource
aws_iam_policy.read_terraform_stateresource
aws_iam_policy.read_tfmigrate_historyresource
aws_iam_role.terraform_applyresource
aws_iam_role.terraform_planresource
aws_iam_role.tfmigrate_applyresource
aws_iam_role.tfmigrate_planresource
aws_iam_role_policy_attachment.terraform_apply_put_terraform_stateresource
aws_iam_role_policy_attachment.terraform_apply_read_terraform_stateresource
aws_iam_role_policy_attachment.terraform_plan_read_terraform_stateresource
aws_iam_role_policy_attachment.tfmigrate_apply_put_terraform_stateresource
aws_iam_role_policy_attachment.tfmigrate_apply_put_tfmigrate_historyresource
aws_iam_role_policy_attachment.tfmigrate_apply_read_terraform_stateresource
aws_iam_role_policy_attachment.tfmigrate_apply_read_tfmigrate_historyresource
aws_iam_role_policy_attachment.tfmigrate_plan_read_terraform_stateresource
aws_iam_role_policy_attachment.tfmigrate_plan_read_tfmigrate_historyresource
aws_caller_identity.currentdata source
aws_iam_policy_document.assume_role_policy_maindata source
aws_iam_policy_document.assume_role_policy_prdata source
aws_iam_policy_document.put_terraform_statedata source
aws_iam_policy_document.put_tfmigrate_historydata source
aws_iam_policy_document.read_terraform_statedata source
aws_iam_policy_document.read_tfmigrate_historydata source

Inputs

NameDescriptionTypeDefaultRequired
<a name="input_assume_role_policy_main_conditions"></a> assume_role_policy_main_conditionsn/a<pre>list(object({<br> test = string<br> variable = string<br> values = list(string)<br> }))</pre>nullno
<a name="input_assume_role_policy_pr_conditions"></a> assume_role_policy_pr_conditionsn/a<pre>list(object({<br> test = string<br> variable = string<br> values = list(string)<br> }))</pre>nullno
<a name="input_create_oidc_provider"></a> create_oidc_providern/aboolfalseno
<a name="input_main_branch"></a> main_branchn/astring"main"no
<a name="input_name"></a> namen/astringn/ayes
<a name="input_repo"></a> repon/astringn/ayes
<a name="input_s3_bucket_terraform_state_name"></a> s3_bucket_terraform_state_namen/astring""no
<a name="input_s3_bucket_tfmigrate_history_name"></a> s3_bucket_tfmigrate_history_namen/astringn/ayes

Outputs

NameDescription
<a name="output_aws_iam_role_terraform_apply_arn"></a> aws_iam_role_terraform_apply_arnAWS IAM Role ARN for terraform apply
<a name="output_aws_iam_role_terraform_apply_name"></a> aws_iam_role_terraform_apply_nameAWS IAM Role name for terraform apply
<a name="output_aws_iam_role_terraform_plan_arn"></a> aws_iam_role_terraform_plan_arnAWS IAM Role ARN for terraform plan
<a name="output_aws_iam_role_terraform_plan_name"></a> aws_iam_role_terraform_plan_nameAWS IAM Role name for terraform plan
<a name="output_aws_iam_role_tfmigrate_apply_arn"></a> aws_iam_role_tfmigrate_apply_arnAWS IAM Role ARN for tfmigrate apply
<a name="output_aws_iam_role_tfmigrate_apply_name"></a> aws_iam_role_tfmigrate_apply_nameAWS IAM Role name for tfmigrate apply
<a name="output_aws_iam_role_tfmigrate_plan_arn"></a> aws_iam_role_tfmigrate_plan_arnAWS IAM Role ARN for tfmigrate plan
<a name="output_aws_iam_role_tfmigrate_plan_name"></a> aws_iam_role_tfmigrate_plan_nameAWS IAM Role name for tfmigrate plan

LICENSE

MIT


This document is generated by terraform-docs