Organization Managed Rule
Manages a Config Organization Managed Rule. More information about these rules can be found in the Enabling AWS Config Rules Across all Accounts in Your Organization and AWS Config Managed Rules documentation. For working with Organization Custom Rules (those invoking a custom Lambda Function), see the aws.cfg.OrganizationCustomRule
resource.
NOTE: This resource must be created in the Organization master account and rules will include the master account unless its ID is added to the
excluded_accounts
argument. NOTE: Every Organization account except those configured in theexcluded_accounts
argument must have a Configuration Recorder with proper IAM permissions before the rule will successfully create or update. See also theaws.cfg.Recorder
resource.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.organizations.Organization;
import com.pulumi.aws.organizations.OrganizationArgs;
import com.pulumi.aws.cfg.OrganizationManagedRule;
import com.pulumi.aws.cfg.OrganizationManagedRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleOrganization = new Organization("exampleOrganization", OrganizationArgs.builder()
.awsServiceAccessPrincipals("config-multiaccountsetup.amazonaws.com")
.featureSet("ALL")
.build());
var exampleOrganizationManagedRule = new OrganizationManagedRule("exampleOrganizationManagedRule", OrganizationManagedRuleArgs.builder()
.ruleIdentifier("IAM_PASSWORD_POLICY")
.build(), CustomResourceOptions.builder()
.dependsOn(exampleOrganization)
.build());
}
}
Import
Using pulumi import
, import Config Organization Managed Rules using the name. For example:
$ pulumi import aws:cfg/organizationManagedRule:OrganizationManagedRule example example
Properties
Identifier of an available AWS Config Managed Rule to call. For available values, see the List of AWS Config Managed Rules documentation