Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d/vra_deployments: Error: error setting deployment inputs #493

Open
kkawatra09 opened this issue Mar 31, 2023 · 5 comments
Open

d/vra_deployments: Error: error setting deployment inputs #493

kkawatra09 opened this issue Mar 31, 2023 · 5 comments
Labels
bug Something isn't working needs-triage

Comments

@kkawatra09
Copy link

Error: error setting deployment inputs - error: &errors.errorString{s:"inputs.disks: '' expected type 'string', got unconvertible type '[]interface {}', value: '[]'"}

@an2ane
Copy link
Contributor

an2ane commented Apr 3, 2023

What's your inputs, vRA provider & TF version? How to reproduce?

@ajoga
Copy link

ajoga commented May 26, 2023

Same issue here whether I specify id or name.

data "vra_deployment" "this" {
  id = "01cc2b84-357a-4fd9-98d9-0f7a94922da1"
}
╷
│ Error: error setting deployment inputs - error: &errors.errorString{s:"inputs.Local_Mapping1: '' expected type 'string', got unconvertible type 'bool', value: 'false'"}
│
│   with data.vra_deployment.this,
│   on main.tf line 22, in data "vra_deployment" "this":
│   22: data "vra_deployment" "this" {
│
╵
$ terraform -version
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/vmware/vra v0.7.2

I only have another data source for a vra_security_group that works well.

I tried provider version v0.4.1 and 0.3.9, same error

@an2ane
Copy link
Contributor

an2ane commented May 27, 2023

The provider takes string, number, bool as inputs. For example, if you use "Properties", you have to "jsonencode" it to be able to send it to vRA.

What is the type of "inputs.Local_Mapping1"?

@ajoga
Copy link

ajoga commented May 30, 2023

What is the type of "inputs.Local_Mapping1"?

I didn't define anything named as such so I have no idea. The provider is defined this way:

provider "vra" {
  url = var.vra_endpoint
}

And I run terraform with

export VRA_ACCESS_TOKEN="<your access token>"
terraform apply

@an2ane
Copy link
Contributor

an2ane commented May 30, 2023

No issue at all using the last version of the vra provider, nor a custom made for a future push.

terraform -version
Terraform v1.2.6
on windows_amd64
+ provider local/vmware/vra v0.7.3

Working on vRA Cloud 8.12.1

data "vra_deployment" "this" {
  id = "myid"
}

output "test" {
  value = data.vra_deployment.this
}

Changes to Outputs:
   test = {
       blueprint_id         = "wwwww"
       blueprint_version    = "1.0.9"
       catalog_item_id      = "yyyyy"
       catalog_item_version = "1.0.9"
       created_at           = "2023-05-23T13:44:31.900Z"
       created_by           = "[email protected]"
       description          = ""
       expand_last_request  = false
       expand_project       = false
       expand_resources     = false
       expense              = []
       id                   = "myid"
       ...
}

You should check the Terraform logs

$env:TF_LOG = "TRACE"
$env:TF_LOG_PATH="./logs/terraform_TRACE.log"

@tenthirtyam tenthirtyam changed the title Data source vra_Deployments throwing an error d/vra_deployments: Error: error setting deployment inputs Jul 10, 2024
@tenthirtyam tenthirtyam added bug Something isn't working needs-triage labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

4 participants