Documentation
¶
Index ¶
- func ParseExistingResources(dir string) (map[string]bool, error)
- func PrintImportCommands(w io.Writer, cmds []ImportCommand) error
- func WriteAll(resources *gitlab.Resources, dir string, mainGroup string, skipSet skip.Set) error
- func WriteGroupHooks(g *gl.Group, hooks []*gl.GroupHook, w io.Writer) error
- func WriteGroupLabelResource(group *gl.Group, w io.Writer) error
- func WriteGroupLabelVariable(groups []*gl.Group, groupLabels gitlab.GroupLabels, w io.Writer) error
- func WriteGroupMembershipResource(group *gl.Group, w io.Writer) error
- func WriteGroupMembershipVariable(groups []*gl.Group, groupMembers gitlab.GroupMembers, w io.Writer) error
- func WriteGroupVariables(g *gl.Group, vars []*gl.GroupVariable, w io.Writer) error
- func WriteGroups(groups []*gl.Group, w io.Writer, groupRefs groupRefMap) error
- func WritePipelineSchedules(p *gl.Project, schedules []*gl.PipelineSchedule, w io.Writer) error
- func WriteProjectHooks(p *gl.Project, hooks []*gl.ProjectHook, w io.Writer) error
- func WriteProjectLabelResource(project *gl.Project, w io.Writer) error
- func WriteProjectLabelVariable(projects []*gl.Project, projectLabels gitlab.ProjectLabels, w io.Writer) error
- func WriteProjectMembershipHelpers(w io.Writer) error
- func WriteProjectMembershipVariable(projects []*gl.Project, w io.Writer) error
- func WriteProjectShareGroupResource(project *gl.Project, w io.Writer) error
- func WriteProjectVariables(p *gl.Project, vars []*gl.ProjectVariable, w io.Writer) error
- func WriteProjects(projects []*gl.Project, w io.Writer, groupRefs groupRefMap) error
- func WriteUserDataSource(w io.Writer) error
- type ImportCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseExistingResources ¶ added in v1.3.0
ParseExistingResources reads all .tf files in dir and returns a set of "type.name" strings for every resource block found.
func PrintImportCommands ¶ added in v1.3.0
func PrintImportCommands(w io.Writer, cmds []ImportCommand) error
PrintImportCommands writes terraform import commands to w.
func WriteGroupHooks ¶ added in v1.7.0
func WriteGroupLabelResource ¶ added in v1.5.0
func WriteGroupLabelVariable ¶ added in v1.5.0
func WriteGroupMembershipResource ¶ added in v1.1.0
func WriteGroupMembershipVariable ¶ added in v1.1.0
func WriteGroupVariables ¶ added in v1.8.0
func WriteGroups ¶
WriteGroups writes GitLab groups as Terraform HCL resources.
func WritePipelineSchedules ¶ added in v1.6.0
func WriteProjectHooks ¶ added in v1.7.0
func WriteProjectLabelResource ¶ added in v1.5.0
func WriteProjectLabelVariable ¶ added in v1.5.0
func WriteProjectMembershipHelpers ¶ added in v1.1.0
func WriteProjectMembershipVariable ¶ added in v1.1.0
func WriteProjectShareGroupResource ¶ added in v1.1.0
func WriteProjectVariables ¶ added in v1.8.0
func WriteProjects ¶
WriteProjects writes GitLab projects as Terraform HCL resources.
func WriteUserDataSource ¶ added in v1.2.0
Types ¶
type ImportCommand ¶ added in v1.3.0
ImportCommand represents a single terraform import command.
func GenerateImportCommands ¶ added in v1.3.0
func GenerateImportCommands(resources *gitlab.Resources, existingResources map[string]bool, mainGroup string, skipSet skip.Set) []ImportCommand
GenerateImportCommands returns import commands for resources that exist in the API response but not in the existing terraform files.
Click to show internal directories.
Click to hide internal directories.