tfjson

package
v1.3.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 9

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