Documentation ¶
Index ¶
- Constants
- func AddFinalizer(finalizerString string, obj Object)
- func CustomClientWithCertPool() (*http.Client, error)
- func HasFinalizer(finalizerString string, obj Object) bool
- func RemoveFinalizer(finalizerString string, obj Object)
- func RetrieveState(workspace *terraformv1.Workspace, accessKey string, secretKey string) (string, error)
- func S3Puller(s3Bucket string, filePath string, downloader *s3manager.Downloader, ...) error
- type Object
Constants ¶
View Source
const ( // WorkspaceFinalizerName is the name of the finalizer assigned to Workspace objects WorkspaceFinalizerName = "workspace.finalizer.scipian.io" // ScipianIAMSecretName is the Secret name for the Scipian IAM credentials ScipianIAMSecretName = "scipian-aws-iam-creds" // ScipianNamespace is the Namespace the ScipianIAMSecretName exists ScipianNamespace = "scipian" // AccessKey is the AWS_ACCESS_KEY_ID name for the Scipian AWS IAM creds stored in the ScipianIAMSecretName AccessKey = "aws_access_key_id" // SecretKey is the AWS_SECRET_ACCESS_KEY name for the Scipian AWS IAM creds stored in the ScipianIAMSecretName SecretKey = "aws_secret_access_key" // TFWorkspaceNew is the Terraform command for creating a new Terraform Workspace TFWorkspaceNew = "cp /opt/meta/* %s && terraform init -force-copy && terraform workspace new %s" // TFWorkspaceDelete is the Terraform command for deleting an existing Terraform Workspace TFWorkspaceDelete = "cp /opt/meta/* %s && terraform init -force-copy && terraform workspace delete -force %s" // TFPlan is the Terraform command for initializing, selecting a workspace, planning, and applying TFPlan = "" /* 166-byte string literal not displayed */ // TFDestroy is the Terraform command for running Terraform destroy on resources TFDestroy = "cp /opt/meta/* %s && terraform init -force-copy && terraform workspace select %s && terraform destroy -auto-approve" //TFStateFileName is the name of the terraform state file TFStateFileName = "terraform.tfstate" )
Variables ¶
This section is empty.
Functions ¶
func AddFinalizer ¶
AddFinalizer adds the finalizer to the given Object
func CustomClientWithCertPool ¶
CustomClientWithCertPool is a public function that creates a cert pool to be used with the http client
func HasFinalizer ¶
HasFinalizer checks for the presence of the finalizer
func RemoveFinalizer ¶
RemoveFinalizer removes the finalizer from the given Object
func RetrieveState ¶
func RetrieveState(workspace *terraformv1.Workspace, accessKey string, secretKey string) (string, error)
RetrieveState function downloads tfstate file from S3 bucket and returns the processed tfstate as a string
Types ¶
Click to show internal directories.
Click to hide internal directories.