As mentioned in a previous change, the thing creating the Data Source or
Resource it calls the Metadata method on doesn't actually hold onto
the Data Source or Resource it just created. So, we can't set any data
in that method and expect it to persist.
What we do instead, is set the data in the Configure method. This
seems to persist for the lifecycle of the Data Source or Resource. Then,
our logs work the way they're supposed to.
We also move the setting of the terraformType to the initialization of
the respective Data Source or Resource function. It doesn't really make
a whole lot of sense to wait to set that in the Configure method,
since we already know at compile time what it's going to be.
As mentioned in a previous change, the thing creating the Data Source or Resource it calls the
Metadata
method on doesn't actually hold onto the Data Source or Resource it just created. So, we can't set any data in that method and expect it to persist.What we do instead, is set the data in the
Configure
method. This seems to persist for the lifecycle of the Data Source or Resource. Then, our logs work the way they're supposed to.We also move the setting of the
terraformType
to the initialization of the respective Data Source or Resource function. It doesn't really make a whole lot of sense to wait to set that in theConfigure
method, since we already know at compile time what it's going to be.