Our terraform projects are setup for multi environments where we have a separate tfvars and backend files for each environment. In the init step we pass the backend file using the -backend-config flag.
We wanted to use the terraform init task, but it requires you to specify the backend manually. I tried to just add the --backend-config to the commandOptions but it still required the other fields. It would be great if this functionality was added. Otherwise, if anyone has any suggestions for an alternate solution, I am all ears!
Our terraform projects are setup for multi environments where we have a separate tfvars and backend files for each environment. In the init step we pass the backend file using the -backend-config flag.
Example dev.backend file:
We wanted to use the terraform init task, but it requires you to specify the backend manually. I tried to just add the --backend-config to the commandOptions but it still required the other fields. It would be great if this functionality was added. Otherwise, if anyone has any suggestions for an alternate solution, I am all ears!