hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.72k stars 9.07k forks source link

[New Resource]: Add support for resource to configure zonal autoshifts using application recovery controller #37120

Open sjparkinson opened 4 months ago

sjparkinson commented 4 months ago

Description

Route53 Application Recovery Controller supports configuring zonal autoshift.

Today we’re launching zonal autoshift, a new capability of Amazon Route 53 Application Recovery Controller that you can enable to automatically and safely shift your workload’s traffic away from an Availability Zone when AWS identifies a potential failure affecting that Availability Zone and shift it back once the failure is resolved.

Requested Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_route53recoverycontrolconfig_zonal_autoshift" "this" {
  resource_arn                              = "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/example-alb/1111111111111111"
  monitor_practice_run_cloudwatch_alarm_arn = "arn:aws:cloudwatch:us-east-1:123456789012:alarm:example-alb-5xx-errors"
  block_practice_run_cloudwatch_alarm_arn   = "arn:aws:cloudwatch:us-east-1:123456789012:alarm:example-alb-5xx-errors" # Optional

  enabled = true

  # Up to 15 allowed
  blocked_window {
    day   = "Monday"
    start = "17:00"
    end   = "09:00"
  }

  # Up to 15 allowed
  blocked_date {
    date = "2024/04/1"
  }

  blocked_date {
    date = "2024/04/28"
  }
}

import {
  to = aws_route53recoverycontrolconfig_zonal_autoshift.this
  id = "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/example-alb/1111111111111111"
}

References

This resource is already available in the awscc Terraform provider at https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/arczonalshift_zonal_autoshift_configuration.

Related issues

Resource screenshots

Screenshot 2024-04-26 at 11 30 36 Screenshot 2024-04-26 at 11 30 41 Screenshot 2024-04-26 at 11 30 44

Would you like to implement a fix?

None

github-actions[bot] commented 4 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue