Skip to content

Resource: awsLocationTrackerAssociation

Terraform resource for managing an AWS Location Tracker Association.

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 awsLocationGeofenceCollectionExample =
  new aws.locationGeofenceCollection.LocationGeofenceCollection(
    this,
    "example",
    {
      collectionName: "example",
    }
  );
const awsLocationTrackerExample = new aws.locationTracker.LocationTracker(
  this,
  "example_1",
  {
    trackerName: "example",
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsLocationTrackerExample.overrideLogicalId("example");
const awsLocationTrackerAssociationExample =
  new aws.locationTrackerAssociation.LocationTrackerAssociation(
    this,
    "example_2",
    {
      consumerArn: awsLocationGeofenceCollectionExample.collectionArn,
      trackerName: awsLocationTrackerExample.trackerName,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsLocationTrackerAssociationExample.overrideLogicalId("example");

Argument Reference

The following arguments are required:

  • consumerArn - (Required) The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
  • trackerName - (Required) The name of the tracker resource to be associated with a geofence collection.

Attributes Reference

No additional attributes are exported.

Timeouts

awsLocationTrackerAssociation provides the following Timeouts configuration options:

  • create - (Optional, Default: 30M)
  • delete - (Optional, Default: 30M)

Import

Location Tracker Association can be imported using the trackerName|consumerArn, e.g.,

$ terraform import aws_location_tracker_association.example "tracker_name|consumer_arn"