If your enterprise has multiple Alibaba Cloud accounts without a resource directory, you can export a compliance package from one account and import it to another to reuse the same compliance rules. In this example, a compliance package is exported from Alibaba Cloud Account A and imported to Alibaba Cloud Account B.
Prerequisites
-
Cloud Config is activated for Alibaba Cloud Account A, and a compliance package is created within the account. For more information, see Activate Cloud Config and Create a compliance package.
-
Cloud Config is activated for Alibaba Cloud Account B. For more information, see Activate Cloud Config.
Background information
You can write a compliance package template that contains managed rules supported by Cloud Config or custom condition rules to customize compliance rule sets for your business requirements. For more information, see Write a compliance package template in a configuration file.
Export a compliance package
Log on to the Cloud Config console by using Alibaba Cloud Account A and export a compliance package.
Log on to the Cloud Config console.
In the left-side navigation pane, choose .
-
On the Compliance Package page, find the compliance package to export and click Export in the Actions column.
A JSON file named after the compliance package is exported.
Import a compliance package
Log on to the Cloud Config console by using Alibaba Cloud Account B and import the compliance package.
Log on to the Cloud Config console.
In the left-side navigation pane, choose .
-
On the Compliance Package page, click Import Package in the Actions column of the target compliance package.
-
In the Import Package dialog box, click Upload File and then select the exported file.
The imported file must be in
.jsonor.txtformat and cannot exceed 1 MB. -
Click OK.
-
View the imported compliance package and its compliance check results.
The Compliance Package page displays the number of non-compliant resources.