You need to install terraform 0.14 and awscli
# curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
# sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
# sudo apt-get update && sudo apt-get install terraform
# terraform --help
# terraform --version
# terraform -install-autocomplete
# sudo apt install awscli
# aws configure
AWS Access Key ID [None]: [YOUR_AWS_ACCESS_KEY]
AWS Secret Access Key [None]: [YOUR_SUPER_SECRET_KEY]
Default region name [None]: eu-west-1
Default output format [None]:
# terraform init
# terraform plan
# terraform apply
resource "aws_kms_key" "my_key" {
description = "KMS key for CloudWatch"
deletion_window_in_days = 10
}
resource "aws_cloudwatch_log_group" "cloudwatch-vpc-flowlog" {
kms_key_id = aws_kms_key.my_key.key_id
}
git checkout main
git branch -D feature/add-kms
git push origin --delete feature/add-kms