mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-29 22:49:17 +00:00
EIO-173: update documentation with IAM policy for encrypted EBS volumes
This commit is contained in:
@@ -10,9 +10,10 @@ Use {{< product >}} to create a Kubernetes cluster in Amazon EC2.
|
|||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- AWS EC2 Access Key and Secret key that will be used to create the instances. See [Amazon Documentation: Creating Access Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) how to create an Access Key and Secret Key.
|
- AWS EC2 Access Key and Secret key that will be used to create the instances. See [Amazon Documentation: Creating Access Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) how to create an Access Key and Secret Key.
|
||||||
- IAM Policy created to add to the user of the Access Key And Secret Key. See [Amazon Documentation: Creating IAM Policies (Console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html#access_policies_create-start) how to create an IAM policy. See our two example JSON policies below:
|
- IAM Policy created to add to the user of the Access Key And Secret Key. See [Amazon Documentation: Creating IAM Policies (Console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html#access_policies_create-start) how to create an IAM policy. See our three example JSON policies below:
|
||||||
- [Example IAM Policy](#example-iam-policy)
|
- [Example IAM Policy](#example-iam-policy)
|
||||||
- [Example IAM Policy with PassRole](#example-iam-policy-with-passrole) (needed if you want to use [Kubernetes Cloud Provider]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/cloud-providers) or want to pass an IAM Profile to an instance)
|
- [Example IAM Policy with PassRole](#example-iam-policy-with-passrole) (needed if you want to use [Kubernetes Cloud Provider]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/cloud-providers) or want to pass an IAM Profile to an instance)
|
||||||
|
- [Example IAM Policy to allow encrypted EBS volumes](#example-iam-policy-to-allow-encrypted-ebs-volumes)
|
||||||
- IAM Policy added as Permission to the user. See [Amazon Documentation: Adding Permissions to a User (Console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) how to attach it to an user.
|
- IAM Policy added as Permission to the user. See [Amazon Documentation: Adding Permissions to a User (Console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) how to attach it to an user.
|
||||||
|
|
||||||
|
|
||||||
@@ -157,3 +158,45 @@ Use {{< product >}} to create a Kubernetes cluster in Amazon EC2.
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
### Example IAM Policy to allow encrypted EBS volumes
|
||||||
|
``` json
|
||||||
|
{
|
||||||
|
"Version": "2012-10-17",
|
||||||
|
"Statement": [
|
||||||
|
{
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Action": [
|
||||||
|
"kms:Decrypt",
|
||||||
|
"kms:GenerateDataKeyWithoutPlaintext",
|
||||||
|
"kms:Encrypt",
|
||||||
|
"kms:DescribeKey",
|
||||||
|
"kms:CreateGrant",
|
||||||
|
"ec2:DetachVolume",
|
||||||
|
"ec2:AttachVolume",
|
||||||
|
"ec2:DeleteSnapshot",
|
||||||
|
"ec2:DeleteTags",
|
||||||
|
"ec2:CreateTags",
|
||||||
|
"ec2:CreateVolume",
|
||||||
|
"ec2:DeleteVolume",
|
||||||
|
"ec2:CreateSnapshot"
|
||||||
|
],
|
||||||
|
"Resource": [
|
||||||
|
"arn:aws:ec2:REGION:AWS_ACCOUNT_ID:volume/*",
|
||||||
|
"arn:aws:ec2:REGION:AWS_ACCOUNT_ID:instance/*",
|
||||||
|
"arn:aws:ec2:REGION:AWS_ACCOUNT_ID:snapshot/*",
|
||||||
|
"arn:aws:kms:REGION:AWS_ACCOUNT_ID:key/KMS_KEY_ID"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Action": [
|
||||||
|
"ec2:DescribeInstances",
|
||||||
|
"ec2:DescribeTags",
|
||||||
|
"ec2:DescribeVolumes",
|
||||||
|
"ec2:DescribeSnapshots"
|
||||||
|
],
|
||||||
|
"Resource": "*"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user