Manages an EC2 Availability Zone Group, such as updating its opt-in status.
resource "aws_ec2_availability_zone_group" "example" {
group_name = "us-west-2-lax-1"
opt_in_status = "opted-in"
}
The following arguments are required:
group_name
- (Required) Name of the Availability Zone Group.opt_in_status
- (Required) Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in
or not-opted-in
.This resource exports the following attributes in addition to the arguments above:
id
- Name of the Availability Zone Group.In Terraform v1.5.0 and later, use an import
block to import EC2 Availability Zone Groups using the group name. For example:
import {
to = aws_ec2_availability_zone_group.example
id = "us-west-2-lax-1"
}
Using terraform import
, import EC2 Availability Zone Groups using the group name. For example:
% terraform import aws_ec2_availability_zone_group.example us-west-2-lax-1