File tree Expand file tree Collapse file tree
modules/sops-encryption-key Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080
8181 solc
8282 foundry
83- ] ;
8483
85- shellHook = ''
86- alias ga="$(which git) add"
87- alias gst="$(which git) status"
88- alias gc="$(which git) commit"
89- alias gco="$(which git) checkout -b"
90- alias glog="$(which git) log"
91- alias lsa="ls -lah"
92- alias prettyup="cargo fmt --all && cargo clippy --all-features --fix --allow-dirty"
93- '' ;
84+ terraform
85+ ] ;
9486 } ;
9587 }
9688 ) ;
Original file line number Diff line number Diff line change 1+ data "aws_caller_identity" "current" {}
2+
3+ resource "aws_kms_key" "this" {
4+ description = " Key used for encryption/decryption of WCN SOPS secrets"
5+ multi_region = true
6+ }
7+
8+ resource "aws_kms_key_policy" "this" {
9+ key_id = aws_kms_key. this . id
10+
11+ policy = jsonencode ({
12+ Version = " 2012-10-17"
13+ Id = " key-default-1"
14+ Statement = [
15+ {
16+ Effect = " Allow"
17+ Principal = {
18+ AWS = " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :root"
19+ AWS = " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/TerraformCloud"
20+ },
21+ Action = " kms:*"
22+ Resource = " *"
23+ },
24+ {
25+ Effect = " Allow"
26+ Principal = {
27+ AWS = " *"
28+ },
29+ Action = [
30+ " kms:DescribeKey" ,
31+ " kms:Encrypt" ,
32+ " kms:Decrypt" ,
33+ " kms:ReEncrypt*" ,
34+ " kms:GenerateDataKey" ,
35+ " kms:GenerateDataKeyWithoutPlaintext"
36+ ],
37+ Resource = " *" ,
38+ " Condition" : {
39+ " ArnLike" : {
40+ " aws:PrincipalArn" : " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/AWSReservedSSO_Read-Only*"
41+ }
42+ }
43+ }
44+ ]
45+ })
46+
47+ }
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_version = " >= 1.12"
3+ required_providers {
4+ aws = {
5+ source = " hashicorp/aws"
6+ version = " >= 6.0"
7+ }
8+ }
9+ }
10+
11+ module "sops-encryption-key" {
12+ source = " ../modules/sops-encryption-key"
13+ }
You can’t perform that action at this time.
0 commit comments