mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
83 lines
2.7 KiB
Plaintext
83 lines
2.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * rosa_hcp/rosa-hcp-egress-zero-install.adoc
|
|
// * rosa_hcp/rosa-hcp-cluster-no-cni.adoc
|
|
// * rosa_hcp/rosa-hcp-creating-cluster-with-aws-kms-key.adoc
|
|
// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc
|
|
// * rosa_planning/rosa-hcp-prepare-iam-roles-resources.adoc
|
|
|
|
ifeval::["{context}" == "rosa-hcp-egress-zero-install"]
|
|
:egress-lockdown:
|
|
endif::[]
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="rosa-sts-creating-account-wide-sts-roles-and-policies_{context}"]
|
|
= Creating the account-wide STS roles and policies
|
|
|
|
[role="_abstract"]
|
|
Before you create your {product-title} cluster, you must create the required account-wide roles and policies.
|
|
|
|
[NOTE]
|
|
====
|
|
Specific AWS-managed policies for {product-title} must be attached to each role. Customer-managed policies must not be used with these required account roles. For more information regarding AWS-managed policies for {product-title} clusters, see link:https://docs.aws.amazon.com/ROSA/latest/userguide/security-iam-awsmanpol-account-policies.html[AWS managed policies for ROSA].
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You have completed the AWS prerequisites for {product-title}.
|
|
* You have available AWS service quotas.
|
|
* You have enabled the {product-title} in the AWS Console.
|
|
* You have installed and configured the latest ROSA CLI (`rosa`) on your installation host.
|
|
* You have logged in to your Red{nbsp}Hat account by using the ROSA CLI.
|
|
|
|
.Procedure
|
|
|
|
. If they do not exist in your AWS account, create the required account-wide STS roles and attach the policies by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa create account-roles --hosted-cp
|
|
----
|
|
|
|
ifdef::egress-lockdown[]
|
|
. Ensure that the your worker role has the correct AWS policy by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ aws iam attach-role-policy \
|
|
--role-name ManagedOpenShift-HCP-ROSA-Worker-Role \
|
|
--policy-arn "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
|
|
----
|
|
+
|
|
--
|
|
`--role-name ManagedOpenShift-HCP-ROSA-Worker-Role`::This role needs to include the prefix that was created in the previous step.
|
|
--
|
|
endif::egress-lockdown[]
|
|
|
|
. Optional: Set your prefix as an environmental variable by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ export ACCOUNT_ROLES_PREFIX=<account_role_prefix>
|
|
----
|
|
|
|
** View the value of the variable by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ echo $ACCOUNT_ROLES_PREFIX
|
|
----
|
|
+
|
|
For example:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
ManagedOpenShift
|
|
----
|
|
+
|
|
For more information regarding AWS managed IAM policies for {product-title}, see link:https://docs.aws.amazon.com/ROSA/latest/userguide/security-iam-awsmanpol.html[AWS managed IAM policies for ROSA].
|
|
|
|
ifeval::["{context}" == "rosa-hcp-egress-zero-install"]
|
|
:!egress-lockdown:
|
|
endif::[]
|