» Data Source: aws_partition

Use this data source to lookup information about the current AWS partition in which Terraform is working.

» Example Usage

data "aws_partition" "current" {}

data "aws_iam_policy_document" "s3_policy" {
  statement {
    sid = "1"

    actions = [
      "s3:ListBucket",
    ]

    resources = [
      "arn:${data.aws_partition.current.partition}:s3:::my-bucket",
    ]
  }
}

» Argument Reference

There are no arguments available for this data source.

» Attributes Reference

  • partition is set to the identifier of the current partition.
  • dns_suffix is set to the base DNS domain name for the current partition (e.g. amazonaws.com in AWS Commercial, amazonaws.com.cn in AWS China).