Open wtahara opened 5 years ago
Hi wtahara.
I think that you need to check if your token is encoded in Base64. You can encode token obtained using Power Shell.
By Example:
$token = "agtdxriduimsm33c2dseljwl6pqfkdiyb6lhlqjhr4saqwycfboa" $user = "" [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user,$token)))
Let me know if this solves your problem.
Anyway, I'm going to change my code and handle this type of errors
Thanks for your feedback.
Kind regards.
Hi. Thank you for your reply.
I just tried out the [Convert]::ToBase64String command you suggested. I am using Terraform v0.11.13 and now receiving a Terraform Crash.
panic: Post https://dev.azure.com/plcorp/_apis/projects?api-version=4.1: dial tcp 13.107.6.183:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: goroutine 31 [running]: 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: github.com/agarciamiravet/go-azuredevopsapi.CreateProject(0xc0000e64b0, 0x48, 0xc0002a2d88, 0x6, 0xc0002a2d60, 0x10, 0x0, 0x0, 0x0, 0x0, ...) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Users/AGM74334/go/src/github.com/agarciamiravet/go-azuredevopsapi/azuredevopsclient.go:126 +0x4d4 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: main.resourceProjectCreate(0xc0002ab810, 0x0, 0x0, 0x2, 0x16aa480) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Users/AGM74334/go/src/github.com/agarciamiravet/terraform-provider-azuredevops/resource_project.go:47 +0x155 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: github.com/hashicorp/terraform/helper/schema.(Resource).Apply(0xc000112980, 0xc0000b7a40, 0xc0002adaa0, 0x0, 0x0, 0x40bb01, 0xc0002d7b80, 0x4d1523) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Users/AGM74334/go/src/github.com/hashicorp/terraform/helper/schema/resource.go:265 +0x36a 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: github.com/hashicorp/terraform/helper/schema.(Provider).Apply(0xc0002ab340, 0xc0000b79f0, 0xc0000b7a40, 0xc0002adaa0, 0xc000029500, 0x18, 0x26006a0) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Users/AGM74334/go/src/github.com/hashicorp/terraform/helper/schema/provider.go:283 +0xa3 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: github.com/hashicorp/terraform/plugin.(ResourceProviderServer).Apply(0xc0002ad460, 0xc0002ad680, 0xc0003c7b80, 0x0, 0x0) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Users/AGM74334/go/src/github.com/hashicorp/terraform/plugin/resource_provider.go:530 +0x5e 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: reflect.Value.call(0xc0003600c0, 0xc0003d63b8, 0x13, 0xe4c3fb, 0x4, 0xc0002d7f18, 0x3, 0x3, 0xc0002e2080, 0xc000148080, ...) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Go/src/reflect/value.go:447 +0x450 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: reflect.Value.Call(0xc0003600c0, 0xc0003d63b8, 0x13, 0xc0002d7f18, 0x3, 0x3, 0xc00013a3c0, 0x0, 0x0) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Go/src/reflect/value.go:308 +0xab 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: net/rpc.(service).call(0xc0002e3400, 0xc0003d45a0, 0xc0002da4f0, 0xc0002da500, 0xc0003cea00, 0xc0003c8f00, 0xcb16c0, 0xc0002ad680, 0x16, 0xcb1700, ...) 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Go/src/net/rpc/server.go:384 +0x155 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: created by net/rpc.(Server).ServeCodec 2019-06-17T15:57:15.277-0700 [DEBUG] plugin.terraform-provider-azuredevops.exe: C:/Go/src/net/rpc/server.go:481 +0x485 2019/06/17 15:57:15 [TRACE] root: eval: terraform.EvalWriteState 2019/06/17 15:57:15 [TRACE] root: eval: terraform.EvalApplyProvisioners 2019/06/17 15:57:15 [TRACE] root: eval: terraform.EvalIf 2019/06/17 15:57:15 [TRACE] root: eval: terraform.EvalWriteState 2019/06/17 15:57:15 [TRACE] root: eval: terraform.EvalWriteDiff 2019/06/17 15:57:15 [TRACE] root: eval: terraform.EvalApplyPost 2019/06/17 15:57:15 [ERROR] root: eval: terraform.EvalApplyPost, err: 1 error(s) occurred:
azuredevops_project.projecttest: unexpected EOF 2019/06/17 15:57:15 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
azuredevops_project.projecttest: unexpected EOF 2019/06/17 15:57:15 [TRACE] [walkApply] Exiting eval tree: azuredevops_project.projecttest 2019/06/17 15:57:15 [TRACE] dag/walk: upstream errored, not walking "provider.azuredevops (close)" 2019/06/17 15:57:15 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)" 2019/06/17 15:57:15 [TRACE] dag/walk: upstream errored, not walking "root" 2019/06/17 15:57:15 [TRACE] Preserving existing state lineage "473337aa-6955-b13b-afbe-324997fe133d" 2019/06/17 15:57:15 [TRACE] Preserving existing state lineage "473337aa-6955-b13b-afbe-324997fe133d" 2019/06/17 15:57:15 [TRACE] Preserving existing state lineage "473337aa-6955-b13b-afbe-324997fe133d" 2019/06/17 15:57:15 [TRACE] Preserving existing state lineage "473337aa-6955-b13b-afbe-324997fe133d" 2019/06/17 15:57:15 [DEBUG] plugin: waiting for all plugin processes to complete... 2019-06-17T15:57:15.299-0700 [WARN ] plugin: error closing client during Kill: err="connection is shut down" 2019-06-17T15:57:15.300-0700 [DEBUG] plugin: plugin process exited: path=C:\Users\wtahara\AppData\Roaming\terraform.d\plugins\windows_amd64\terraform-provider-azuredevops.exe
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Questions:
Thanks,
Having issues -
"azuredevops_project.projecttest: Creating... ... azuredevops_project.projecttest: Creation complete after 0s ... Apply complete! Resources: 1 added, 0 changed, 0 destroyed."
The new project was not created. Any ideas how best to troubleshoot this?