Provides a Data Lifecycle Manager (DLM) lifecycle policy for managing snapshots.
We eat, drink, sleep and most importantly love DevOps. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy Bigger problems are always solved by breaking them into smaller manageable problems. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller connected yet manageable pieces within the infrastructure.
This module is basically combination of Terraform open source and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
We have fifty plus terraform modules. A few of them are comepleted and are available for open source usage while a few others are in progress.
This module has a few dependencies:
- Terraform 0.15
- Go
- github.com/stretchr/testify/assert
- github.com/gruntwork-io/terratest/modules/terraform
IMPORTANT: Since the master
branch used in source
varies based on new modifications, we suggest that you use the release versions here.
Here is an example of how you can use this module in your inventory structure:
module "lifecycle-manager" {
source = "clouddrove/lifecycle-manager/aws"
version = "0.15.0"
name = "lifecycle"
environment = "test"
label_order = ["name", "environment"]
resource_types = ["VOLUME"]
interval = 24
interval_unit = "HOURS"
times = ["03:00"]
count-number = 44
SnapshotCreator = "DLM"
copy_tags = true
target_tags = true
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
SnapshotCreator | Policy details for customer values. | string |
"" |
no |
attributes | Additional attributes (e.g. 1 ). |
list(any) |
[] |
no |
copy_tags | tags of false and true. | string |
"" |
no |
count-number | How many snapshots to keep. Must be an integer between 1 and 1000. | number |
null |
no |
create_lifecycle_policy | Manage Enable or Disable the module. | bool |
true |
no |
environment | Environment (e.g. prod , dev , staging ). |
string |
"" |
no |
interval | How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. | number |
null |
no |
interval_unit | The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. | string |
"" |
no |
label_order | Label order, e.g. name ,application . |
list(any) |
[] |
no |
managedby | ManagedBy, eg 'CloudDrove'. | string |
"hello@clouddrove.com" |
no |
name | Name (e.g. app or cluster ). |
string |
"" |
no |
policy_details | Policy details for customer values. | bool |
true |
no |
repository | Terraform current module repo | string |
"https://github.com/clouddrove/terraform-aws-lifecycle-manager" |
no |
resource_types | A list of resource types that should be targeted by the lifecycle policy. VOLUME is currently the only allowed value. | list(any) |
[] |
no |
target_tags | tags of false and true. | map(any) |
{} |
no |
times | A list of times in 24 hour clock format that sets when the lifecycle policy should be evaluated. Max of 1. | list(any) |
[] |
no |
Name | Description |
---|---|
dlm_lifecycle_role_arn | Amazon Resource Name (ARN) of the DLM Lifecycle Policy. |
dlm_lifecycle_role_id | Identifier of the DLM Lifecycle Policy. |
In this module testing is performed with terratest and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a GO environment in your system.
You need to run the following command in the testing folder:
go test -run Test
If you come accross a bug or have any feedback, please log it in our issue tracker, or feel free to drop us an email at hello@clouddrove.com.
If you have found it worth your time, go ahead and give us a ★ on our GitHub!
At CloudDrove, we offer expert guidance, implementation support and services to help organisations accelerate their journey to the cloud. Our services include docker and container orchestration, cloud migration and adoption, infrastructure automation, application modernisation and remediation, and performance engineering.
We are The Cloud Experts!
We ❤️ Open Source and you can check out our other modules to get help with your new Cloud ideas.