Giter Site home page Giter Site logo

terraform-provider-kable's Issues

unexpected end of JSON input

We are trying to render the concept with kable_provider, but facing intermittent error unexpected end of JSON input
Here are the debug logs:

2020-12-10T05:54:00.225Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020-12-10T05:54:00.225Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020-12-10T05:54:00.225Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020-12-10T05:54:00.225Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020-12-10T05:54:00.226Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020-12-10T05:54:00.226Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020-12-10T05:54:00.226Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020-12-10T05:54:00.226Z [DEBUG] plugin.terraform-provider-kable_v0.0.2: 2020/12/10 05:54:00 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020/12/10 05:54:00 [ERROR] eval: *terraform.evalReadDataApply, err: unexpected end of JSON input
2020/12/10 05:54:00 [ERROR] eval: *terraform.EvalSequence, err: unexpected end of JSON input
2020/12/10 05:54:00 [ERROR] eval: *terraform.evalReadDataApply, err: unexpected end of JSON input
2020/12/10 05:54:00 [ERROR] eval: *terraform.EvalSequence, err: unexpected end of JSON input

also

[1m�[31mError: �[0m�[0m�[1munexpected end of JSON input�[0m
�[0m�[0m�[0m
�[31m
�[1m�[31mError: �[0m�[0m�[1munexpected end of JSON input�[0m
�[0m�[0m�[0m
2020-12-10T05:54:01.239Z [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/redradrat/kable/0.0.2/linux_amd64/terraform-provider-kable_v0.0.2 pid=756
2020-12-10T05:54:01.239Z [DEBUG] plugin: plugin exited

Error in rendering a concept that doesn't require any input

Issue:
Provider throws error while rendering a concept that doesn't require any input (i.e. when inputs paramaters are not set for kable_concept as they are not required by the concept)

Error: Required attribute is not set
on ../kube-state-metrics.tf line 1, in data "kable_concept" "kube_state_metrics":
1: data "kable_concept" "kube_state_metrics" {

Temporary Solution:
We need to give a dummy name, value pair as inputs in data.kable_concept.kube_state_metrics to bypass this error.
inputs {
name = "dummy"
value = "dummy"
}

Multiple kable_concept rendering fails because of race condition while downloading concept repo

Issue :
If we try to render multiple concepts in single terraform run then because of parallel execution it fails to render concepts.

Race condition happens here because while the 1st kable_concept is still downloading concept repo, other kable_concepts tries to render concepts and fails because concept repo is not available locally.

i.e. While the concept repo is still not downloaded completely (downloading still in-progress). other kable_concepts tries to render the concepts and fails because of unavailability of concept.json files

Here is the workaround for this issue
We can add dependency of one concept to other concepts so that it waits till the time concept is downloaded properly

e.g

data "kable_concept" "A" {
  repo {
    name = "repo"
    url  = "https://git.com/infra/concepts.git"
    username = var.concept_repo_username
    password = var.concept_repo_password
  }
 id = "A@repo"
  inputs {
    name  = "name"
    value = "main"
  }
}
data "kable_concept" "B" {
  repo {
    name = "repo"
    url  = "https://git.com/infra/concepts.git"
    username = var.concept_repo_username
    password = var.concept_repo_password
  }
 id = "B@repo"
  inputs {
    name  = "name"
    value = "main"
  }
depends_on = [data.kable_ceonpt.A]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.