Skip to content

Add a two-part Terraform starter guide#44834

Merged
ptgott merged 5 commits intomasterfrom
paul.gottschling/2024-07-tf-rbac
Sep 4, 2024
Merged

Add a two-part Terraform starter guide#44834
ptgott merged 5 commits intomasterfrom
paul.gottschling/2024-07-tf-rbac

Conversation

@ptgott
Copy link
Copy Markdown
Contributor

@ptgott ptgott commented Jul 30, 2024

Closes #41055

Add a learning series for users who wants to get started with managing Teleport resources using Terraform. The guide takes the user through some fundamental cluster setup tasks: deploying Agents, enrolling resources, adding labels, configuring roles, and setting up SSO. The series includes two guides:

  • Part One: Enrolling resources
  • Part Two: Configuring RBAC

Part One of the series is based on the "Deploy Agents with Terraform" guide. This change adds instructions to the guide to label infrastructure resources so the user can access those resources with the roles configured in Part Two.

Other changes:

  • Rename agent-pool-terraform to terraform-starter.
  • Rename the "Dynamic Resources" guide to be more explicitly about Infrastructure as Code. Organize this section into subsections to make room for the new starter guide.
  • Edit the Further Reading discussion in Part One. Move the static resource discussion to Further Reading because, otherwise, there is too much explanatory text between instructions. Also mention auto-discovery.

@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-fggtisa8u-goteleport.vercel.app/docs/ver/preview

@ptgott ptgott requested a review from stevenGravy July 30, 2024 17:21
@ptgott ptgott force-pushed the paul.gottschling/2024-07-tf-rbac branch from 42593e8 to 61b7270 Compare July 30, 2024 18:16
@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@ptgott ptgott added the no-changelog Indicates that a PR does not require a changelog entry label Jul 30, 2024
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-mwdrvwpie-goteleport.vercel.app/docs/ver/preview

@ptgott ptgott force-pushed the paul.gottschling/2024-07-tf-rbac branch from 61b7270 to 7e9add5 Compare July 31, 2024 20:54
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-915b9z298-goteleport.vercel.app/docs/ver/preview

@ptgott ptgott force-pushed the paul.gottschling/2024-07-tf-rbac branch from 7e9add5 to b866fc7 Compare August 1, 2024 14:25
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 1, 2024

🤖 Vercel preview here: https://docs-kvlytfpw1-goteleport.vercel.app/docs/ver/preview

@ptgott
Copy link
Copy Markdown
Contributor Author

ptgott commented Aug 1, 2024

@mmcallister Just putting this on your radar for when you have time to take a look. Thanks!

Copy link
Copy Markdown
Contributor

@mmcallister mmcallister left a comment

Choose a reason for hiding this comment

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

Looks great!

Comment thread docs/pages/management/infrastructure-as-code/terraform-starter.mdx Outdated
@ptgott
Copy link
Copy Markdown
Contributor Author

ptgott commented Aug 5, 2024

Feedback item TODOs:

For the bottom three bullets, consider editing Part One to only explain how to enroll servers, mentioning the ability to enroll other resource kinds (and limitations for enrolling those resource kinds) in a "Further reading" section.

@ptgott ptgott force-pushed the paul.gottschling/2024-07-tf-rbac branch from 5099436 to ec58c89 Compare August 6, 2024 19:19
@ptgott ptgott force-pushed the paul.gottschling/2024-07-tf-rbac branch from cb35ffb to 30938bb Compare September 4, 2024 13:09
@ptgott ptgott enabled auto-merge September 4, 2024 13:09
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 4, 2024

🤖 Vercel preview here: https://docs-ms5r5qqln-goteleport.vercel.app/docs/ver/preview

Closes #41055

Add a learning series for users who wants to get started with managing
Teleport resources using Terraform. The guide takes the user through
some fundamental cluster setup tasks: deploying Agents, enrolling
resources, adding labels, configuring roles, and setting up SSO. The
series includes two guides:

- Part One: Enrolling resources
- Part Two: Configuring RBAC

Part One of the series is based on the "Deploy Agents with Terraform"
guide. This change adds instructions to the guide to label
infrastructure resources so the user can access those resources with the
roles configured in Part Two.

Other changes:

- Rename `agent-pool-terraform` to `terraform-starter`.
- Rename the "Dynamic Resources" guide to be more explicitly about
  Infrastructure as Code. Organize this section into subsections to make
  room for the new starter guide.
- Edit the Further Reading discussion in Part One. Move the static
  resource discussion to Further Reading because, otherwise, there is
  too much explanatory text between instructions. Also mention
  auto-discovery.
- Fix link syntax.
- Set expectations that the child modules downloaded in the two guides
  are examples.
- Remove diagram with outdated logo.
- Use purpose-oriented names for TF files instead of `main.tf`
- Use `tctl terraform env` to get credentials
Responds to hugoShaka feedback.

Resources that are not SSH servers registered via the SSH Service have
some complexities that don't make sense to cover in this guide. Instead,
for simplicity, the guide has the user deploy SSH Service instances,
then includes the possibility of enrolling other kinds of resources in a
"Next steps" section.

Changes:
- Remove the `agent_roles` input in the
  `terraform-starter/agent-installation` module.
- Only deploy a token for the Node role, and configure the Agents
  deployed by the module to only enable the SSH Service.
- Add an agent_labels input to the `agent-installation` module.
- Move non-server deployment instructions to "Next steps".
Note that you can skip the SSO step in the RBAC guide. Include links to
relevant docs.
@ptgott ptgott force-pushed the paul.gottschling/2024-07-tf-rbac branch from 30938bb to e2f89e5 Compare September 4, 2024 18:01
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 4, 2024

🤖 Vercel preview here: https://docs-p5157bcil-goteleport.vercel.app/docs/ver/preview

@ptgott ptgott force-pushed the paul.gottschling/2024-07-tf-rbac branch from e2f89e5 to a6888b2 Compare September 4, 2024 20:08
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 4, 2024

🤖 Vercel preview here: https://docs-enh8mjc2h-goteleport.vercel.app/docs/ver/preview

@ptgott ptgott added this pull request to the merge queue Sep 4, 2024
Merged via the queue into master with commit a513a50 Sep 4, 2024
@ptgott ptgott deleted the paul.gottschling/2024-07-tf-rbac branch September 4, 2024 20:31
@public-teleport-github-review-bot
Copy link
Copy Markdown

@ptgott See the table below for backport results.

Branch Result
branch/v16 Create PR

ptgott added a commit that referenced this pull request Sep 19, 2025
The Terraform starter guide, added in #44834, was meant to provide new
Teleport users with a comprehensive example of deploying agents,
configuring SSO, and managing RBAC. However, for a guide aimed at
educating a broad audience, it gets very little exposure on the docs
site. This change improves the visibility of the Terraform starter
guide.

- **Condense the two-part guide and its index page into a single
  guide:** Currently, the index page for the two-part guide has little
  substantial content and performs poorly in organic search. By
  condensing all content of the guide into a single page, we can provide
  a content-rich page that is more visible in search results.

- **Move the guide:** Make it the Getting Started page within the
  `/docs/infrastructure-as-code/terraform-provider` section. This also
  clarifies the structure of the Infrastructure as Code section, since
  all Terraform-specific content is in a single subsection. To make this
  work, rename the sidebar titles of the Terraform section and add a
  link to the guide within the section index page.

- **Minor edits to the Terraform starter guide:** Move the SSO guide
  links to the prerequisites section to avoid surprising the user with
  the need to context-switch. Remove an unneeded `tctl.mdx` partial
  inclusion. Remove prerequisite item re: following a Terraform setup
  guide, since this guide already shows the local demo method.
ptgott added a commit that referenced this pull request Sep 19, 2025
The Terraform starter guide, added in #44834, was meant to provide new
Teleport users with a comprehensive example of deploying agents,
configuring SSO, and managing RBAC. However, for a guide aimed at
educating a broad audience, it gets very little exposure on the docs
site. This change improves the visibility of the Terraform starter
guide.

- **Condense the two-part guide and its index page into a single
  guide:** Currently, the index page for the two-part guide has little
  substantial content and performs poorly in organic search. By
  condensing all content of the guide into a single page, we can provide
  a content-rich page that is more visible in search results.

- **Move the guide:** Make it the Getting Started page within the
  `/docs/infrastructure-as-code/terraform-provider` section. This also
  clarifies the structure of the Infrastructure as Code section, since
  all Terraform-specific content is in a single subsection. To make this
  work, rename the sidebar titles of the Terraform section and add a
  link to the guide within the section index page.

- **Minor edits to the Terraform starter guide:** Move the SSO guide
  links to the prerequisites section to avoid surprising the user with
  the need to context-switch. Remove an unneeded `tctl.mdx` partial
  inclusion. Remove prerequisite item re: following a Terraform setup
  guide, since this guide already shows the local demo method.
ptgott added a commit that referenced this pull request Sep 19, 2025
The Terraform starter guide, added in #44834, was meant to provide new
Teleport users with a comprehensive example of deploying agents,
configuring SSO, and managing RBAC. However, for a guide aimed at
educating a broad audience, it gets very little exposure on the docs
site. This change improves the visibility of the Terraform starter
guide.

- **Condense the two-part guide and its index page into a single
  guide:** Currently, the index page for the two-part guide has little
  substantial content and performs poorly in organic search. By
  condensing all content of the guide into a single page, we can provide
  a content-rich page that is more visible in search results.

- **Move the guide:** Make it the Getting Started page within the
  `/docs/infrastructure-as-code/terraform-provider` section. This also
  clarifies the structure of the Infrastructure as Code section, since
  all Terraform-specific content is in a single subsection. To make this
  work, rename the sidebar titles of the Terraform section and add a
  link to the guide within the section index page.

- **Minor edits to the Terraform starter guide:** Move the SSO guide
  links to the prerequisites section to avoid surprising the user with
  the need to context-switch. Remove an unneeded `tctl.mdx` partial
  inclusion. Remove prerequisite item re: following a Terraform setup
  guide, since this guide already shows the local demo method.
ptgott added a commit that referenced this pull request Sep 19, 2025
The Terraform starter guide, added in #44834, was meant to provide new
Teleport users with a comprehensive example of deploying agents,
configuring SSO, and managing RBAC. However, for a guide aimed at
educating a broad audience, it gets very little exposure on the docs
site. This change improves the visibility of the Terraform starter
guide.

- **Condense the two-part guide and its index page into a single
  guide:** Currently, the index page for the two-part guide has little
  substantial content and performs poorly in organic search. By
  condensing all content of the guide into a single page, we can provide
  a content-rich page that is more visible in search results.

- **Move the guide:** Make it the Getting Started page within the
  `/docs/infrastructure-as-code/terraform-provider` section. This also
  clarifies the structure of the Infrastructure as Code section, since
  all Terraform-specific content is in a single subsection. To make this
  work, rename the sidebar titles of the Terraform section and add a
  link to the guide within the section index page.

- **Minor edits to the Terraform starter guide:** Move the SSO guide
  links to the prerequisites section to avoid surprising the user with
  the need to context-switch. Remove an unneeded `tctl.mdx` partial
  inclusion. Remove prerequisite item re: following a Terraform setup
  guide, since this guide already shows the local demo method.
ptgott added a commit that referenced this pull request Sep 19, 2025
The Terraform starter guide, added in #44834, was meant to provide new
Teleport users with a comprehensive example of deploying agents,
configuring SSO, and managing RBAC. However, for a guide aimed at
educating a broad audience, it gets very little exposure on the docs
site. This change improves the visibility of the Terraform starter
guide.

- **Condense the two-part guide and its index page into a single
  guide:** Currently, the index page for the two-part guide has little
  substantial content and performs poorly in organic search. By
  condensing all content of the guide into a single page, we can provide
  a content-rich page that is more visible in search results.

- **Move the guide:** Make it the Getting Started page within the
  `/docs/infrastructure-as-code/terraform-provider` section. This also
  clarifies the structure of the Infrastructure as Code section, since
  all Terraform-specific content is in a single subsection. To make this
  work, rename the sidebar titles of the Terraform section and add a
  link to the guide within the section index page.

- **Minor edits to the Terraform starter guide:** Move the SSO guide
  links to the prerequisites section to avoid surprising the user with
  the need to context-switch. Remove an unneeded `tctl.mdx` partial
  inclusion. Remove prerequisite item re: following a Terraform setup
  guide, since this guide already shows the local demo method.
ptgott added a commit that referenced this pull request Sep 19, 2025
The Terraform starter guide, added in #44834, was meant to provide new
Teleport users with a comprehensive example of deploying agents,
configuring SSO, and managing RBAC. However, for a guide aimed at
educating a broad audience, it gets very little exposure on the docs
site. This change improves the visibility of the Terraform starter
guide.

- **Condense the two-part guide and its index page into a single
  guide:** Currently, the index page for the two-part guide has little
  substantial content and performs poorly in organic search. By
  condensing all content of the guide into a single page, we can provide
  a content-rich page that is more visible in search results.

- **Move the guide:** Make it the Getting Started page within the
  `/docs/infrastructure-as-code/terraform-provider` section. This also
  clarifies the structure of the Infrastructure as Code section, since
  all Terraform-specific content is in a single subsection. To make this
  work, rename the sidebar titles of the Terraform section and add a
  link to the guide within the section index page.

- **Minor edits to the Terraform starter guide:** Move the SSO guide
  links to the prerequisites section to avoid surprising the user with
  the need to context-switch. Remove an unneeded `tctl.mdx` partial
  inclusion. Remove prerequisite item re: following a Terraform setup
  guide, since this guide already shows the local demo method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation no-changelog Indicates that a PR does not require a changelog entry size/lg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add production examples of using the Teleport Terraform provider

5 participants