Skip to content

Data Source: awsIotEndpoint

Returns a unique endpoint specific to the AWS account making the call.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as kubernetes from "./.gen/providers/kubernetes";
import * as aws from "./.gen/providers/aws";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: kubernetes.
For a more precise conversion please use the --provider flag in convert.*/
const dataAwsIotEndpointExample = new aws.dataAwsIotEndpoint.DataAwsIotEndpoint(
  this,
  "example",
  {}
);
new kubernetes.pod.Pod(this, "agent", {
  metadata: [
    {
      name: "my-device",
    },
  ],
  spec: [
    {
      container: [
        {
          env: [
            {
              name: "IOT_ENDPOINT",
              value: dataAwsIotEndpointExample.endpointAddress,
            },
          ],
          image: "gcr.io/my-project/image-name",
          name: "image-name",
        },
      ],
    },
  ],
});

Argument Reference

  • endpointType - (Optional) Endpoint type. Valid values: iot:credentialProvider, iot:data, iot:dataAts, iot:jobs.

Attributes Reference

  • endpointAddress - Endpoint based on endpointType:
  • No endpointType: Either iot:data or iot:dataAts depending on region
  • iot:credentialsProvider: identifierCredentialsIotRegionAmazonawsCom
  • iot:data: identifierIotRegionAmazonawsCom
  • iot:dataAts: identifierAtsIotRegionAmazonawsCom
  • iot:jobs: identifierJobsIotRegionAmazonawsCom