Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

XaaS Blueprint with array/string input fails with expected type 'string', got unconvertible type '[]interface {}'` #159

Open
javansickle opened this issue May 9, 2019 · 5 comments

Comments

@javansickle
Copy link

javansickle commented May 9, 2019

vRA 7.x version
7.4

Terraform version
Terraform v0.11.11

terraform-provider-vra7 plugin version
provider.vra7 v0.2.0

Describe the bug
Have a simple XaaS Blueprint using a simple form. The underlying vRO workflow has an input field type of array/string. The corresponding form field (created by default) shows: entity type: sting and Type: text field.

In TF file, attempting to send an array of strings (either using a comma-separated list or even another complex terraform types like a list - using string values).
When running terraform apply get the error

Error: vra7_deployment.LB: deployment_configuration (IPAddresses): '' expected type 'string', got unconvertible type '[]interface {}'

Additionally, attempt to pass a single, simple string allows us to pass the terraform plan step, but fails during the apply as the value doesn't actually get ingested into the XaaS blueprint. The vRO log shows a 'not set' as the value for the array/string input.

To Reproduce
Steps to reproduce the behavior:

  1. Create a simple XaaS blueprint based upon a vRO workflow with one of the inputs set as a array/string data type.
  2. In TF, attempt to pass an array of strings (or list) and run a terraform plan.
  3. Get the error ' expected type 'string', got unconvertible type '[]interface {}'
  • AND/OR -
  1. Create a simple XaaS blueprint based upon a vRO workflow with one of the inputs set as a array/string data type.
  2. In TF, attempt to pass a simple, single string value and run a terraform apply.
  3. Provision of XaaS blueprint will show array/string input value as 'not set'.

Expected behavior
Passing an array of strings in a Terraform tf file should properly send the data to a XaaS blueprint with an input field of type array/string.

Logs
No vra-terraform.log at terraform plan step.

If attempting to pass single string, see vra-terraform.log attached.
vra-terraform.log

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here.

@jripault
Copy link

Same problem here, but as the provider use a simple format (string for all fields), I don't think it could be adapted this easily.
I'm trying some tweaks but no good for the moment

@jripault
Copy link

Seems like you need to implement your own resource because of typing. Can the devs confirm ?

@jonnyborbs
Copy link

@Prativa20 can you take a look at this?

@jonnyborbs
Copy link

@Prativa20 @markpeek I'm on the phone with @javansickle right now - can we take a look at this? Seems like a data type mismatch

@Prativa20
Copy link
Contributor

@vaficionado @javansickle looking into it..will update soon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants