Skip to content

Resource: awsRoute53RecoverycontrolconfigSafetyRule

Provides an AWS Route 53 Recovery Control Config Safety Rule

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.route53RecoverycontrolconfigSafetyRule.Route53RecoverycontrolconfigSafetyRule(
  this,
  "example",
  {
    assertedControls: [
      "${aws_route53recoverycontrolconfig_routing_control.example.arn}",
    ],
    controlPanelArn:
      "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
    name: "daisyguttridge",
    ruleConfig: {
      inverted: false,
      threshold: 1,
      type: "ATLEAST",
    },
    waitPeriodMs: 5000,
  }
);
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.route53RecoverycontrolconfigSafetyRule.Route53RecoverycontrolconfigSafetyRule(
  this,
  "example",
  {
    controlPanelArn:
      "arn:aws:route53-recovery-control::313517334327:controlpanel/abd5fbfc052d4844a082dbf400f61da8",
    gatingControls: [
      "${aws_route53recoverycontrolconfig_routing_control.example.arn}",
    ],
    name: "i_o",
    ruleConfig: {
      inverted: false,
      threshold: 1,
      type: "ATLEAST",
    },
    targetControls: [
      "${aws_route53recoverycontrolconfig_routing_control.example.arn}",
    ],
    waitPeriodMs: 5000,
  }
);

Argument Reference

The following arguments are supported:

  • controlPanelArn - (Required) ARN of the control panel in which this safety rule will reside.
  • name - (Required) Name describing the safety rule.
  • ruleConfig - (Required) Configuration block for safety rule criteria. See below.
  • waitPeriodMs - (Required) Evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail.

The following arguments are optional:

  • assertedControls - (Optional) Routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed.
  • gatingControls - (Optional) Gating controls for the new gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
  • targetControls - (Optional) Routing controls that can only be set or unset if the specified ruleConfig evaluates to true for the specified gatingControls.

ruleConfig

  • inverted - (Required) Logical negation of the rule.
  • threshold - (Required) Number of controls that must be set when you specify an atleast type rule.
  • type - (Required) Rule type. Valid values are atleast, and, and or.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - ARN of the safety rule.
  • status - Status of the safety rule. pending when it is being created/updated, PENDING_DELETION when it is being deleted, and deployed otherwise.

Import

Route53 Recovery Control Config Safety Rule can be imported via the safety rule ARN, e.g.,

$ terraform import aws_route53recoverycontrolconfig_safety_rule.myrule arn:aws:route53-recovery-control::313517334327:controlpanel/1bfba17df8684f5dab0467b71424f7e8/safetyrule/3bacc77003364c0f