Provides a regional public access block for AMIs. This prevents AMIs from being made publicly accessible. If you already have public AMIs, they will remain publicly available.
# Prevent making AMIs publicly accessible in the region and account for which the provider is configured
resource "aws_ec2_image_block_public_access" "test" {
state = "block-new-sharing"
}
This resource supports the following arguments:
state
- (Required) The state of block public access for AMIs at the account level in the configured AWS Region. Valid values: unblocked
and block-new-sharing
.This resource exports no additional attributes.
update
- (Default 10m
)You cannot import this resource.