Open mponton opened 5 years ago
UPDATE: When I tested the above, I said:
I confirmed that having BOTH
catalog_id
andcatalog_name
set correctly will remove the "change" but curiously I also confirmed that if you havecatalog_id
set andcatalog_name
set to a name that does not correspond to saidcatalog_id
, no change is detected (which is what I would expect as well whencatalog_name
is empty).
But I reported that WITHOUT running the apply. Actually having both fields is an issue when CREATING a resource since the catalog_name
is looked up (and fails due to #129) but the catalog_id
is ignored.
So in my case, having both fields will produce this error:
* vra7_resource.compute: Error in finding catalog item id corresponding to the catlog item name BLUEPRINT_NAME:
<nil>
But having only catalog_id
works for creation but produce unnecessary changes for existing resources if apply is run a second time.
vRA 7.x version 7.4
Terraform version Terraform v0.11.11
terraform-provider-vra7 plugin version
119
Describe the bug I am using
catalog_id
to specify the blueprint to use in a deployment to work around #129 and noticed that if Iapply
against an already provisioned resource, I get the following:If I continue I get something like:
In the end, nothing is really changed but the same "change" will be detected and applied on the next run of
terraform apply
.Since I specified the
catalog_id
I would expect the plugin to realize thatcatalog_name
being empty is normal/acceptable.I confirmed that having BOTH
catalog_id
andcatalog_name
set correctly will remove the "change" but curiously I also confirmed that if you havecatalog_id
set andcatalog_name
set to a name that does not correspond to saidcatalog_id
, no change is detected (which is what I would expect as well whencatalog_name
is empty).To Reproduce Steps to reproduce the behavior:
catalog_id
to specify which blueprint to deployterraform apply
againcatalog_name
change is detectedExpected behavior
catalog_id
should have priority oncatalog_name
and when present,catalog_name
should simply be ignored in any case.NOTE: I would not consider this "issue" a priority. Simply letting you know of the unexpected behavior.