@@ -714,63 +714,6 @@ Resources:
714
714
- !Sub " arn:aws:iam::${AWS::AccountId}:policy/ZalandoCloud-AllowPowerUser"
715
715
RoleName : " {{.Cluster.LocalID}}-deployment"
716
716
Type : ' AWS::IAM::Role'
717
- {{- if and (eq .Cluster.ConfigItems.deployment_secret_key_managed "true") (ne .Cluster.Environment "e2e") }}
718
- DeploymentSecretKey :
719
- Properties :
720
- Description : Key used by deployment pipeline for secret encryption/decryption
721
- EnableKeyRotation : false
722
- Enabled : true
723
- KeyPolicy :
724
- Id : " {{.Cluster.LocalID}}-deployment-key"
725
- Statement :
726
- - Action :
727
- - ' kms:ReEncrypt*'
728
- - ' kms:Create*'
729
- - ' kms:Describe*'
730
- - ' kms:Enable*'
731
- - ' kms:Encrypt'
732
- - ' kms:Decrypt'
733
- - ' kms:List*'
734
- - ' kms:Put*'
735
- - ' kms:Update*'
736
- - ' kms:Revoke*'
737
- - ' kms:Disable*'
738
- - ' kms:Get*'
739
- - ' kms:Delete*'
740
- - ' kms:ScheduleKeyDeletion'
741
- - ' kms:CancelKeyDeletion'
742
- - ' kms:TagResource'
743
- - ' kms:UntagResource'
744
- Effect : Allow
745
- Principal :
746
- AWS : !Sub 'arn:aws:iam::${AWS::AccountId}:root'
747
- Resource : ' *'
748
- Sid : Allow access for Key Administrators
749
- - Action :
750
- - ' kms:Decrypt'
751
- Effect : Allow
752
- # Avoid circular dependencies because CF still can't do this properly
753
- Principal : " *"
754
- Condition :
755
- ArnEquals :
756
- aws:PrincipalArn :
757
- - !GetAtt DeploymentIAMRole.Arn
758
- - !Sub " arn:aws:iam::${AWS::AccountId}:role/{{.Cluster.LocalID}}-deployment-service-deployment"
759
- Resource : ' *'
760
- Sid : Allow access for deployment system to decrypt the keys
761
- Version : 2012-10-17
762
- KeyUsage : ENCRYPT_DECRYPT
763
- Type : ' AWS::KMS::Key'
764
- DeletionPolicy : Retain
765
- UpdateReplacePolicy : Retain
766
- DeploymentSecretKeyAlias :
767
- Properties :
768
- AliasName : " alias/{{.Cluster.LocalID}}-deployment-secret"
769
- TargetKeyId : !Ref DeploymentSecretKey
770
- Type : ' AWS::KMS::Alias'
771
- DeletionPolicy : Retain
772
- UpdateReplacePolicy : Retain
773
- {{- end }}
774
717
DeploymentServiceBucket :
775
718
Type : AWS::S3::Bucket
776
719
DeletionPolicy : Delete
@@ -876,17 +819,10 @@ Resources:
876
819
- Action :
877
820
- kms:Decrypt
878
821
Effect : Allow
879
- {{- if and (eq .Cluster.ConfigItems.deployment_secret_key_managed "true") (ne .Cluster.Environment "e2e") }}
880
- Resource :
881
- - !GetAtt DeploymentSecretKey.Arn
882
- {{- else }}
883
822
Resource : " *"
884
- {{- if and (eq .Cluster.ConfigItems.deployment_secret_decrypt_any "false") (ne .Cluster.Environment "e2e") }}
885
823
Condition :
886
824
StringLike :
887
825
" kms:RequestAlias " : " alias/deployment-secret"
888
- {{- end }}
889
- {{- end }}
890
826
- Action :
891
827
- ' sts:AssumeRole'
892
828
Effect : Allow
0 commit comments