# Get resource change detail by address

Get every attribute document matching a Terraform resource address.

This is the address-keyed counterpart to get-resource-change-detail. Consumers that hold a
Terraform address — the dependency graph, risk map, future agents — can fetch the matching
attribute documents without first discovering an ordinal via list-resource-change-rows, and
without knowing which category the address lives in.

Omit category to search every category. The same address can appear as a planned change and as
drift, or as a planned change and as a provisioned resource; every match is returned and the
caller chooses. Pass category to restrict to one bucket. Pass change to restrict planned_changes
and drift_changes rows to one change type — for example the added half of a replace.

Only the bytes belonging to each matching row's attribute document are read, so the cost of a
detail request is independent of how large the plan or the stored snapshot is.

A 404 means no row is retrievable — an unknown address, an uncommitted snapshot, or a snapshot
whose attribute data has passed its retention window while the row survives. It is not an error
worth retrying.

Endpoint: GET /iacm/api/orgs/{org}/projects/{project}/executions/{pipeline_execution_id}/{pipeline_stage_id}/resource-changes/by-address/{resource_address}
Version: 1.0
Security: x-api-key

## Query parameters:

  - `category` (string)
    Restrict to this category. Omit it to return matches from every category.
    Enum: "planned_changes", "drift_changes", "resources", "outputs"

  - `change` (string)
    Restrict planned_changes and drift_changes matches to this change type. Omit it to return every matching row.
    Enum: "added", "changed", "deleted", "unchanged", "imported", "removed", "replaced"

## Path parameters:

  - `org` (string, required)
    Org is the organisation identifier.
    Example: "az"

  - `project` (string, required)
    Project is the project identifier.
    Example: "kqn"

  - `pipeline_execution_id` (string, required)
    Pipeline execution ID
    Example: "7t"

  - `pipeline_stage_id` (string, required)
    Pipeline execution stage ID
    Example: "e0"

  - `resource_address` (string, required)
    Fully qualified Terraform address of the resource, module path included.
    Example: "module.app.aws_s3_bucket.app_bucket"

## Header parameters:

  - `Harness-Account` (string, required)
    Account is the internal customer account ID.
    Example: "r"

## Response 200 fields (application/json):

  - `details` (array, required)
    Example: [{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"category":"planned_changes","change":"added","change_count":3,"changes":{"Aut rerum delectus voluptas officiis et.":{"change":"added","drift":false,"new":"new value","old":"old value","sensitive":true},"Et quisquam reprehenderit alias itaque ut.":{"change":"added","drift":false,"new":"new value","old":"old value","sensitive":true}},"drift":false,"mode":"resource","module":"root","name":"app_bucket","ordinal":17,"provider":"AWS","resource_address":"module.app.aws_s3_bucket.app_bucket","resource_id":"arn:aws:s3:::my-bucket","sensitive":false,"sensitive_attributes":["password"],"type":"aws_s3_bucket","value":"i-0abc123"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"category":"planned_changes","change":"added","change_count":3,"changes":{"Aut rerum delectus voluptas officiis et.":{"change":"added","drift":false,"new":"new value","old":"old value","sensitive":true},"Et quisquam reprehenderit alias itaque ut.":{"change":"added","drift":false,"new":"new value","old":"old value","sensitive":true}},"drift":false,"mode":"resource","module":"root","name":"app_bucket","ordinal":17,"provider":"AWS","resource_address":"module.app.aws_s3_bucket.app_bucket","resource_id":"arn:aws:s3:::my-bucket","sensitive":false,"sensitive_attributes":["password"],"type":"aws_s3_bucket","value":"i-0abc123"},{"attributes":{"ami":"ami-830c94ec","instance_type":"t2.micro"},"category":"planned_changes","change":"added","change_count":3,"changes":{"Aut rerum delectus voluptas officiis et.":{"change":"added","drift":false,"new":"new value","old":"old value","sensitive":true},"Et quisquam reprehenderit alias itaque ut.":{"change":"added","drift":false,"new":"new value","old":"old value","sensitive":true}},"drift":false,"mode":"resource","module":"root","name":"app_bucket","ordinal":17,"provider":"AWS","resource_address":"module.app.aws_s3_bucket.app_bucket","resource_id":"arn:aws:s3:::my-bucket","sensitive":false,"sensitive_attributes":["password"],"type":"aws_s3_bucket","value":"i-0abc123"}]

  - `details.attributes` (object)
    Flat attribute document for a provisioned resource or data source.
    Example: {"ami":"ami-830c94ec","instance_type":"t2.micro"}

  - `details.category` (string, required)
    Category this row belongs to.
    Enum: "planned_changes", "drift_changes", "resources", "outputs"

  - `details.change` (string)
    Change made to this resource. Populated for planned_changes and drift_changes rows.
    Enum: "added", "changed", "deleted", "replaced", "unchanged", "imported", "removed"

  - `details.change_count` (integer)
    Count of changed attributes on this resource. Populated for planned_changes and drift_changes rows.
    Example: 3

  - `details.changes` (object)
    Per-attribute before and after values.
    Example: {"Quia ad amet nam cupiditate qui.":{"change":"added","drift":false,"new":"new value","old":"old value","sensitive":true}}

  - `details.drift` (boolean)
    Whether this row came from drift detection rather than a plan. True exactly when category is drift_changes.

  - `details.mode` (string)
    Whether the row is a managed resource or a data source. Populated for resources rows.
    Enum: "resource", "data"

  - `details.module` (string, required)
    Module associated with the resource.
    Example: "root"

  - `details.name` (string, required)
    Name associated with the resource, or the output name for outputs rows.
    Example: "app_bucket"

  - `details.ordinal` (integer, required)
    Zero-based position of this row within its category. Ordinals are per-category and stable for the life of the snapshot, which is what makes them safe to address the detail endpoint with.
    Example: 17

  - `details.provider` (string, required)
    Cloud provider associated with the resource.
    Example: "AWS"

  - `details.resource_address` (string, required)
    Fully qualified address of the resource, module path included.
    Example: "module.app.aws_s3_bucket.app_bucket"

  - `details.resource_id` (string)
    Identifier for the resource from the cloud provider. Populated for resources rows.
    Example: "arn:aws:s3:::my-bucket"

  - `details.sensitive` (boolean)
    Whether this row's value is sensitive. Populated for outputs rows.

  - `details.sensitive_attributes` (array)
    Attribute keys whose values are sensitive and have been withheld.
    Example: ["password"]

  - `details.type` (string, required)
    Provider resource type.
    Example: "aws_s3_bucket"

  - `details.value` (string)
    Output value. Populated for outputs rows, whose values are stored inline rather than behind a detail read.
    Example: "i-0abc123"

## Response 400 fields (application/vnd.goa.error):

  - `fault` (boolean, required)
    Is the error a server-side fault?
    Example: true

  - `id` (string, required)
    ID is a unique identifier for this particular occurrence of the problem.
    Example: "123abc"

  - `message` (string, required)
    Message is a human-readable explanation specific to this occurrence of the problem.
    Example: "parameter 'p' must be an integer"

  - `name` (string, required)
    Name is the name of this class of errors.
    Example: "bad_request"

  - `temporary` (boolean, required)
    Is the error temporary?
    Example: true

  - `timeout` (boolean, required)
    Is the error a timeout?


