AWS Glue Resource Policy

This page shows how to write Terraform for AWS Glue Resource Policy and write them securely.

aws_glue_resource_policy (Terraform)

The Resource Policy in AWS Glue can be configured in Terraform with the resource name aws_glue_resource_policy. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

glue_resource_policy.tf#L4
resource "aws_glue_resource_policy" "glue_resource_policy" {
  count = var.enable_glue_resource_policy ? 1 : 0

  policy = var.glue_resource_policy

  lifecycle {
glue_resource_policy.tf#L4
resource "aws_glue_resource_policy" "glue_resource_policy" {
  count = var.enable_glue_resource_policy ? 1 : 0

  policy = var.glue_resource_policy

  lifecycle {
glue_resource_policy.tf#L4
resource "aws_glue_resource_policy" "glue_resource_policy" {
  count = var.enable_glue_resource_policy ? 1 : 0

  policy = var.glue_resource_policy

  lifecycle {
positive.tf#L14
resource "aws_glue_resource_policy" "example" {
  policy = data.aws_iam_policy_document.glue-example-policy.json
}
negative.tf#L14
resource "aws_glue_resource_policy" "example2" {
  policy = data.aws_iam_policy_document.glue-example-policy2.json
}

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

  • id optional computed - string
  • policy required - string

Explanation in Terraform Registry

Provides a Glue resource policy. Only one can exist per region.

CloudFormation Example

CloudFormation code does not have the related resource.

Frequently asked questions

What is AWS Glue Resource Policy?

AWS Glue Resource Policy is a resource for Glue of Amazon Web Service. Settings can be wrote in Terraform.

Where can I find the example code for the AWS Glue Resource Policy?

For Terraform, the asrkata/SebastianUA-terraform, SebastianUA/terraform and SebastianUA/terraform-aws-glue source code examples are useful. See the Terraform Example section for further details.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.