> ## Documentation Index
> Fetch the complete documentation index at: https://www.ravion.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Terraform resources for a pipeline run

> List Terraform resources emitted by a Terraform step in this pipeline run.

runType is required so callers explicitly choose PLAN or APPLY output. If
the run contains multiple Terraform steps for that run type, call the
step-scoped endpoint with the desired step execution ID.



## OpenAPI

````yaml https://api.ravion.com/openapi.yaml get /pipeline-runs/{id}/terraform-resources
openapi: 3.0.0
info:
  title: Ravion
  version: 0.0.0
servers:
  - url: https://api.ravion.com
security:
  - BearerAuth: []
tags:
  - name: Projects
  - name: Environments
  - name: Pipelines
  - name: PipelineRuns
  - name: TerraformResources
  - name: TerraformExecutionSummaries
  - name: PipelineStepExecutions
  - name: AwsCloudWatch
  - name: PipelineVersions
  - name: Organizations
  - name: Stacks
  - name: StackWorkspaces
  - name: Auth
  - name: OAuth
  - name: User
  - name: Health
  - name: Memberships
  - name: ServiceAccounts
  - name: AwsDefaultNetworks
  - name: AwsAccounts
  - name: ApiKeys
  - name: ExecutionEnvironments
  - name: ModuleDefinitions
  - name: ModuleVersions
  - name: ModuleInstances
  - name: DefaultValueDefinitions
  - name: DefaultValues
  - name: CodeSources
  - name: Github
  - name: Gitlab
  - name: Git
  - name: Values
  - name: Deployments
  - name: DeploymentResources
  - name: InfrastructureEvents
  - name: WebSocket
  - name: Describe
paths:
  /pipeline-runs/{id}/terraform-resources:
    get:
      tags:
        - PipelineRuns
      summary: List Terraform resources for a pipeline run
      description: >-
        List Terraform resources emitted by a Terraform step in this pipeline
        run.


        runType is required so callers explicitly choose PLAN or APPLY output.
        If

        the run contains multiple Terraform steps for that run type, call the

        step-scoped endpoint with the desired step execution ID.
      operationId: ListPipelineRunTerraformResources
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - description: >-
            Terraform run type to inspect. PLAN shows planned changes; APPLY
            shows applied changes.
          in: query
          name: runType
          required: true
          schema:
            $ref: '#/components/schemas/PipelineRun.TerraformResourceRunType'
        - $ref: '#/components/parameters/PaginationQueryParams.cursor'
        - $ref: '#/components/parameters/PaginationQueryParams.limit'
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/TerraformResources'
                    type: array
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
                required:
                  - data
                  - meta
                type: object
          description: The request has succeeded.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The request is invalid or malformed.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You are not authenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You do not have permission to access this resource.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The server cannot find the requested resource.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Client error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Server error
components:
  schemas:
    PipelineRun.TerraformResourceRunType:
      enum:
        - PLAN
        - APPLY
      type: string
    TerraformResources:
      additionalProperties: false
      description: Terraform resource model representing a tracked infrastructure resource.
      properties:
        address:
          description: Full resource address, e.g., "module.vpc.aws_subnet.public[0]"
          maxLength: 500
          type: string
        changeType:
          allOf:
            - $ref: '#/components/schemas/TerraformResource.ChangeType'
          description: The type of change for this resource
        createdAt:
          allOf:
            - $ref: '#/components/schemas/UtcDateTime'
          readOnly: true
        driftStatus:
          allOf:
            - $ref: '#/components/schemas/TerraformResource.DriftStatus'
          description: Drift detection status
        id:
          readOnly: true
          type: string
        indexKey:
          description: >-
            Index key for indexed resources, e.g., "0" or "us-east-1a"
            (stringified)
          maxLength: 255
          type: string
        isInCurrentState:
          description: >-
            Whether this resource is part of the stack's current Terraform
            state:

            it is the most recent applied (APPLY) record for its address and has
            not

            been destroyed. This is false for plan-only resources and for
            records

            superseded or removed by a later run. Use this to tell which
            resources

            are actually live in the cloud, as opposed to merely planned or
            historical.
          readOnly: true
          type: boolean
        moduleAddress:
          description: Module address, e.g., "module.vpc" or null for root module
          maxLength: 500
          type: string
        organizationId:
          readOnly: true
          type: string
        pipelineRunId:
          description: The pipeline run ID this resource belongs to
          readOnly: true
          type: string
        provider:
          description: Provider name, e.g., "registry.terraform.io/hashicorp/aws"
          maxLength: 255
          type: string
        resourceName:
          description: Resource name, e.g., "public"
          maxLength: 255
          type: string
        resourceType:
          description: Resource type, e.g., "aws_subnet"
          maxLength: 255
          type: string
        runType:
          allOf:
            - $ref: '#/components/schemas/TerraformRunType'
          description: The type of terraform run (PLAN, APPLY, DESTROY)
        stackId:
          description: The stack ID this resource is tracked under
          readOnly: true
          type: string
        stepExecutionId:
          description: The step execution ID this resource belongs to
          type: string
        tainted:
          description: Whether the resource is tainted
          type: boolean
        updatedAt:
          allOf:
            - $ref: '#/components/schemas/UtcDateTime'
          readOnly: true
        vendor:
          allOf:
            - $ref: '#/components/schemas/TerraformResource.Vendor'
          description: Terraform vendor/tool type
        vendorData:
          allOf:
            - $ref: '#/components/schemas/TerraformResource.TerraformVendorData'
          description: Full resource values from terraform state/plan
      required:
        - id
        - createdAt
        - updatedAt
        - organizationId
        - address
        - resourceType
        - resourceName
        - provider
        - changeType
        - runType
        - vendor
        - driftStatus
        - tainted
        - vendorData
        - stepExecutionId
        - pipelineRunId
        - stackId
        - isInCurrentState
      type: object
    PaginationMeta:
      additionalProperties: false
      properties:
        limit:
          format: int32
          type: integer
        nextCursor:
          type: string
        totalCount:
          format: int32
          type: integer
      required:
        - limit
      type: object
    Errors.UserFacingErrorData:
      additionalProperties: false
      description: |-
        User-facing error presentation data.
        This is what the API returns to the frontend after formatting ErrorData
        using CEL templates from the error registry.

        Used for both:
        - Error fields on domain models (e.g., PipelineRun.error)
        - API error response bodies (HTTP 4xx/5xx responses)
      properties:
        action:
          allOf:
            - $ref: '#/components/schemas/Errors.Action'
          description: Optional action to help resolve the error
        code:
          description: Full error code, e.g., "Ravion:Pipeline:NOT_FOUND"
          type: string
        description:
          description: Additional description with more details
          type: string
        details:
          description: Structured details rendered as user-facing sections.
          items:
            $ref: '#/components/schemas/Errors.UserFacingErrorDetailSection'
          type: array
        isInternal:
          description: >-
            Indicates whether this error is internal (only set when
            ShowInternal=true).

            This allows SUPERADMINs to identify internal errors while viewing
            full details.
          type: boolean
        message:
          description: Main error message (required)
          type: string
        metadata:
          additionalProperties: {}
          description: >-
            Error params/metadata. Stripped for internal errors unless
            superadmin.
          type: object
        requestId:
          description: Request ID for correlating errors with server logs.
          type: string
      required:
        - code
        - message
      type: object
    TerraformResource.ChangeType:
      description: |-
        Enum for terraform resource change types.
        Maps to the actions array from terraform show -json output.
      enum:
        - CREATE
        - UPDATE
        - DELETE
        - REPLACE
        - IMPORT
        - READ
        - NO_OP
      type: string
    UtcDateTime:
      description: UTC RFC3339 timestamp with a required Z suffix
      format: date-time
      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$
      type: string
      x-go-type: apitypes.UTCDateTime
      x-go-type-import:
        name: apitypes
        path: ravion/api-go/pkg/apitypes
    TerraformResource.DriftStatus:
      description: Drift detection status
      enum:
        - UNKNOWN
        - IN_SYNC
        - DRIFTED
      type: string
    TerraformRunType:
      enum:
        - PLAN
        - APPLY
        - DESTROY
      type: string
    TerraformResource.Vendor:
      description: Terraform vendor/tool type
      enum:
        - TERRAFORM
        - OPENTOFU
      type: string
    TerraformResource.TerraformVendorData:
      additionalProperties: false
      properties:
        after: {}
        before: {}
      required:
        - after
      type: object
    Errors.Action:
      additionalProperties: false
      description: Action to help user resolve the error
      properties:
        label:
          description: Button/link label text
          type: string
        url:
          description: URL to navigate to for resolution
          type: string
      required:
        - label
        - url
      type: object
    Errors.UserFacingErrorDetailSection:
      additionalProperties: false
      description: Structured user-facing error detail section.
      properties:
        items:
          description: List of detail values for this section.
          items:
            type: string
          type: array
        object:
          additionalProperties: {}
          description: Structured detail payload for object rendering.
          type: object
        render:
          description: Rendering hint for clients. Valid values are list or object.
          type: string
        title:
          description: Detail section title shown in the UI.
          type: string
      required:
        - title
        - render
      type: object
  parameters:
    PaginationQueryParams.cursor:
      in: query
      name: cursor
      schema:
        nullable: true
        type: string
    PaginationQueryParams.limit:
      in: query
      name: limit
      schema:
        format: int32
        nullable: true
        type: integer
  securitySchemes:
    BearerAuth:
      scheme: Bearer
      type: http

````