tfjson

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetV2ResourceMap

func GetV2ResourceMap(resourceSchemas map[string]*tfjson.Schema) map[string]*schemav2.Resource

GetV2ResourceMap converts input resource schemas with "terraform-json" representation to terraform-plugin-sdk representation which is what Upjet expects today.

What we are trying to achieve here is to convert a lower level representation of resource schema map, e.g. output of `terraform providers schema -json` to plugin sdk representation. This is mostly the opposite of what the following method is doing: https://github.com/hashicorp/terraform-plugin-sdk/blob/7e0a333644f1971a936995677b7a106140a0659f/helper/schema/core_schema.go#L43

Ideally, we should not rely on plugin SDK types in Upjet at all but only work with types in https://github.com/hashicorp/terraform-json which is there exactly for this purpose, an external representation of Terraform schemas. This conversion aims to be an intermediate step for that ultimate goal.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL