-
Notifications
You must be signed in to change notification settings - Fork 49
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
unexpected end of JSON input #23
Comments
Hi @thoregilK , |
hi @mildwonkey I was hoping that debug would have more information but it does not seems to be the case. 2018/09/07 07:04:12 [INFO] command: backend <nil> is not enhanced, wrapping in local
2018/09/07 07:04:12 [INFO] backend/local: starting Apply operation
2018/09/07 07:04:14 [DEBUG] New state was assigned lineage "b5172850-e4b7-bd1c-6f5d-a97004f38d88"
2018/09/07 07:04:15 [INFO] terraform: building graph: GraphTypeInput
2018/09/07 07:04:15 [DEBUG] Resource state not found for "data.external.webhook": data.external.webhook
2018/09/07 07:04:15 [DEBUG] pruning unused provider provider.azurerm.development
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "provider.external" references: []
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "data.external.webhook" references: []
2018/09/07 07:04:15 [TRACE] Graph after step *terraform.ReferenceTransformer:
data.external.webhook - *terraform.NodeAbstractResource
provider.external - *terraform.NodeApplyableProvider
provider.external - *terraform.NodeApplyableProvider
2018/09/07 07:04:15 [DEBUG] Starting graph walk: walkInput
2018-09-07T07:04:15.193+0200 [DEBUG] plugin: starting plugin: path=C:\GitHub\terraform-azure\test\.terraform\plugins\windows_amd64\terraform-provider-external_v1.0.0_x4.exe args=[C:\GitHub\terraform-azure\test\.terraform\plugins\windows_amd64\terraform-provider-external_v1.0.0_x4.exe]
2018-09-07T07:04:15.196+0200 [DEBUG] plugin: waiting for RPC address: path=C:\GitHub\terraform-azure\test\.terraform\plugins\windows_amd64\terraform-provider-external_v1.0.0_x4.exe
2018-09-07T07:04:15.209+0200 [DEBUG] plugin.terraform-provider-external_v1.0.0_x4.exe: 2018/09/07 07:04:15 [DEBUG] plugin: plugin address: tcp 127.0.0.1:10000
2018/09/07 07:04:15 [INFO] terraform: building graph: GraphTypeValidate
2018/09/07 07:04:15 [DEBUG] Resource state not found for "data.external.webhook": data.external.webhook
2018/09/07 07:04:15 [DEBUG] adding missing provider: external
2018/09/07 07:04:15 [DEBUG] resource data.external.webhook using provider provider.external
2018/09/07 07:04:15 [DEBUG] pruning unused provider provider.azurerm.development
2018/09/07 07:04:15 [TRACE] Graph after step *terraform.PruneProviderTransformer:
data.external.webhook - *terraform.NodeValidatableResource
provider.external - *terraform.NodeApplyableProvider
provider.external - *terraform.NodeApplyableProvider
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "data.external.webhook" references: []
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "provider.external" references: []
2018/09/07 07:04:15 [DEBUG] Starting graph walk: walkValidate
2018/09/07 07:04:15 [DEBUG] Resource state not found for "data.external.webhook": data.external.webhook
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "data.external.webhook" references: []
2018/09/07 07:04:15 [INFO] backend/local: apply calling Refresh
2018/09/07 07:04:15 [INFO] terraform: building graph: GraphTypeRefresh
2018/09/07 07:04:15 [DEBUG] Resource state not found for "data.external.webhook": data.external.webhook
2018/09/07 07:04:15 [DEBUG] adding missing provider: external
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "provider.external" references: []
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "data.external.webhook" references: []
2018/09/07 07:04:15 [TRACE] Graph after step *terraform.ReferenceTransformer:
data.external.webhook - *terraform.NodeRefreshableDataResource
provider.external - *terraform.NodeApplyableProvider
provider.external - *terraform.NodeApplyableProvider
2018/09/07 07:04:15 [DEBUG] Starting graph walk: walkRefresh
2018/09/07 07:04:15 [DEBUG] Resource state not found for "data.external.webhook": data.external.webhook
2018/09/07 07:04:15 [DEBUG] ReferenceTransformer: "data.external.webhook" references: []
2018/09/07 07:04:15 [TRACE] Graph after step *terraform.ReferenceTransformer:
data.external.webhook - *terraform.NodeRefreshableDataResourceInstance
2018/09/07 07:04:18 [ERROR] root: eval: *terraform.EvalReadDataApply, err: data.external.webhook: command "az" produced invalid JSON: unexpected end of JSON input
2018/09/07 07:04:18 [ERROR] root: eval: *terraform.EvalSequence, err: data.external.webhook: command "az" produced invalid JSON: unexpected end of JSON input
2018/09/07 07:04:18 [TRACE] [walkRefresh] Exiting eval tree: data.external.webhook
2018/09/07 07:04:18 [DEBUG] plugin: waiting for all plugin processes to complete...
2018-09-07T07:04:18.517+0200 [WARN ] plugin: error closing client during Kill: err="unexpected EOF"
2018-09-07T07:04:18.525+0200 [DEBUG] plugin: plugin process exited: path=C:\GitHub\terraform-azure\test\.terraform\plugins\windows_amd64\terraform-provider-external_v1.0.0_x4.exe As far as i am aware, the output running the same command from cli produces a valid json object. C:\GitHub\terraform-azure\test>az webapp deployment list-publishing-profiles --name {app_name} --resource-group {resource_group} --query "[0].{PWD:userPWD}"
{
"PWD": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
C:\GitHub\terraform-azure\test> |
Seeing the same behavior. Output is valid JSON |
Funny to see multiple people trying to work around current bugs in Azure Service Environment APIs blocking automation of the deployment. FWIW, I got this to work by using
|
I've run into a similar issue, but in my case I'm fetching a JSON Web Token from Azure ( When the API call returns the below response, my Terraform works as expected.
When the API call returns the below response, I receive the error:
|
I have the same kind of error but I'm unable to debug it since I have no access to the real output : https://stackoverflow.com/questions/66490152/how-to-debug-terraform-external-providers-with-concurrency-issues When I log the output of the external program, I get valid JSON, I can't manage to find out why it fails and it do not reproduces all the time 🤷♂. Would be nice to have an option that allow to output the received data in debugging mode with the command line run. |
Hi folks 👋 Sorry for the frustrating behavior here. 😖 This error tends to indicate that the output of the program was truncated in some fashion. Since the issue was opened, the However, properly handling non-string values in JSON documents is likely a valid issue since the data source currently expects to unmarshal the document as a |
Terraform Version
Terraform v0.11.8
Affected Resource(s)
external
Terraform Configuration Files
Expected Behavior
being able to reference the password, for an azure webapp webhook and use that with GitLab provider to define integrations.
Actual Behavior
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Additional Context
Running the command in Azure Cli, gives the following output, with Json encoding.
or by changing the outputs in cli --output to tsv gives single string, but this also gives unexpected end of JSON input with terarform
References
#13
The text was updated successfully, but these errors were encountered: