Terraform References

  • Resources can reference attributes of other resources (name, ARN, etc)
  • References can be interpolated into other values
  • Terraform uses these references to determine build order
statement {
        effect = "Allow"
        actions = [
          "s3:PutObject",
          "s3:GetObject",
        ]
        resources = [
          aws_s3_bucket.storage-bucket.arn,
          "\${aws_s3_bucket.storage-bucket.arn}/*"
        ]

14 / 18