-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Morpheus AMI and provider versions
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
|
|
||
| #--- | ||
| # setup policy for cloudforms to access kms in remote ami | ||
| #--- | ||
| # "AliasName": "alias/k-kms-csvd-img-shared-key", | ||
| # these are not pulled with data as they require a diff account/profile to do so | ||
| # move this out into some settings file | ||
| locals { | ||
| ami_kms_keys = [ | ||
| "arn:aws-us-gov:kms:us-gov-west-1:107742151971:key/6b0f5037-a500-41f8-b13b-c57f0de9332f", | ||
| "arn:aws-us-gov:kms:us-gov-east-1:107742151971:key/7928e94e-b28e-4863-99aa-ef0ce193c634" | ||
| ] | ||
| } | ||
|
|
||
| data "aws_iam_policy_document" "ami" { | ||
| # for access to remote AMI key | ||
| statement { | ||
| sid = "AWSCloudformsAMIKeyAccess" | ||
| effect = "Allow" | ||
| resources = local.ami_kms_keys | ||
| actions = [ | ||
| "kms:DescribeKey", | ||
| "kms:ReEncrypt*", | ||
| "kms:CreateGrant", | ||
| "kms:Decrypt", | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| resource "aws_iam_policy" "ami" { | ||
| name = "build-user-shared-ami" | ||
| path = "/" | ||
| description = "Policy for Access shared AMIs in Image Pipeline" | ||
| policy = data.aws_iam_policy_document.ami.json | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters