Documentation ¶
Index ¶
- Variables
- func CheckDirEmpty(path string) error
- func CreateInitTerraformFiles(c Config) (*os.File, error)
- func CreateLogFilter() io.Writer
- func FetchAssetsViaFastlyAPI(props []TFBlockProp, c Config) error
- func RewriteResources(rawHCL string, serviceProp *VCLServiceResourceProp) ([]byte, error)
- func TerraformImport(tf *tfexec.Terraform, prop TFBlockProp, f io.Writer) error
- func TerraformInit(tf *tfexec.Terraform) error
- func TerraformInstall(workingDir string) (*tfexec.Terraform, error)
- func TerraformShow(tf *tfexec.Terraform) (string, error)
- func YesNo(message string) (bool, error)
- type ACLResourceProp
- type Config
- type DictionaryResourceProp
- func (d *DictionaryResourceProp) GetID() string
- func (d *DictionaryResourceProp) GetIDforTFImport() string
- func (d *DictionaryResourceProp) GetName() string
- func (d *DictionaryResourceProp) GetNormalizedName() string
- func (d *DictionaryResourceProp) GetRef() string
- func (d *DictionaryResourceProp) GetType() string
- type DynamicSnippetResourceProp
- func (ds *DynamicSnippetResourceProp) GetID() string
- func (ds *DynamicSnippetResourceProp) GetIDforTFImport() string
- func (ds *DynamicSnippetResourceProp) GetName() string
- func (ds *DynamicSnippetResourceProp) GetNormalizedName() string
- func (ds *DynamicSnippetResourceProp) GetRef() string
- func (ds *DynamicSnippetResourceProp) GetType() string
- type LoggingBlockProp
- type SnippetBlockProp
- type TFBlockProp
- type VCLBlockProp
- type VCLServiceResourceProp
- func (v *VCLServiceResourceProp) GetID() string
- func (v *VCLServiceResourceProp) GetIDforTFImport() string
- func (v *VCLServiceResourceProp) GetName() string
- func (v *VCLServiceResourceProp) GetNormalizedName() string
- func (v *VCLServiceResourceProp) GetRef() string
- func (v *VCLServiceResourceProp) GetType() string
- func (v *VCLServiceResourceProp) GetVersion() int
- type WAFResourceProp
Constants ¶
This section is empty.
Variables ¶
View Source
var Bold = color.New(color.Bold).SprintFunc()
View Source
var (
ErrInvalidLogEndpoint = errors.New("Invalid log endpoint")
)
Functions ¶
func CheckDirEmpty ¶
func CreateLogFilter ¶
func FetchAssetsViaFastlyAPI ¶
func FetchAssetsViaFastlyAPI(props []TFBlockProp, c Config) error
func RewriteResources ¶
func RewriteResources(rawHCL string, serviceProp *VCLServiceResourceProp) ([]byte, error)
func TerraformImport ¶
func TerraformInit ¶
Types ¶
type ACLResourceProp ¶
type ACLResourceProp struct { ID string Name string No int *VCLServiceResourceProp }
func NewACLResourceProp ¶
func NewACLResourceProp(id, name string, sr *VCLServiceResourceProp) *ACLResourceProp
func (*ACLResourceProp) GetID ¶
func (a *ACLResourceProp) GetID() string
func (*ACLResourceProp) GetIDforTFImport ¶
func (a *ACLResourceProp) GetIDforTFImport() string
func (*ACLResourceProp) GetName ¶
func (a *ACLResourceProp) GetName() string
func (*ACLResourceProp) GetNormalizedName ¶
func (a *ACLResourceProp) GetNormalizedName() string
func (*ACLResourceProp) GetRef ¶
func (a *ACLResourceProp) GetRef() string
func (*ACLResourceProp) GetType ¶
func (a *ACLResourceProp) GetType() string
type DictionaryResourceProp ¶
type DictionaryResourceProp struct { ID string Name string *VCLServiceResourceProp }
func NewDictionaryResourceProp ¶
func NewDictionaryResourceProp(id, name string, sr *VCLServiceResourceProp) *DictionaryResourceProp
func (*DictionaryResourceProp) GetID ¶
func (d *DictionaryResourceProp) GetID() string
func (*DictionaryResourceProp) GetIDforTFImport ¶
func (d *DictionaryResourceProp) GetIDforTFImport() string
func (*DictionaryResourceProp) GetName ¶
func (d *DictionaryResourceProp) GetName() string
func (*DictionaryResourceProp) GetNormalizedName ¶
func (d *DictionaryResourceProp) GetNormalizedName() string
func (*DictionaryResourceProp) GetRef ¶
func (d *DictionaryResourceProp) GetRef() string
func (*DictionaryResourceProp) GetType ¶
func (d *DictionaryResourceProp) GetType() string
type DynamicSnippetResourceProp ¶
type DynamicSnippetResourceProp struct { ID string Name string *VCLServiceResourceProp }
func NewDynamicSnippetResourceProp ¶
func NewDynamicSnippetResourceProp(id, name string, sr *VCLServiceResourceProp) *DynamicSnippetResourceProp
func (*DynamicSnippetResourceProp) GetID ¶
func (ds *DynamicSnippetResourceProp) GetID() string
func (*DynamicSnippetResourceProp) GetIDforTFImport ¶
func (ds *DynamicSnippetResourceProp) GetIDforTFImport() string
func (*DynamicSnippetResourceProp) GetName ¶
func (ds *DynamicSnippetResourceProp) GetName() string
func (*DynamicSnippetResourceProp) GetNormalizedName ¶
func (ds *DynamicSnippetResourceProp) GetNormalizedName() string
func (*DynamicSnippetResourceProp) GetRef ¶
func (ds *DynamicSnippetResourceProp) GetRef() string
func (*DynamicSnippetResourceProp) GetType ¶
func (ds *DynamicSnippetResourceProp) GetType() string
type LoggingBlockProp ¶
type LoggingBlockProp struct { Name string EndpointType string IsJSON bool *VCLServiceResourceProp }
func NewLoggingBlockProp ¶
func NewLoggingBlockProp(name, endpointType string, isJSON bool, sr *VCLServiceResourceProp) *LoggingBlockProp
func (*LoggingBlockProp) GetEndpointType ¶
func (l *LoggingBlockProp) GetEndpointType() string
func (*LoggingBlockProp) GetName ¶
func (l *LoggingBlockProp) GetName() string
func (*LoggingBlockProp) GetNormalizedName ¶
func (l *LoggingBlockProp) GetNormalizedName() string
type SnippetBlockProp ¶
type SnippetBlockProp struct { Name string *VCLServiceResourceProp }
func NewSnippetBlockProp ¶
func NewSnippetBlockProp(name string, sr *VCLServiceResourceProp) *SnippetBlockProp
func (*SnippetBlockProp) GetName ¶
func (s *SnippetBlockProp) GetName() string
func (*SnippetBlockProp) GetNormalizedName ¶
func (s *SnippetBlockProp) GetNormalizedName() string
func (*SnippetBlockProp) GetType ¶
func (s *SnippetBlockProp) GetType() string
type TFBlockProp ¶
type TFBlockProp interface { GetType() string GetID() string GetIDforTFImport() string GetNormalizedName() string GetRef() string }
func ParseVCLServiceResource ¶
func ParseVCLServiceResource(serviceProp *VCLServiceResourceProp, rawHCL string) ([]TFBlockProp, error)
type VCLBlockProp ¶
type VCLBlockProp struct { Name string *VCLServiceResourceProp }
func NewVCLBlockProp ¶
func NewVCLBlockProp(name string, sr *VCLServiceResourceProp) *VCLBlockProp
func (*VCLBlockProp) GetName ¶
func (v *VCLBlockProp) GetName() string
func (*VCLBlockProp) GetNormalizedName ¶
func (v *VCLBlockProp) GetNormalizedName() string
func (*VCLBlockProp) GetType ¶
func (v *VCLBlockProp) GetType() string
type VCLServiceResourceProp ¶
func NewVCLServiceResourceProp ¶
func NewVCLServiceResourceProp(id, name string, version, targetversion int) *VCLServiceResourceProp
func (*VCLServiceResourceProp) GetID ¶
func (v *VCLServiceResourceProp) GetID() string
func (*VCLServiceResourceProp) GetIDforTFImport ¶
func (v *VCLServiceResourceProp) GetIDforTFImport() string
func (*VCLServiceResourceProp) GetName ¶
func (v *VCLServiceResourceProp) GetName() string
func (*VCLServiceResourceProp) GetNormalizedName ¶
func (v *VCLServiceResourceProp) GetNormalizedName() string
func (*VCLServiceResourceProp) GetRef ¶
func (v *VCLServiceResourceProp) GetRef() string
func (*VCLServiceResourceProp) GetType ¶
func (v *VCLServiceResourceProp) GetType() string
func (*VCLServiceResourceProp) GetVersion ¶
func (v *VCLServiceResourceProp) GetVersion() int
type WAFResourceProp ¶
type WAFResourceProp struct { ID string Name string *VCLServiceResourceProp }
func NewWAFResourceProp ¶
func NewWAFResourceProp(id string, sr *VCLServiceResourceProp) *WAFResourceProp
func (*WAFResourceProp) GetID ¶
func (w *WAFResourceProp) GetID() string
func (*WAFResourceProp) GetIDforTFImport ¶
func (w *WAFResourceProp) GetIDforTFImport() string
func (*WAFResourceProp) GetName ¶
func (w *WAFResourceProp) GetName() string
func (*WAFResourceProp) GetNormalizedName ¶
func (w *WAFResourceProp) GetNormalizedName() string
func (*WAFResourceProp) GetRef ¶
func (w *WAFResourceProp) GetRef() string
func (*WAFResourceProp) GetType ¶
func (w *WAFResourceProp) GetType() string
Click to show internal directories.
Click to hide internal directories.