Versions in this module Expand all Collapse all v0 v0.1.0 Apr 29, 2024 Changes in this version + const BoolAttributeType + const BoolElementType + const BoolModelType + const BoolPlanModifierPackage + const BoolPlanModifierType + const Int64AttributeType + const Int64ElementType + const Int64ModelType + const Int64PlanModifierPackage + const Int64PlanModifierType + const ListAttributeType + const ListNestedAttributeType + const MapAttributeType + const NumberAttributeType + const NumberElementType + const NumberModelType + const NumberPlanModifierPackage + const NumberPlanModifierType + const ObjectAttributeType + const SingleNestedAttributeType + const StringAttributeType + const StringElementType + const StringModelType + const StringPlanModifierPackage + const StringPlanModifierType + func GenerateResourceSpec(r ResourceConfig) (specresource.Resource, error) + func MapTerraformAttributeToKubernetes(terraformAttributeName string) string + func MapTerraformAttributeToModel(terraformAttributeName string) string + func WriteFormattedSourceFile(wd, path string, contents string) error + type AfterHook struct + Create bool + Delete bool + Read bool + Update bool + type AttributeGenerator struct + AttributeType string + Computed bool + Description string + ElementType string + Immutable bool + Name string + NestedAttributes AttributesGenerator + PlanModifierPackage string + PlanModifierType string + Required bool + Sensitive bool + func (g AttributeGenerator) String() string + type AttributesGenerator []AttributeGenerator + func GenerateAttributes(attrs specresource.Attributes, ...) AttributesGenerator + func (g AttributesGenerator) String() string + type BeforeHook struct + Create bool + Delete bool + Read bool + Update bool + type CRUDAutoOptions struct + Hooks *Hooks + WaitForDeletion bool + type DataSourceConfig struct + type GenerateConfig struct + CRUDAuto bool + CRUDAutoOptions *CRUDAutoOptions + CRUDStubs bool + Model bool + Overrides bool + Schema bool + Timeouts *Timeouts + type GeneratorConfig struct + DataSource []DataSourceConfig + Resources []ResourceConfig + func ParseHCLConfig(filename string) (GeneratorConfig, error) + type Hooks struct + AfterHook *AfterHook + BeforeHook *BeforeHook + func (h *Hooks) IsEmpty() bool + type ModelFieldGenerator struct + AttributeName string + AttributeType string + ElementType string + FieldName string + ManifestFieldName string + NestedFields ModelFieldsGenerator + Type string + func (g ModelFieldGenerator) String() string + type ModelFieldsGenerator []ModelFieldGenerator + func GenerateModelFields(attrs specresource.Attributes, ignored []string, path string) ModelFieldsGenerator + func (g ModelFieldsGenerator) String() string + type ResourceConfig struct + APIVersion string + ComputedAttributes []string + Description string + Disabled bool + Generate GenerateConfig + IgnoredAttributes []string + ImmutableAttributes []string + Kind string + Name string + OpenAPIConfig TerraformPluginGenOpenAPIConfig + OutputFilenamePrefix string + Package string + RequiredAttributes []string + SensitiveAttributes []string + type ResourceGenerator struct + GeneratedTimestamp time.Time + ModelFields ModelFieldsGenerator + ResourceConfig ResourceConfig + Schema SchemaGenerator + func NewResourceGenerator(cfg ResourceConfig, spec specresource.Resource) ResourceGenerator + func (g *ResourceGenerator) GenerateAutoCRUDCode() string + func (g *ResourceGenerator) GenerateAutoCRUDHooksCode() string + func (g *ResourceGenerator) GenerateCRUDStubCode() string + func (g *ResourceGenerator) GenerateModelCode() string + func (g *ResourceGenerator) GenerateResourceCode() string + func (g *ResourceGenerator) GenerateSchemaFunctionCode() string + type ResourcesListGenerator struct + GeneratedTimestamp time.Time + Packages []string + Resources []ResourceConfig + func (p ResourcesListGenerator) String() string + type SchemaGenerator struct + Attributes AttributesGenerator + Description string + Imports []string + Name string + func (g SchemaGenerator) String() string + type TerraformPluginGenOpenAPIConfig struct + CreatePath string + Filename string + ReadPath string + type Timeouts struct + Create string + Delete string + Read string + Update string