Documentation
¶
Index ¶
- Constants
- func BackendTFPath(terraformDir string) string
- func GenerateBackendTF(cfg BackendTFConfig) string
- func WriteBackendTF(terraformDir string, cfg BackendTFConfig) (string, error)
- type BackendTFConfig
- type S3Manager
- func (m *S3Manager) BucketExists(ctx context.Context, bucketName string) (bool, error)
- func (m *S3Manager) CreateStateBucket(ctx context.Context, bucketName string) (bool, error)
- func (m *S3Manager) GetBucketLocation(ctx context.Context, bucketName string) (string, error)
- func (m *S3Manager) ListBuckets(ctx context.Context) ([]string, error)
Constants ¶
View Source
const (
// DefaultAWSRegion is the AWS default region (legacy behavior for S3)
DefaultAWSRegion = "us-east-1"
)
Variables ¶
This section is empty.
Functions ¶
func BackendTFPath ¶
BackendTFPath returns the path where backend.tf should be written
func GenerateBackendTF ¶
func GenerateBackendTF(cfg BackendTFConfig) string
GenerateBackendTF generates the backend.tf file content
func WriteBackendTF ¶
func WriteBackendTF(terraformDir string, cfg BackendTFConfig) (string, error)
WriteBackendTF writes the backend.tf file to the terraform directory
Types ¶
type BackendTFConfig ¶
BackendTFConfig represents the configuration for generating backend.tf
type S3Manager ¶
type S3Manager struct {
// contains filtered or unexported fields
}
S3Manager handles S3 operations for Terraform state backend
func NewS3Manager ¶
NewS3Manager creates a new S3 manager
func (*S3Manager) BucketExists ¶
BucketExists checks if an S3 bucket exists
func (*S3Manager) CreateStateBucket ¶
CreateStateBucket creates and configures an S3 bucket for Terraform state Returns true if the bucket was created, false if it already existed
func (*S3Manager) GetBucketLocation ¶
GetBucketLocation returns the AWS region where a bucket is located
Click to show internal directories.
Click to hide internal directories.