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

Can't provide provider configs via variables in TF 0.13.3 #30

Open
ripa1993 opened this issue Oct 6, 2020 · 1 comment
Open

Can't provide provider configs via variables in TF 0.13.3 #30

ripa1993 opened this issue Oct 6, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@ripa1993
Copy link

ripa1993 commented Oct 6, 2020

Hello,
i'm trying to use the provider 0.2.3 with Terraform 0.13.3.

The provider is not able to read configuration variables via the provider block, e.g.

terraform {
  required_providers {
    kafka-connect = {
      source  = "Mongey/kafka-connect"
      version = "0.2.3"
    }
  }
  required_version = "~> 0.13.3"
}
provider "kafka-connect" {
 url = "https://myhost/kafka-connect"
 basic_auth_username = "user"
 basic_auth_password = "pass"
}

which results in

2020-10-06T10:43:37.616+0200 [DEBUG] plugin.terraform-provider-kafka-connect_v0.2.3: 2020/10/06 10:43:37 [INFO] Creating Provider
2020-10-06T10:43:37.616+0200 [DEBUG] plugin.terraform-provider-kafka-connect_v0.2.3: 2020/10/06 10:43:37 [INFO] Created provider: {map[basic_auth_password:0xc00045a200 basic_auth_username:0xc00045a100 url:0xc00045a000] map[kafka-connect_connector:0xc000438100] map[] 0x195fd90 <nil> <nil> {0 0} <nil> <nil> {0 {0 0}} }
2020-10-06T10:43:37.617+0200 [INFO]  plugin.terraform-provider-kafka-connect_v0.2.3: configuring server automatic mTLS: timestamp=2020-10-06T10:43:37.617+0200
2020-10-06T10:43:37.641+0200 [DEBUG] plugin.terraform-provider-kafka-connect_v0.2.3: plugin address: address=/var/folders/qd/qt48zzs576q7gysrnmb380640000gn/T/plugin237633967 network=unix timestamp=2020-10-06T10:43:37.641+0200
2020-10-06T10:43:37.643+0200 [DEBUG] plugin: using plugin: version=5
2020-10-06T10:43:37.691+0200 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio"
2020-10-06T10:43:37.692+0200 [DEBUG] plugin.terraform-provider-kafka-connect_v0.2.3: 2020/10/06 10:43:37 [INFO] Initializing KafkaConnect client
2020-10-06T10:43:37.694+0200 [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/carlpett/sops/0.5.2/darwin_amd64/terraform-provider-sops_v0.5.2 pid=75990
2020-10-06T10:43:37.694+0200 [DEBUG] plugin: plugin exited
module.kafka-source-connector.kafka-connect_connector.this: Creating...
2020/10/06 10:43:37 [DEBUG] EvalApply: ProviderMeta config value set
2020/10/06 10:43:37 [DEBUG] module.kafka-source-connector.kafka-connect_connector.this: applying the planned Create change
module.kafka-source-connector.kafka-connect_connector.this: Still creating... [10s elapsed]
2020/10/06 10:43:48 [DEBUG] module.kafka-source-connector.kafka-connect_connector.this: apply errored, but we're indicating that via the Error pointer rather than returning it: Post //%2Fconnectors/connectors: unsupported protocol scheme ""
2020/10/06 10:43:48 [ERROR] eval: *terraform.EvalApplyPost, err: Post //%2Fconnectors/connectors: unsupported protocol scheme ""
2020/10/06 10:43:48 [ERROR] eval: *terraform.EvalSequence, err: Post //%2Fconnectors/connectors: unsupported protocol scheme ""

Warning: Applied changes may be incomplete

The plan was created with the -target option in effect, so some changes
requested in the configuration may have been ignored and the output values may
not be fully updated. Run the following command to verify that no other
changes are pending:
    terraform plan
        
Note that the -target option is not suitable for routine use, and is provided
only for exceptional situations such as recovering from errors or mistakes, or
when Terraform specifically suggests to use it as part of an error message.


Error: Post //%2Fconnectors/connectors: unsupported protocol scheme ""

  on .terraform/modules/kafka-source-connector/modules/kafka-source-connector/main.tf line 33, in resource "kafka-connect_connector" "this":
  33: resource "kafka-connect_connector" "this" {


2020-10-06T10:43:48.540+0200 [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/mongey/kafka-connect/0.2.3/darwin_amd64/terraform-provider-kafka-connect_v0.2.3 pid=75992
2020-10-06T10:43:48.540+0200 [DEBUG] plugin: plugin exited

The very same setup works fine by setting the provider configuration variables via environment variables.

@endofcake
Copy link

I have encountered a similar issue as well. It did work for me without issues with Terraform 0.13.4, but after I upgraded to 0.14.2 I started seeing

Error: Post //%2Fconnectors/connectors: unsupported protocol scheme ""

It does still work with environment variables.

@Mongey Mongey added the bug Something isn't working label Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants