hashicorp / terraform-cdk

Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform
https://www.terraform.io/cdktf
Mozilla Public License 2.0
4.84k stars 449 forks source link

Support terraform cli options #734

Open karthikns16 opened 3 years ago

karthikns16 commented 3 years ago

Community Note

Description

I am working on setting up OKTA application using OKTA provider https://registry.terraform.io/providers/oktadeveloper/okta/latest/docs

This provider seems to have a bug https://github.com/okta/terraform-provider-okta/issues/162 and are unable to handle parallel request sent by terraform. We have to use -parallelism=1. cdktf deploy doesn't seem support terraform cli options

Hence instead of using cdktf deploy, I have to resort to using terraform apply --auto-approve -parallelism=1 after cdktf synth

Would be great if terraform cli options honored by cdktf cli

References

RomeroGaliza commented 2 years ago

I have a very similar use case with SignalFX provider, where it turns out that -parallelism=1 can be used as a workaround.

jsteinich commented 2 years ago

It might be interesting to explore allowing something like cdktf deploy stack -- -parallelism=1 -target=mymodule. I've worked with a few tools that have this idea of a separator after which all options are directly passed to underlying tools. In this example an empty -- is treated as the separator, but could come up with something else.

mutahhir commented 1 year ago

I think this will be solved between #2107 and the move to Terraform CLI

DanielMSchmidt commented 1 year ago

Closed by #2468

jsteinich commented 1 year ago

While a few cli flags are supported, there still isn't general support for them.