gen

package
v0.0.0-...-4464eaa Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Found_resources []inout.UnmappedOutputs
View Source
var Not_Found_resources []inout.UnmappedOutputs

Functions

func AddResource

func AddResource(resources *[]inout.ModuleResource, item inout.ModuleResource)

AddResource It adds the respective mapping of a resource to his module (if doesn't already exist)

func CheckResources

func CheckResources(resources []inout.Resource, mapped_resources inout.YamlMapping) []inout.CsvResources

CheckResources Checks if the resources in the resourceGroup have it's mapping on the yaml file and counts them

func CreateVars

func CreateVars(rawResources []string, modules []inout.Modules, mapped_imports []inout.Imports) map[string]VarsContents

CreateVars creates a structured map[resource_name]contents{} to use in tfvars, variables, modules, etc.

func GenerateImports

func GenerateImports(resources []inout.Resource, modules inout.YamlMapping, ep bool) (string, []inout.Imports, []string)

GenerateImports returnes an string It generates the imports blocks for the imports.tf file

func GenerateModuleYaml

func GenerateModuleYaml(resourcesMapping []inout.Resource, modules_map []inout.ModuleResource) []inout.ModuleResource

GenerateModuleYaml returns an []inout.ModuleResource It generates the mapping of the resources with the respective module to generate the yaml file The first one is the json file, and the second argument is the csv

func ParseResource

func ParseResource(rawResource string, mapped_imports []inout.Imports, resourceName string, modules []inout.Modules) map[string]interface{}

ParseResource creates a structured map[string]interface{} Its used to parse the values on the main.tf of aztfexport to generate the terraform.tfvars

Types

type VarsContents

type VarsContents []map[string]interface{}

Jump to

Keyboard shortcuts

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