Skip to content

Instantly share code, notes, and snippets.

@ryanuber
Created June 26, 2023 18:08
Show Gist options
  • Save ryanuber/3587d5676e85d4e67dbc64e7669ce945 to your computer and use it in GitHub Desktop.
Save ryanuber/3587d5676e85d4e67dbc64e7669ce945 to your computer and use it in GitHub Desktop.
openapi: 3.1.0
info:
title: Terraform Cloud API
version: 0.0.1
servers:
- url: https://app.terraform.io
paths:
/workspaces/{id}/resources:
get:
summary: Get the resources associated with a workspace.
parameters:
- name: id
in: path
required: true
responses:
200:
description: Workspace resources.
content:
application/vnd.api+json:
schema:
$ref: "#components/schemas/workspace_resources_response"
components:
schemas:
workspace_resources_response:
type: object
required:
- data
properties:
data:
$ref: "#components/schemas/workspace_resources"
workspace_resources:
type: array
items:
$ref: "#components/schemas/workspace_resource"
workspace_resource:
description: A workspace resource.
type: object
required:
- type
- id
properties:
type:
type: string
id:
type: string
attributes:
type: object
properties:
name:
description: The name of the resource.
type: string
address:
description: The Terraform address of the resource.
type: string
created-at:
description: Timestamp when the resource was created.
type: string
updated-at:
description: Timestamp when the resource was last modified.
type: string
provider:
description: Name of the provider which created the resource.
type: string
provider-type:
description: Name of the resource type.
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment