Terraform Provider for Kable
This is a terraform provider, that enables utilizing kable concepts to deploy to kubernetes.
Installation
Usage
License: MIT License
This is a terraform provider, that enables utilizing kable concepts to deploy to kubernetes.
A new release of provider would be great to have which includes the following fix:
redradrat/kable@24dc3f0
Thanks,
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"
}
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
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]
}
can we have more info, e.g. name in the error message?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.