Data Source: awsEc2LocalGateways
Provides information for multiple EC2 Local Gateways, such as their identifiers.
Example Usage
The following example retrieves Local Gateways with a resource tag of service
set to production
.
import * as cdktf from "cdktf";
/*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 dataAwsEc2LocalGatewaysFoo =
new aws.dataAwsEc2LocalGateways.DataAwsEc2LocalGateways(this, "foo", {
tags: {
service: "production",
},
});
const cdktfTerraformOutputFoo = new cdktf.TerraformOutput(this, "foo_1", {
value: dataAwsEc2LocalGatewaysFoo.ids,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
cdktfTerraformOutputFoo.overrideLogicalId("foo");
Argument Reference
-
tags
- (Optional) Mapping of tags, each pair of which must exactly match a pair on the desired local_gateways. -
filter
- (Optional) Custom filter block as described below.
More complex filters can be expressed using one or more filter
sub-blocks, which take the following arguments:
-
name
- (Required) Name of the field to filter by, as defined by the underlying AWS API. -
values
- (Required) Set of values that are accepted for the given field. A Local Gateway will be selected if any one of the given values matches.
Attributes Reference
id
- AWS Region.ids
- Set of all the Local Gateway identifiers
Timeouts
read
- (Default20M
)