Terraform module -
It's 100% Open Source and licensed under the APACHE2.
This is just a very basic example.
$ checkov -d . --external-checks-dir checkov
...
Include module.memorydb.tf this repository as a module in your existing terraform code:
module "memorydb" {
source = "JamesWoolfenden/memorydb/aws"
version = "0.0.1"
cluster = var.cluster
subnet_list = ["subnet-04338b6369d8288a5"]
kms_key_arn = aws_kms_key.example.arn
}
See the example for security group details.
To view the snapshot:
aws memorydb describe-snapshots
No requirements.
Name | Version |
---|---|
aws | n/a |
No modules.
Name | Type |
---|---|
aws_memorydb_cluster.example | resource |
aws_memorydb_snapshot.example | resource |
aws_memorydb_subnet_group.example | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cluster | n/a | object({ |
n/a | yes |
common_tags | n/a | map(any) |
n/a | yes |
kms_key_arn | n/a | string |
n/a | yes |
security_group_ids | n/a | list(string) |
n/a | yes |
subnet_list | n/a | list(string) |
n/a | yes |
Name | Description |
---|---|
cluster | n/a |
snapshot | n/a |
subnet | n/a |
This is the policy required to build this project:
The Terraform resource required is:
resource "aws_iam_policy" "terraform_pike" {
name_prefix = "terraform_pike"
path = "/"
description = "Pike Autogenerated policy from IAC"
policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"kms:CreateGrant",
"kms:Decrypt",
"kms:DescribeKey",
"kms:Encrypt",
"kms:GenerateDataKey"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"memorydb:CreateCluster",
"memorydb:CreateSnapshot",
"memorydb:CreateSubnetGroup",
"memorydb:DeleteCluster",
"memorydb:DeleteSnapshot",
"memorydb:DeleteSubnetGroup",
"memorydb:DescribeClusters",
"memorydb:DescribeSnapshots",
"memorydb:DescribeSubnetGroups",
"memorydb:ListTags",
"memorydb:TagResource",
"memorydb:UntagResource",
"memorydb:UpdateCluster",
"memorydb:UpdateSubnetGroup"
],
"Resource": "*"
}
]
})
}
Check out these related projects.
- terraform-aws-s3 - S3 buckets
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
Copyright © 2022 James Woolfenden
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.