Resource: aws_ec2_image_block_public_access

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.

Example Usage

# 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"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports no additional attributes.

Timeouts

Configuration options:

Import

You cannot import this resource.