terraform-provider-splitpolicies

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: Unlicense Imports: 5 Imported by: 0

README

Terraform Policy Splitter

This provider has one simple job - to take an array of documents and to combine them into documents no larger than a given size. The driving force behind this is to take a list of AWS policies and combine them into large policy documents that don't overflow then AWS-imposed limit of 6144 bytes. The chunk size can be configured though.

Usage

data "splitpolicies" "test" {
  policies = ["one", "two", "three"]
  maximum_chunk_size = 6
}

data "aws_iam_policy_document" "policy_docs" {
  for_each                = data.splitpolicies.test.chunks
  source_policy_documents = each.value
}

resource "aws_iam_policy" "policies" {
    for_each = data.aws_iam_policy_document.policy_docs
    policy   = each.value.json
}

Documentation

Overview

Package main provides the entrypoint to start the plugin

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL