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"
}
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)
| Name | Type | Description | Default |
|---|---|---|---|
| from_resource_name | string | required | |
| from_index | string | required | |
| to_resource_type | string | required | |
| to_resource_name | string | required | |
| to_index | string | required | |
| path | string | required | |
| from_resource_type | string | required |
Resources (1)
local_file
Details
FrameworkTerraform Module
LanguageHCL
Version0.0.1
Cloud LOCAL
★ Stars0
Forks0
Total downloads571
Inputs7
Resources1
NamespaceAdrienneCohea
Updated