Documentation
¶
Index ¶
- Constants
- func CreateDynamoDbClient(config *awsauth.AwsSessionConfig, terragruntOptions *options.TerragruntOptions) (*dynamodb.DynamoDB, error)
- func CreateLockTable(tableName string, tags map[string]string, client *dynamodb.DynamoDB, ...) error
- func CreateLockTableIfNecessary(tableName string, tags map[string]string, client *dynamodb.DynamoDB, ...) error
- func DeleteTable(tableName string, client *dynamodb.DynamoDB) error
- func LockTableCheckSSEncryptionIsOn(tableName string, client *dynamodb.DynamoDB) (bool, error)
- func LockTableExistsAndIsActive(tableName string, client *dynamodb.DynamoDB) (bool, error)
- func UpdateLockTableSetSSEncryptionOnIfNecessary(tableName string, client *dynamodb.DynamoDB, ...) error
- type CountingSemaphore
- type TableActiveRetriesExceeded
- type TableDoesNotExist
- type TableEncryptedRetriesExceeded
Constants ¶
const ATTR_LOCK_ID = "LockID"
Terraform requires the DynamoDB table to have a primary key with this name
const DYNAMODB_PAY_PER_REQUEST_BILLING_MODE = "PAY_PER_REQUEST"
const MAX_RETRIES_WAITING_FOR_TABLE_TO_BE_ACTIVE = 30
Default is to retry for up to 5 minutes
const SLEEP_BETWEEN_TABLE_STATUS_CHECKS = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func CreateDynamoDbClient ¶
func CreateDynamoDbClient(config *awsauth.AwsSessionConfig, terragruntOptions *options.TerragruntOptions) (*dynamodb.DynamoDB, error)
Create an authenticated client for DynamoDB
func CreateLockTable ¶
func CreateLockTable(tableName string, tags map[string]string, client *dynamodb.DynamoDB, terragruntOptions *options.TerragruntOptions) error
Create a lock table in DynamoDB and wait until it is in "active" state. If the table already exists, merely wait until it is in "active" state.
func CreateLockTableIfNecessary ¶
func CreateLockTableIfNecessary(tableName string, tags map[string]string, client *dynamodb.DynamoDB, terragruntOptions *options.TerragruntOptions) error
Create the lock table in DynamoDB if it doesn't already exist
func DeleteTable ¶
Delete the given table in DynamoDB
func LockTableCheckSSEncryptionIsOn ¶
Return true if the lock table's SSEncryption is turned on
func LockTableExistsAndIsActive ¶
Return true if the lock table exists in DynamoDB and is in "active" state
func UpdateLockTableSetSSEncryptionOnIfNecessary ¶
func UpdateLockTableSetSSEncryptionOnIfNecessary(tableName string, client *dynamodb.DynamoDB, terragruntOptions *options.TerragruntOptions) error
Encrypt the TFState Lock table - If Necessary
Types ¶
type CountingSemaphore ¶
type CountingSemaphore chan empty
func NewCountingSemaphore ¶
func NewCountingSemaphore(size int) CountingSemaphore
A bare-bones counting semaphore implementation based on: http://www.golangpatterns.info/concurrency/semaphores
func (CountingSemaphore) Acquire ¶
func (semaphore CountingSemaphore) Acquire()
func (CountingSemaphore) Release ¶
func (semaphore CountingSemaphore) Release()
type TableActiveRetriesExceeded ¶
func (TableActiveRetriesExceeded) Error ¶
func (err TableActiveRetriesExceeded) Error() string
type TableDoesNotExist ¶
func (TableDoesNotExist) Error ¶
func (err TableDoesNotExist) Error() string
type TableEncryptedRetriesExceeded ¶
func (TableEncryptedRetriesExceeded) Error ¶
func (err TableEncryptedRetriesExceeded) Error() string