terraform workspace select old-name
terraform state pull >old-name.tfstate
terraform workspace new new-name
terraform state push old-name.tfstate
terraform show just to confirm that the newly-imported state looks "right", before we delete the old workspace
terraform workspace delete -force old-name
-
https://discuss.hashicorp.com/t/how-to-change-the-name-of-a-workspace/24010/2Un Operator qui :
Du coup on peut créer des resources AWS avec kube (on peut se passer de terraform, on peut utiliser une CI/CD adaptée à déployer dans Kube)
-
https://crossplane.io/foreach list of objects
[{
name = "xxx"
description = "xxx"
param = "xxx"
},
...
]
for_each = {
for item in var.items:
item.name => item
}
name = each.key OU each.value.name
description = each.value.description
-
https://stackoverflow.com/questions/58594506/how-to-for-each-through-a-listobjects-in-terraform-0-12