Skip to content

Conversation

@pavlov-tony
Copy link

Description

Customer reported an error on distribution creation with non specified optional blocked_countries property.

relates to STACKITCDN-1014

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)

@pavlov-tony pavlov-tony requested a review from a team as a code owner January 30, 2026 11:26
"custom_domain_prefix": uuid.NewString(), // we use a different domain prefix each test run due to inconsistent upstream release of domains, which might impair consecutive test runs
"dns_name": fmt.Sprintf("tf-acc-%s.stackit.gg", strings.Split(uuid.NewString(), "-")[0]),
// 1. Define the Configuration Struct
type distributionConfig struct {
Copy link
Member

Choose a reason for hiding this comment

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

Why are these changes here needed? Is it needed for the bugfix or just some refactoring?

In case it's just some refactoring and not explicitly needed, I would ask you to please split it into another PR.

And one note about acc tests: We try to use the following schema for our acc tests with embedding some *.tf files. So the Terraform config is not part of the Golang test code. I would like to ask you to stick to that format to keep everything consistent across the codebase. 😅

As you can see usually we have one Min test with a minimal config and one Max test for the full-blown config for each resource.

//go:embed testdata/resource-min.tf
var resourceMin string
//go:embed testdata/resource-max.tf
var resourceMax string

variable "project_id" {}
variable "name" {}
resource "stackit_git" "git" {
project_id = var.project_id
name = var.name
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants