The UT `TestGetOpenAPISchemaFromTerraformComponentDefinition` won't
succeed 100%. The required variables in the generated isn't in the expected
order all the time.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
Add another unit test when the configuration of Terraform locates
in a subpath of a git remote repository
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: retrieve Terraform variables from variables.tf
If Terraform modules/resources are stored in remote git repos, get
variables from file `varialbes.tf`, or from `main.tf`.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: Generate doc for Terraform typed ComponentDefinition
When the configuration of a Terraform Typed ComponentDefinition is in
remote Git, generate the properties for it. And generated outputs for
all Terraform ComponentDefinition
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <zerjun@beatchain.co>
* Support cloud resource provisioning and consuming (Crossplane)
Provided a way to store secret for cloud resource generated by
Crossplane and to consume the secret
Refer to #1128
* Separate cloud resource producer and consumer in two applications
* add unit test to check whether application can consume cloud resource secret
* update Cloud Resource doc
* Provisioning and consuming cloud resource in different applications v1 (one cloud resource)
* one component consumes two cloud resources
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Store capability OpenAPI V3 JSON schema in ConfigMap
Store the OpenAPI v3 JSON Schema generated from the parameters of
a capability which could be used by api server
To fix#899
address comments
try to fix data race issue
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* address comments: generate cue instance from cue json instead of local file
* update ConfigMap data at any time
* add more unit-test
* fix conflicts
* adapt to new spec.schematic.cue.template
* adapt to new spec.schematic.cue.template for controller unittest cases
* fix ci issues
* adapt to namespaced scope definition
* add more testcases on namespaced definitions with and without namespaces
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>