You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MAINT]: Add a CI workflow that runs terraform configuration validation on a generic config to ensure no regressions happen #2856
In light of both #2843 and #2855 and the v6.7.x releases we need a way to continually validate that fundamental things such as secret destroy on drift workflows and other fundamental mechanisms of how the provider initializes don't regress.
ex.
# Build validation
- name: Build Provider
run: |
go build -o terraform-provider-github
# Terraform validation with actual binary
- name: Terraform Init and Validate
run: |
# Create test configuration
cat > test.tf << 'EOF'
terraform {
required_providers {
github = {
source = "integrations/github"
}
}
}
provider "github" {
token = "fake_token_for_validation"
}
# Test both resources with different configurations
resource "github_actions_secret" "test" {
repository = "test_repo"
secret_name = "test_secret"
plaintext_value = "test_value"
destroy_on_drift = true
}
resource "github_actions_organization_secret" "test" {
secret_name = "org_secret"
encrypted_value = "dGVzdA=="
visibility = "private"
destroy_on_drift = false
}
EOF
# Setup dev overrides
mkdir -p ~/.terraformrc
cat > ~/.terraformrc << 'EOF'
provider_installation {
dev_overrides {
"integrations/github" = "$(pwd)"
}
direct {}
}
EOF
# Test with terraform (this should NOT fail with SDK validation errors)
terraform init || echo "Init failed - expected for dev overrides"
terraform validate
# Clean up
rm -f test.tf ~/.terraformrc terraform-provider-github
it is probably is enough to detect issue from #2903
When i switch to the tag v6.8.2 and build and validate provider with test suite for secrets it fails, but build from current main passes the validation.
Im not sure how it could happen to get this tag, but if we do validation before new release happens it should catch the issues in exactly commit which is tagged.
Activity
ViacheslavKudinov commentedon Nov 1, 2025
Hi @nickfloyd
Do you mean something like https://github.com/vk-or/terraform-provider-github/pull/16/files ?
Result of run https://github.com/vk-or/terraform-provider-github/actions/runs/19000886267 (just 2 copies of the same stack to test dynamic generation of matrix when we extend tests)
Just POC, can be tuned according to the needs.
Please, let me know if it is what is needed i will create PR.
PS Im new to Go and Terraform provider SDK. Started to learn as hope can contribute to it.
ViacheslavKudinov commentedon Nov 12, 2025
Hi,
i've created PR #2887 to address it
ViacheslavKudinov commentedon Nov 15, 2025
Hi @nickfloyd
i suggest we run some validation on release workflow as well. As pre-job before release happens.
It can be just definition of provider, without extra resources to not run unecessery tests.
E.g:
it is probably is enough to detect issue from #2903
When i switch to the tag v6.8.2 and build and validate provider with test suite for secrets it fails, but build from current main passes the validation.
Im not sure how it could happen to get this tag, but if we do validation before new release happens it should catch the issues in exactly commit which is tagged.
ViacheslavKudinov commentedon Nov 15, 2025
I've created PR #2904