Terraform scenarios When Using Data Source with Multiple Providers in One Module
I'm wondering if anyone has experience with I'm working with an scenario when trying to reference a data source from two different providers within the same module in Terraform. My configuration looks something like this: ```hcl provider "aws" { region = "us-west-2" } provider "google" { project = "my-gcp-project" region = "us-central1" } data "aws_ami" "latest" { most_recent = true owners = ["amazon"] } data "google_compute_instance" "default" { name = "my-instance" zone = "us-central1-a" } module "my_module" { source = "./modules/my_module" ami_id = data.aws_ami.latest.id gcp_instance_name = data.google_compute_instance.default.name } ``` However, when I run `terraform apply`, I get the following behavior: ``` behavior: Reference to undeclared input variable on modules/my_module/main.tf line 10, in variable "gcp_instance_name": 10: variable "gcp_instance_name" { The "gcp_instance_name" variable is not declared in the module. ``` I have double-checked the `variables.tf` file in the `my_module` directory, and it does declare the input variable for `gcp_instance_name` like this: ```hcl variable "gcp_instance_name" { description = "Name of the GCP compute instance" type = string } ``` I also verified that the path to the module is correct and that I am referencing it properly in my main configuration. I'm puzzled because I can successfully reference the AWS data source, but the GCP data source seems to be causing issues. I tried explicitly passing the `gcp_instance_name` variable in the module, but the behavior continues. Has anyone faced a similar scenario or have insights on how to resolve this conflict? Is there a better approach?