terraform-provider-vcd: Importing an existing UI plugin doesn't work as documented
I am attempting to cutomize the VCD portal by publishing an existing plugin to an organization. However the documented method for doing this doesn’t work. The method is to create an empty vcd_ui_plugin resource, then to import the existing plugin into that resource which can then be manipulated. Attempting to create the empty resource fails because the resource expects to be given the “path” parameter to a zip file containing a new plugin.
Terraform Version
Terraform v1.6.6 on windows_amd64
Affected Resource(s)
- vdc_ui_plugin
Terraform Configuration Files
resource “vcd_ui_plugin” “my_plugin” { enabled = true }
Debug Output
vcd_ui_plugin.my_plugin: Creating… ╷ │ Error: could not create the UI Plugin: plugin path must not be empty │ │ with vcd_ui_plugin.my_plugin, │ on customize-portal.tf line 3, in resource “vcd_ui_plugin” “my_plugin”: │ 3: resource “vcd_ui_plugin” “my_plugin” { │ ╵
Panic Output
N/A
Expected Behavior
An empty vcd_ui_plugin resource should have been created that I could then import an existing UI plugin into (as described in the vcd_ui_plugin resource documentation).
Actual Behavior
The above error occured.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
User Access rights
N/A
Important Factoids
N/A
References
N/A
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15
@adambarreiro I wasn’t able to test it without
countbut I’ve seen something interesting on terraform core debug logs (I have three importedvcd_ui_pluginbut only one, in this case, is marked to be created:it seems something on provider side
Today I cannot reproduce the issue, I have a correct
update in place. Anyway I do not use anymore the local value:Hi Adam
Thank you for your prompt response.
I have tried doing the import first, but mage the mistake of removing the resource from my code before doing so. Now I’ve done the import with the code in place it works correctly.
Many thanks for your help.
/Jonathan