Skip to content

Conversation

ChristianHamm
Copy link
Contributor

Description

Update and rework the CDN usage example documentation.

Jira: STACKITCDN-1003

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

Comment on lines 11 to 20
---

## Prerequisites

Before you begin, make sure you have the following:

* A **STACKIT project** and a user account with the necessary permissions for the CDN.
* **Terraform** installed on your local machine.
* The STACKIT provider for Terraform configured. You can find more information on how to do this in the
official [STACKIT provider documentation](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the prerequisites part isn't really needed, because it will be directly in the our terraform docs and will replace this.
When this would be an guide on a different website, it would definitely make sense to add this, but because this is directly in our own docs on the terraform registry, I think that at least second and third point isn't really needed.

Probably the most important point is, that the user needs to have an account with the necessary permissions. This information can remain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed with next commit.

required_providers {
stackit = {
source = "stackitcloud/stackit"
version = ">= 0.66.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid using a version here. Because then we would need to change it regularly to keep it up to date

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed with next commit.

# Read more about getting tokens here:
# https://docs.stackit.cloud/stackit/en/acquire-a-bearer-token-with-service-account-keys-175112464.html
default_region = "eu01"
service_account_token = var.service_account_token
Copy link
Contributor

Choose a reason for hiding this comment

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

The recommended way it to authenticate with a service account key. The authentication with a token is deprecated https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs#authentication.

The authentication part can be removed, to stay more consistent with the existing docs and this is more a generic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed with next commit.

Comment on lines +142 to +145
## Complete Terraform Configuration

Here is the complete `main.tf` file, which follows the logical order of operations.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like that you added here the complete terraform config. This makes it easier for our users, to just copy paste it and adjust a few fields 👍🏼

- Changed usage of an SA token to SA key file
- Removed some obvious prerequisites and added info about obtaining an SA key file
@ChristianHamm
Copy link
Contributor Author

@marceljk I've just addressed your points above. Feel free to take another look now 🙂

@ChristianHamm ChristianHamm requested a review from marceljk October 2, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants