github.com/openshift/installer@v1.4.17/pkg/terraform/stage.go (about)

     1  package terraform
     2  
     3  import (
     4  	"github.com/openshift/installer/pkg/asset"
     5  	"github.com/openshift/installer/pkg/terraform/providers"
     6  	"github.com/openshift/installer/pkg/types"
     7  )
     8  
     9  // Stage is an individual stage of terraform infrastructure provisioning.
    10  type Stage interface {
    11  	// Name is the name of the stage.
    12  	Name() string
    13  
    14  	// Platform is the name of the platform.
    15  	Platform() string
    16  
    17  	// StateFilename is the name of the terraform state file.
    18  	StateFilename() string
    19  
    20  	// OutputsFilename is the name of the outputs file for the stage.
    21  	OutputsFilename() string
    22  
    23  	// Providers is the list of providers that are used for the stage.
    24  	Providers() []providers.Provider
    25  
    26  	// DestroyWithBootstrap is true if the stage should be destroyed when destroying the bootstrap resources.
    27  	DestroyWithBootstrap() bool
    28  
    29  	// Destroy destroys the resources created in the stage. This should only be called if the stage should be destroyed
    30  	// when destroying the bootstrap resources.
    31  	Destroy(directory string, terraformDir string, varFiles []string) error
    32  
    33  	// ExtractHostAddresses extracts the IPs of the bootstrap and control plane machines.
    34  	ExtractHostAddresses(directory string, config *types.InstallConfig) (bootstrap string, port int, masters []string, err error)
    35  
    36  	// ExtractLBConfig extracts the LB DNS Names of the internal and external API LBs.
    37  	ExtractLBConfig(directory string, terraformDir string, file *asset.File, tfvarsFile *asset.File) (ignition string, err error)
    38  }