aztfmod / terraform-provider-azurecaf

Terraform provider for the Terraform platform engineering for Azure
172 stars 91 forks source link

Problems in the datasource/resource evaluation order #159

Closed etiennejournet closed 1 year ago

etiennejournet commented 2 years ago

Hello team !

Thanks for your work on this module :) I wanted to signal that I had some problems with resource creation order (which made me wonder why you didn't make this a datasource ?)

In short the problem comes from datasources being evaluated first at plan, and If you need to use a datasource that depends on a azurecaf resource it can make your terraform plan unable to resolve this datasource (and to access subsequent resources).

Here is an example :

Nepomuceno commented 2 years ago

It makes completly sense sorry I never thought about this before with the upcoming new version 2.0.0 I will add it as data this way you could have it as data instead of resource if you want to to avoid this kind of thing.

arnaudlh commented 1 year ago

Closing as introduced in https://github.com/aztfmod/terraform-provider-azurecaf/releases/tag/v1.2.22. We will roll out in the next major version of the caf module Feel free to reopen if not solved.