shared

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataSourceType = "DataSource"
	ResourceType   = "Resource"

	DirPerm = 0755
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	UI cli.Ui
}

func (*Generator) ApplyAndWriteTemplate

func (g *Generator) ApplyAndWriteTemplate(filename, templateBody string, templateData *TemplateData) error

ApplyAndWriteTemplate applies the template body to the specified data and writes it to file.

func (*Generator) GenerateTemplateData

func (g *Generator) GenerateTemplateData(cfTypeSchemaFile, resType, tfResourceType, packageName string) (*TemplateData, error)

GenerateTemplateData generates the template body from the Resource constructed from a CloudFormation type's Schema file. This method can be applied to both singular data source and resource types.

func (*Generator) Infof

func (g *Generator) Infof(format string, a ...interface{})

type Resource

type Resource struct {
	CfResource *cfschema.Resource
	TfType     string
}

func NewResource

func NewResource(resourceType, cfTypeSchemaFile string) (*Resource, error)

NewResource creates a Resource type from the corresponding resource's CloudFormation Schema file

type TemplateData

type TemplateData struct {
	AcceptanceTestFunctionPrefix  string
	AttributeNameMap              map[string]string
	CloudFormationTypeName        string
	CreateTimeoutInMinutes        int
	DeleteTimeoutInMinutes        int
	FactoryFunctionName           string
	FrameworkPlanModifierPackages []string
	FrameworkValidatorsPackages   []string
	HasRequiredAttribute          bool
	HasUpdateMethod               bool
	ImportFrameworkTypes          bool
	ImportFrameworkJSONTypes      bool
	ImportFrameworkValidator      bool
	ImportInternalValidate        bool
	ImportRegexp                  bool
	PackageName                   string
	RootPropertiesSchema          string
	SchemaDescription             string
	SchemaVersion                 int64
	SyntheticIDAttribute          bool
	TerraformTypeName             string
	UpdateTimeoutInMinutes        int
	WriteOnlyPropertyPaths        []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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