GroupPolicyRemediation

class GroupPolicyRemediation : KotlinCustomResource

Manages an Azure Management Group Policy Remediation.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.management.Group;
import com.pulumi.azure.management.GroupArgs;
import com.pulumi.azure.policy.PolicyFunctions;
import com.pulumi.azure.policy.inputs.GetPolicyDefintionArgs;
import com.pulumi.azure.management.GroupPolicyAssignment;
import com.pulumi.azure.management.GroupPolicyAssignmentArgs;
import com.pulumi.azure.management.GroupPolicyRemediation;
import com.pulumi.azure.management.GroupPolicyRemediationArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.displayName("Example Management Group")
.build());
final var example = PolicyFunctions.getPolicyDefintion(GetPolicyDefintionArgs.builder()
.displayName("Allowed locations")
.build());
var exampleGroupPolicyAssignment = new GroupPolicyAssignment("exampleGroupPolicyAssignment", GroupPolicyAssignmentArgs.builder()
.name("exampleAssignment")
.managementGroupId(exampleGroup.id())
.policyDefinitionId(example.applyValue(getPolicyDefintionResult -> getPolicyDefintionResult.id()))
.parameters(serializeJson(
jsonObject(
jsonProperty("listOfAllowedLocations", jsonObject(
jsonProperty("value", jsonArray("East US"))
))
)))
.build());
var exampleGroupPolicyRemediation = new GroupPolicyRemediation("exampleGroupPolicyRemediation", GroupPolicyRemediationArgs.builder()
.name("example")
.managementGroupId(exampleGroup.id())
.policyAssignmentId(exampleGroupPolicyAssignment.id())
.build());
}
}

Import

Policy Remediations can be imported using the resource id, e.g.

$ pulumi import azure:management/groupPolicyRemediation:GroupPolicyRemediation example /providers/Microsoft.Management/managementGroups/my-mgmt-group-id/providers/Microsoft.PolicyInsights/remediations/remediation1

Properties

Link copied to clipboard

A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val locationFilters: Output<List<String>>?

A list of the resource locations that will be remediated.

Link copied to clipboard

The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>

The name of the Policy Remediation. Changing this forces a new resource to be created.

Link copied to clipboard
val parallelDeployments: Output<Int>?

Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.

Link copied to clipboard

The ID of the Policy Assignment that should be remediated.

Link copied to clipboard

The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.

Link copied to clipboard

The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceCount: Output<Int>?

Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.

Link copied to clipboard

The way that resources to remediate are discovered. Possible values are ExistingNonCompliant, ReEvaluateCompliance. Defaults to ExistingNonCompliant.

Link copied to clipboard
val urn: Output<String>