Versions in this module Expand all Collapse all v1 v1.0.0 Jan 30, 2025 Changes in this version + const DefaultPathToLocalStateFile + const DefaultPathToRemoteStateFile + const DefaultS3BucketAccessLoggingTargetPrefix + const MaxRetriesWaitingForGcsBucket + const MaxRetriesWaitingForS3Bucket + const SidEnforcedTLSPolicy + const SidRootPolicy + const SleepBetweenRetriesWaitingForGcsBucket + const SleepBetweenRetriesWaitingForS3Bucket + var ErrGenerateCalledWithNoGenerateAttr = errors.New("generate code routine called when no generate attribute is configured") + var ErrRemoteBackendMissing = errors.New("the remote_state.backend field cannot be empty") + func AddLabelsToGCSBucket(gcsClient *storage.Client, config *ExtendedRemoteStateConfigGCS, ...) error + func ConfigValuesEqual(config map[string]interface{}, existingBackend *TerraformBackend, ...) bool + func CreateGCSBucket(gcsClient *storage.Client, config *ExtendedRemoteStateConfigGCS, ...) error + func CreateGCSBucketWithVersioning(gcsClient *storage.Client, config *ExtendedRemoteStateConfigGCS, ...) error + func CreateGCSClient(ctx context.Context, gcsConfigRemote RemoteStateConfigGCS) (*storage.Client, error) + func CreateLogsS3BucketIfNecessary(ctx context.Context, s3Client *s3.S3, logsBucketName *string, ...) error + func CreateS3Bucket(s3Client *s3.S3, bucket *string, terragruntOptions *options.TerragruntOptions) error + func CreateS3BucketWithVersioningSSEncryptionAndAccessLogging(ctx context.Context, s3Client *s3.S3, config *ExtendedRemoteStateConfigS3, ...) error + func CreateS3Client(config *awshelper.AwsSessionConfig, ...) (*s3.S3, error) + func DoesGCSBucketExist(ctx context.Context, bucketHandle BucketHandle) bool + func DoesS3BucketExist(s3Client *s3.S3, bucket *string) bool + func EnableAccessLoggingForS3BucketWide(s3Client *s3.S3, config *ExtendedRemoteStateConfigS3, ...) error + func EnableEnforcedTLSAccesstoS3Bucket(s3Client *s3.S3, bucket string, config *ExtendedRemoteStateConfigS3, ...) error + func EnablePublicAccessBlockingForS3Bucket(s3Client *s3.S3, bucketName string, ...) error + func EnableRootAccesstoS3Bucket(s3Client *s3.S3, config *ExtendedRemoteStateConfigS3, ...) error + func EnableSSEForS3BucketWide(s3Client *s3.S3, bucketName string, algorithm string, ...) error + func EnableVersioningForS3Bucket(s3Client *s3.S3, config *RemoteStateConfigS3, ...) error + func GCSConfigValuesEqual(config map[string]interface{}, existingBackend *TerraformBackend, ...) bool + func TagS3Bucket(s3Client *s3.S3, config *ExtendedRemoteStateConfigS3, ...) error + func TagS3BucketAccessLogging(s3Client *s3.S3, config *ExtendedRemoteStateConfigS3, ...) error + func UpdateLockTableSetSSEncryptionOnIfNecessary(s3Config *RemoteStateConfigS3, config *ExtendedRemoteStateConfigS3, ...) error + func ValidateGCSConfig(ctx context.Context, extendedConfig *ExtendedRemoteStateConfigGCS) error + func ValidateGCSConfigWithHandle(ctx context.Context, bucketHandle BucketHandle, ...) error + func ValidatePublicAccessBlock(output *s3.GetPublicAccessBlockOutput) (bool, error) + func ValidateS3Config(extendedConfig *ExtendedRemoteStateConfigS3) error + func WaitUntilGCSBucketExists(gcsClient *storage.Client, config *RemoteStateConfigGCS, ...) error + func WaitUntilS3BucketExists(s3Client *s3.S3, config *RemoteStateConfigS3, ...) error + func WrapMapToSingleLineHcl(m map[string]interface{}) string + type BucketCreationNotAllowed string + func (bucketName BucketCreationNotAllowed) Error() string + type BucketHandle interface + Attrs func(ctx context.Context) (*storage.BucketAttrs, error) + Objects func(ctx context.Context, q *storage.Query) *storage.ObjectIterator + type CantParseTerraformStateFileError struct + Path string + UnderlyingErr error + func (err CantParseTerraformStateFileError) Error() string + type ExtendedRemoteStateConfigGCS struct + EnableBucketPolicyOnly bool + GCSBucketLabels map[string]string + Location string + Project string + SkipBucketCreation bool + SkipBucketVersioning bool + func ParseExtendedGCSConfig(config map[string]interface{}) (*ExtendedRemoteStateConfigGCS, error) + type ExtendedRemoteStateConfigS3 struct + AccessLoggingBucketName string + AccessLoggingBucketTags map[string]string + AccessLoggingTargetObjectPartitionDateSource string + AccessLoggingTargetPrefix string + BucketSSEAlgorithm string + BucketSSEKMSKeyID string + DisableAWSClientChecksums bool + DisableBucketUpdate bool + DynamotableTags map[string]string + EnableLockTableSSEncryption bool + RemoteStateConfigS3 RemoteStateConfigS3 + S3BucketTags map[string]string + SkipAccessLoggingBucketACL bool + SkipAccessLoggingBucketEnforcedTLS bool + SkipAccessLoggingBucketPublicAccessBlocking bool + SkipAccessLoggingBucketSSEncryption bool + SkipBucketAccessLogging bool + SkipBucketEnforcedTLS bool + SkipBucketPublicAccessBlocking bool + SkipBucketRootAccess bool + SkipBucketSSEncryption bool + SkipBucketVersioning bool + SkipCredentialsValidation bool + func ParseExtendedS3Config(config map[string]interface{}) (*ExtendedRemoteStateConfigS3, error) + func (c *ExtendedRemoteStateConfigS3) CreateS3LoggingInput() s3.PutBucketLoggingInput + func (c *ExtendedRemoteStateConfigS3) GetAwsSessionConfig() *awshelper.AwsSessionConfig + type GCSInitializer struct + func (initializer GCSInitializer) GetTerraformInitArgs(config map[string]interface{}) map[string]interface{} + func (initializer GCSInitializer) Initialize(ctx context.Context, remoteState *RemoteState, ...) error + func (initializer GCSInitializer) NeedsInitialization(remoteState *RemoteState, existingBackend *TerraformBackend, ...) (bool, error) + type GenericRemoteEncryptionKeyProvider struct + Data T + func (b *GenericRemoteEncryptionKeyProvider[T]) ToMap() (map[string]any, error) + func (b *GenericRemoteEncryptionKeyProvider[T]) UnmarshalConfig(encryptionConfig map[string]any) error + type InvalidAccessLoggingBucketEncryption struct + BucketSSEAlgorithm string + func (err InvalidAccessLoggingBucketEncryption) Error() string + type MaxRetriesWaitingForS3ACLExceeded string + func (err MaxRetriesWaitingForS3ACLExceeded) Error() string + type MaxRetriesWaitingForS3BucketExceeded string + func (err MaxRetriesWaitingForS3BucketExceeded) Error() string + type MissingRequiredGCSRemoteStateConfig string + func (configName MissingRequiredGCSRemoteStateConfig) Error() string + type MissingRequiredS3RemoteStateConfig string + func (configName MissingRequiredS3RemoteStateConfig) Error() string + type MultipleTagsDeclarations string + func (target MultipleTagsDeclarations) Error() string + type RemoteEncryptionConfig interface + ToMap func() (map[string]any, error) + UnmarshalConfig func(encryptionConfig map[string]any) error + func NewRemoteEncryptionKeyProvider(providerType string) (RemoteEncryptionConfig, error) + type RemoteEncryptionKeyProvider interface + type RemoteEncryptionKeyProviderAWSKMS struct + KeySpec string + KmsKeyID string + Region string + func (*RemoteEncryptionKeyProviderAWSKMS) Name() string + type RemoteEncryptionKeyProviderBase struct + KeyProvider string + type RemoteEncryptionKeyProviderGCPKMS struct + KeyLength int + KmsEncryptionKey string + func (*RemoteEncryptionKeyProviderGCPKMS) Name() string + type RemoteEncryptionKeyProviderPBKDF2 struct + HashFunction string + Iterations int + KeyLength int + Passphrase string + SaltLength int + func (*RemoteEncryptionKeyProviderPBKDF2) Name() string + type RemoteState struct + Backend string + Config map[string]any + DisableDependencyOptimization bool + DisableInit bool + Encryption map[string]any + Generate *RemoteStateGenerate + func (state *RemoteState) DiffersFrom(existingBackend *TerraformBackend, ...) bool + func (state *RemoteState) FillDefaults() + func (state *RemoteState) GenerateTerraformCode(terragruntOptions *options.TerragruntOptions) error + func (state *RemoteState) Initialize(ctx context.Context, terragruntOptions *options.TerragruntOptions) error + func (state *RemoteState) NeedsInit(terragruntOptions *options.TerragruntOptions) (bool, error) + func (state *RemoteState) String() string + func (state *RemoteState) ToTerraformInitArgs() []string + func (state *RemoteState) Validate() error + type RemoteStateConfigGCS struct + AccessToken string + Bucket string + Credentials string + EncryptionKey string + ImpersonateServiceAccount string + ImpersonateServiceAccountDelegates []string + Path string + Prefix string + type RemoteStateConfigS3 struct + AssumeRole RemoteStateConfigS3AssumeRole + Bucket string + CredsFilename string + DynamoDBEndpoint string + DynamoDBTable string + Encrypt bool + Endpoint string + Endpoints RemoteStateConfigS3Endpoints + ExternalID string + Key string + LockTable string + Profile string + Region string + RoleArn string + S3ForcePathStyle bool + SessionName string + func (s3Config *RemoteStateConfigS3) GetExternalID() string + func (s3Config *RemoteStateConfigS3) GetLockTableName() string + func (s3Config *RemoteStateConfigS3) GetSessionName() string + func (s3Config *RemoteStateConfigS3) GetSessionRoleArn() string + type RemoteStateConfigS3AssumeRole struct + ExternalID string + RoleArn string + SessionName string + type RemoteStateConfigS3Endpoints struct + DynamoDB string + S3 string + type RemoteStateGenerate struct + IfExists string + Path string + type RemoteStateInitializer interface + GetTerraformInitArgs func(config map[string]any) map[string]interface{} + Initialize func(ctx context.Context, remoteState *RemoteState, ...) error + NeedsInitialization func(remoteState *RemoteState, existingBackend *TerraformBackend, ...) (bool, error) + type S3BucketUpdatesRequired struct + AccessLogging bool + EnforcedTLS bool + PublicAccess bool + RootAccess bool + SSEEncryption bool + Versioning bool + type S3Initializer struct + func (s3Initializer S3Initializer) GetTerraformInitArgs(config map[string]interface{}) map[string]interface{} + func (s3Initializer S3Initializer) Initialize(ctx context.Context, remoteState *RemoteState, ...) error + func (s3Initializer S3Initializer) NeedsInitialization(remoteState *RemoteState, existingBackend *TerraformBackend, ...) (bool, error) + type TerraformBackend struct + Config map[string]interface{} + Type string + type TerraformState struct + Backend *TerraformBackend + Modules []TerraformStateModule + Serial int + Version int + func ParseTerraformState(terraformStateData []byte) (*TerraformState, error) + func ParseTerraformStateFile(path string) (*TerraformState, error) + func ParseTerraformStateFileFromLocation(backend string, config map[string]interface{}, workingDir, dataDir string) (*TerraformState, error) + func (state *TerraformState) IsRemote() bool + type TerraformStateModule struct + Outputs map[string]interface{} + Path []string + Resources map[string]interface{}