Open chore1110 opened 7 months ago
There are several ways to share values between different root modules in Terraform.
(1) Just put the literal value in the code
(2) Use a data source that references a specific resource type. (e.g. data "aws_iam_role"
)
(3) Use a data source that references some Key-Value store (e.g. data "aws_ssm_parameter"
)
(4) Use a data source that references a remote Terraform state. (a.k.a. data "terraform_remote_state"
)
This is more of a Terraform usage question than a tfmigrate one, so I won't say which one is best for you.
FYI: https://developer.hashicorp.com/terraform/language/state/remote-state-data
I want to split the following tf file with dependencies into different states only for operator-role module by tf migrate. I would like to leave the production-hoge resource in its current state.
output.tf
But when I run tfmigrate plan, I get an error. Is there any way to work around this error?