Skip to content

2 - Add api docs for stack configuration apis #904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

mrinalirao
Copy link
Contributor

@mrinalirao mrinalirao commented May 14, 2025

What

Note: Stacks CRUD APIs need to be approved first: #898

This PR adds API docs for basic stacks configuration APIs.
https://hashicorp.atlassian.net/browse/TF-26184

NOTE: This PR will remain in draft as this cannot be merged before stacks goes GA.
The API documentation has been divided into multiple PRs to simplify the review process. As each of these PRs is approved, it will be merged into mr/stacks-api-ga branch.

1. POST /stacks/{stack_id}/stack-configurations
2. GET /stacks/{stack_id}/stack-configurations
3. GET /stack-configurations/{stack_configuration_id}
4. GET /stacks/{stack_id}/stack-configuration-summaries
5. POST /stacks/{stack_id}/fetch-latest-from-vcs
6. GET /stack-configurations/{stack_configuration_id}/stack-diagnostics
7. GET /stack-configurations/{stack_configuration_id}/upload-url
8. GET /stack-configurations/{stack_configuration_id}/prepared-source

Subsequent PRs will address other Stacks API's (for ease of review). The CHANGELOG will be updated once all the APIs have been added

Why

In preparation for stacks going GA, we need to document all the public facing API's for stacks

Merge Checklist

If items do not apply to your changes, add (N/A) and mark them as complete.

Pull Request

  • One or more labels describe the type of change (e.g. clarification) and associated product (e.g. HCP Terraform ).
  • Description links to related pull requests or issues, if any.

Content

  • Redirects have been added to website/redirects.js for moved, renamed, or deleted pages.
  • API documentation and the API Changelog have been updated.
  • Links to related content where appropriate (e.g., API endpoints, permissions, etc.).
  • Pages with related content are updated and link to this content when appropriate.
  • Sidebar navigation files have been updated for added, deleted, reordered, or renamed pages.
  • New pages have metadata (page name and description) at the top.
  • New images are 2048 px wide. They have HashiCorp standard annotation color (#F92672) and format (rectangle with rounded corners), blurred sensitive details (e.g. credentials, usernames, user icons), and descriptive alt text in the markdown for accessibility.
  • New code blocks have the correct syntax and line breaks to eliminate horizontal scroll bars.
  • UI elements (button names, page names, etc.) are bolded.
  • The Vercel website preview successfully deployed.

Reviews

  • I or someone else reviewed the content for technical accuracy.
  • I or someone else reviewed the content for typos, punctuation, spelling, and grammar.

Copy link

vercel bot commented May 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terraform-docs-common ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 7:47am

@mrinalirao mrinalirao requested a review from a team May 14, 2025 05:18
@mrinalirao mrinalirao force-pushed the mr/stacks-configuration-api branch from 511b1d9 to e8e3608 Compare May 14, 2025 22:52
@mrinalirao mrinalirao force-pushed the mr/stacks-configuration-api branch from e8e3608 to 4aad20e Compare May 18, 2025 23:35
@mrinalirao mrinalirao force-pushed the mr/stacks-configuration-api branch from 4aad20e to 34779bb Compare May 18, 2025 23:42
@mrinalirao mrinalirao changed the title Add api docs for stack configuration apis 2 - Add api docs for stack configuration apis May 19, 2025
@mrinalirao mrinalirao force-pushed the mr/stacks-configuration-api branch from 34779bb to b3a9448 Compare May 19, 2025 01:38
@rkoron007 rkoron007 added the notified-of-UDR A tag for tracking that this PR owner knows about UDR. label May 27, 2025
@rkoron007
Copy link
Contributor

Howdy @mrinalirao! I posted this on your other PRs, but as a reminder to myself:

Heads up that we will be migrating the content from terraform-docs-common into the UDR repo this week. I'm going through and merging any documentation PRs we can get in before migration, but for future work you'll need to recreate this PR over in the UDR repo after the migration is complete (and I'll leave a comment on all the associated Stacks PRs).

So a heads up, after the migration happens I'll close this PR and will let you know when you are good to recreate it! Apologies about the extra work you have to do though!

Copy link
Contributor

@aaabdelgany aaabdelgany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, please feel free to ping me or let me know when it's ready for a final review

| `POST` | `/stacks/:stack_id/fetch-latest-from-vcs` | Call this endpoint to [fetch the latest stack configuration](#fetch-the-latest-stack-configuration). |
| `GET` | `/stack-configurations/:stack_configuration_id/stack-diagnostics` | Call this endpoint to [list stack configuration diagnostics](#list-stack-configuration-diagnostics). |
| `GET` | `/stack-configurations/:stack_configuration_id/upload-url` | Call this endpoint to [fetch stack configuration upload url](#fetch-stack-configuration-upload-url). |
| `GET` | `/stack-configurations/:stack_configuration_id/source-bundle` | Call this endpoint to [fetch stack configuration source bundle](#fetch-stack-configuration-source-bundle). |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we supposed to observe any particular order with regards to API actions? It may be nice to group everything together for readability - but I'm not sure if that's an official requirement or suggestion.

Copy link
Contributor Author

@mrinalirao mrinalirao Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m happy to follow your suggestion on how these APIs should be ordered, as I don’t have a strong preference. :) They’re currently grouped based on the corresponding JIRA tickets, but we can absolutely revisit the ordering once all the PRs are merged into a single one (into the first PR branch)

@rkoron007
Copy link
Contributor

Hello @mrinalirao!

The UDR migration has occurred, and the HCP Terraform documentation version now lives in the unified documentation repository. I'm going to close this PR since we are no longer serving this content from this repo, but please feel free to recreate your PR in the UDR repository within the HCP Terraform documentation and tag me if you need a review:
https://github.com/hashicorp/web-unified-docs/tree/main/content/terraform-docs-common/docs/cloud-docs

@rkoron007 rkoron007 closed this Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notified-of-UDR A tag for tracking that this PR owner knows about UDR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants