refactor-codegen

AdrienneCohea/refactor-codegen/local

Terraform Module HCL LOCAL

Generate Terraform code to ease more complicated refactors

Install
module "refactor-codegen" {
source = "AdrienneCohea/refactor-codegen/local"
version = "0.0.1"
}
plain text: /constructs/tfmod-adriennecohea-refactor-codegen-local/install.txt
⭐ Source on GitHub 📦 Registry page
README

terraform-local-refactor-codegen Generate Terraform code to ease more complicated refactors Example usage ``terraform resource "vault_transit_secret_backend_key" "key" { for_each = toset(var.keys) backend = vault_mount.transit.path name = each.key deletion_allowed = true } module "count_to_foreach" { count = length(var.keys) source = "./moves" from_resource_type = "vault_transit_secret_backend_key" from_resource_name = "key" from_index = count.index to_resource_type = "vault_transit_secret_backend_key" to_resource_name = "key" to_index = var.keys[count.index] path = "${path.module}/moved-keys-${count.index}.tf" } ``

Inputs (7)
NameTypeDescriptionDefault
from_resource_namestring required
from_indexstring required
to_resource_typestring required
to_resource_namestring required
to_indexstring required
pathstring required
from_resource_typestring required
Resources (1)
local_file
Details
FrameworkTerraform Module
LanguageHCL
Version0.0.1
Cloud LOCAL
★ Stars0
Forks0
Total downloads571
Inputs7
Resources1
NamespaceAdrienneCohea
Updated