Skip to content

Resource: awsResourceexplorer2View

Provides a resource to manage a Resource Explorer view.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsResourceexplorer2IndexExample =
  new aws.resourceexplorer2Index.Resourceexplorer2Index(this, "example", {
    type: "LOCAL",
  });
const awsResourceexplorer2ViewExample =
  new aws.resourceexplorer2View.Resourceexplorer2View(this, "example_1", {
    depends_on: [`\${${awsResourceexplorer2IndexExample.fqn}}`],
    filters: [
      {
        filterString: "resourcetype:ec2:instance",
      },
    ],
    includedProperty: [
      {
        name: "tags",
      },
    ],
    name: "exampleview",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsResourceexplorer2ViewExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • defaultView - (Optional) Specifies whether the view is the default view for the AWS Region. Default: false.
  • filters - (Optional) Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
  • includedProperty - (Optional) Optional fields to be included in search results from this view. See Included Properties below for more details.
  • name - (Required) The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
  • tags - (Optional) Key-value map of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Filters

The filters block supports the following:

  • filterString - (Required) The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a search operation. For more details, see Search query syntax.

Included Properties

The includedProperty block supports the following:

  • name - (Required) The name of the property that is included in this view. Valid values: tags.

Attributes Reference

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

  • arn - Amazon Resource Name (ARN) of the Resource Explorer view.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

Resource Explorer views can be imported using the arn, e.g.

$ terraform import aws_resourceexplorer2_view.example arn:aws:resource-explorer-2:us-west-2:123456789012:view/exampleview/e0914f6c-6c27-4b47-b5d4-6b28381a2421