Issue using relative path for module

Hello,

I am having a weird issue with relative path and using a terraform module. I am currently running my terraform from Stg path. When running this local via visual code I do not have any issue.

In tf file I am using the source to pull the module.

As I said before this all works fine on my Windows local. I am able to initialize plan and apply the terraform code.

When I try to run this in a linux box I am seeing issues. It basically is saying that the argument is not expected.

╷
│ Error: Unsupported argument
│
│   on ../../modules/emr/emr.tf line 5, in module "emr":
│    5:   create_iam_instance_profile = false
│
│ An argument named "create_iam_instance_profile" is not expected here.
╵
╷
│ Error: Unsupported argument
│
│   on ../../modules/emr/emr.tf line 7, in module "emr":
│    7:   name                        = var.cluster_name
│
│ An argument named "name" is not expected here.
╵

If I change the relative path of the source and put the absolute path it works fine on the linux machine. Is there a way to fix this? Is there some sort of weird bug?
In our cicd pipeline we really can use absolute pathing.

Any help would be appreciated.

hi @solve-rditusa,

Please don’t post pictures of text, the images aren’t even scaled correctly and make it difficult to see what you’re asking.

It think the only reasonable answer here though is that the files are laid out differently in the remote system. Maybe you have local changes which have not been committed, maybe something wasn’t copied to where it should have been – but there’s really no way to know without a detailed comparison of the configuration on both systems or a complete example to reproduce the behavior.