身為雲端作業管理員,您可以使用 vRealize Automation Cloud Guardrails 建立組織單位 (OU) 和成員帳戶,並在您的環境中進行部署。您還可以將成員帳戶新增到現有 OU。
例如,您可以啟動載入 AWS,並建立一個組織 (org) 和兩個主要組織單位 (OU)。
- 核心 OU 可以包括用於確保安全性、記錄封存檔和共用服務的成員帳戶。
- 原則 OU 可以包括基準帳戶,並驅動組織的原則。
在此範例中,將透過建立 OU 和成員帳戶來啟動載入 AWS 環境,並將原則套用至 OU。若要啟動載入 AWS,您需要在 Cloud Guardrails 範本程式庫中選取一或多個啟動載入範本 SLS 檔案,根據需要更新這些檔案,然後將其以 Cloud Guardrails 所需狀態執行。例如:
- AWS 組織單位
- AWS 成員帳戶
- 建立 AWS 登陸區域
Cloud Guardrails 佈建 OU 和成員帳戶後,您可以建立一個登陸區域,例如 Virtual Private Cloud (VPC),可以在其中部署工作負載和應用程式。如果要使用 Kubernetes 叢集,則使用建立 OU 和成員帳戶的範本對於快速設定尤為重要。
透過使用 Guardrails 範本,可以快速建立 OU 和成員帳戶,並將其部署到您的環境中。透過巢狀 OU 和成員帳戶啟動載入 AWS 時,必須包括特定的中繼資料,其中包括名稱、類型、提供者、說明和參數。
例如:
META: name: AWS landing zone type: GUARDRAILS_BUNDLE provider: AWS description: Create nested OUs and member accounts with SCP polices. parameters: - root_org_name : Root Organization name type: String
OU 啟動載入範本代碼類似於:
META: name: AWS Organizational Unit provider: AWS category: BOOTSTRAP description: An organizational unit (OU) is a group of AWS accounts within an organization. An OU can also contain other OUs enabling you to create a hierarchy. {% set organization_unit_name = params.get('organization_unit_name') %} {% set parent_org_id = params.get('parent_org_id') %} {{organization_unit_name}}: META: name: Create organization unit parameters: organization_unit_name: uiElement: text name: Organization Unit description: An organizational unit (OU) is a group of AWS accounts within an organization. An OU can also contain other OUs enabling you to create a hierarchy. parent_org_id: uiElement: text name: Parent Org Id description: An organizational name is a group of AWS accounts or OUs within an organization. aws.organizations.organization_unit.present: - org_unit_name: {{organization_unit_name}} - parent_id: {{parent_org_id}}
成員帳戶啟動載入範本代碼類似於:
META: name: AWS Member Account provider: AWS category: BOOTSTRAP description: An account in Organizations is a standard AWS account that contains your AWS resources and the identities that can access those resources. {% set member_account_name = params.get('member_account_name') %} {% set member_account_email = params.get('member_account_email') %} {% set member_account_role = params.get('member_account_role', 'OrganizationAccountAccessRole') %} {% set parent_org_id = params.get('parent_org_id') %} {{member_account_name}}: META: name: Create AWS member account description: An account in Organizations is a standard AWS account that contains your AWS resources and the identities that can access those resources. parameters: member_account_name: uiElement: text name: Account Name description: Name of member account. member_account_role: uiElement: text name: Role Name description: Provide some role to member account. member_account_email: uiElement: text name: Email description: Email id for creating member account. parent_org_id: uiElement: text name: Parent Org Id description: Id of the Organization or Organization Unit under which the account will be created. aws.organizations.account.present: - account_name: {{member_account_name}} - role_name: {{member_account_role}} - email: {{member_account_email}} - iam_user_access_to_billing: ALLOW - parent_id: {{parent_org_id}}
在以下範例中,將透過巢狀 OU 和成員帳戶啟動載入 AWS,並將原則套用至 OU 和成員帳戶。
必要條件
- 設定整合。請參閱設定 Cloud Guardrails。
- 啟用 Cloud Guardrails 並確保您具有適當的角色。請參閱如何在 Cloud Guardrails 中管理使用者存取權。
程序
結果
您從 Cloud Guardrails 範本程式庫中匯入了多個啟動載入範本,以便可以將其以 Cloud Guardrails 所需狀態強制執行。
下一步
建立執行所選 Cloud Guardrails 範本的 Cloud Guardrails 所需狀態。請參閱如何從範本建立 Cloud Guardrails 所需狀態並強制執行。
如果您可以直接存取 Cloud Guardrails 範本存放庫,則可以檢視其中的所有可用範本。