google_cloud_asset_organization_feed

Describes a Cloud Asset Inventory feed used to to listen to asset updates.

To get more information about OrganizationFeed, see:

Example Usage - Cloud Asset Organization Feed

# Create a feed that sends notifications about network resource updates under a
# particular organization.
resource "google_cloud_asset_organization_feed" "organization_feed" {
  billing_project = "my-project-name"
  org_id          = "123456789"
  feed_id         = "network-updates"
  content_type    = "RESOURCE"

  asset_types = [
    "compute.googleapis.com/Subnetwork",
    "compute.googleapis.com/Network",
  ]

  feed_output_config {
    pubsub_destination {
      topic = google_pubsub_topic.feed_output.id
    }
  }

  condition {
    expression = <<-EOT
    !temporal_asset.deleted &&
    temporal_asset.prior_asset_state == google.cloud.asset.v1.TemporalAsset.PriorAssetState.DOES_NOT_EXIST
    EOT
    title = "created"
    description = "Send notifications on creation events"
  }
}

# The topic where the resource change notifications will be sent.
resource "google_pubsub_topic" "feed_output" {
  project  = "my-project-name"
  name     = "network-updates"
}

# Find the project number of the project whose identity will be used for sending
# the asset change notifications.
data "google_project" "project" {
  project_id = "my-project-name"
}

Argument Reference

The following arguments are supported:

The feed_output_config block supports:

The pubsub_destination block supports:


The condition block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

OrganizationFeed can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import OrganizationFeed using one of the formats above. For example:

import {
  id = "organizations/{{org_id}}/feeds/{{name}}"
  to = google_cloud_asset_organization_feed.default
}

When using the terraform import command, OrganizationFeed can be imported using one of the formats above. For example:

$ terraform import google_cloud_asset_organization_feed.default organizations/{{org_id}}/feeds/{{name}}
$ terraform import google_cloud_asset_organization_feed.default {{org_id}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.