Release 0.3.34: Azure policy example fix + start_datecode fix + Go/grpc security bumps - #147
Merged
bshutterkion merged 10 commits intoApr 16, 2026
Merged
Conversation
The example in examples/resources/kion_azure_policy/resource.tf produced
a 400 from Azure when customers copied it:
The Azure Policy Definition is invalid. Reason: ... 'Could not find
member 'if' on object of type 'PolicyDefinitionProperties''.
The provider sends the `policy` attribute directly as the `properties`
body of the Azure Policy Definition API, so the rule MUST be nested
inside a `policyRule` object. Top-level `if`/`then` in the example was
wrong. Also the example was misusing the top-level Terraform
`parameters` attribute by re-declaring the parameter schema there
instead of using the runtime `{ paramName: { value: ... } }` form.
- Wrap rule in `policyRule` and add `displayName`/`mode` in all four examples
- Move parameter schemas inside the policy JSON's own `parameters` block
- Use runtime value format in the top-level Terraform `parameters` attribute
- Add header comment explaining the distinction
- Sync generated docs/resources/azure_policy.md
- Bump version to 0.3.34-dev
Replace GetOk() with GetRawConfig() in CustomizeDiff validation for kion_custom_account. GetOk() returns false for unknown/computed values during the plan phase, causing validation to incorrectly reject computed references like formatdate(). Bump version to 0.3.34.
egramens
approved these changes
Apr 16, 2026
v1.58 was released before Go 1.25 and its embedded go/types importer
rejected the Go 1.25.9 export-data format ("unsupported version: 2"),
failing the lint job on this PR.
v1.64.8 is the last v1.x release; staying on v1 avoids the config
migration needed for v2.x. Verified locally with `golangci-lint config
verify` (clean) and a full `golangci-lint run` (clean). This also drops
the `errcheck.ignore is deprecated` warning that v1.58 emitted
spuriously against a config that doesn't use that field.
The prebuilt v1.64.8 binary on the golangci-lint releases page is compiled with Go 1.24, and golangci-lint refuses to lint code whose target language version (go 1.25 in our go.mod) exceeds the Go version it was built with. Switching the action to install-mode: goinstall causes it to `go install` golangci-lint using the workflow's Go toolchain (1.25.9 per release.yml / golangci-lint.yml), producing a binary that can handle the Go 1.25 target.
v2 merged the stylecheck (ST*) and gosimple (S*) linters into
staticcheck, so upgrading from v1 exposes ST1003 warnings that were
latent because this repo never enabled the stylecheck linter in v1.
Addressing them preserves a clean lint run rather than papering over
the family with an -ST* exclusion.
- Migrated .golangci.yml to v2 format via `golangci-lint migrate`
(linters.default, linters.settings, formatters block, exclusions)
- Renamed identifiers per Go style (ID / URL / JSON initialisms):
- Exported: PackCvValueIntoJsonStr, UnpackCvValueJsonStr,
OrgUnitId, AppRoleId (all internal-package, JSON tags preserved)
- Underscored: dataSourceService_control_policyRead
- Local vars / func params: projectId, accountId, accountCacheId,
accountTypeId, accountUrl, oldId, newId, oldProjectId, newProjectId
across resource_account.go, resource_aws_account.go,
resource_azure_account.go, resource_custom_account.go,
resource_gcp_account.go
- Simplified redundant type declaration in provider_test.go (QF1011)
No wire-format impact: renamed struct fields retained their existing
`json:"..."` tags.
GitHub Actions flagged actions/checkout@v4, actions/setup-go@v5, and golangci/golangci-lint-action@v6 as running on Node 20, which will be forced to Node 24 starting 2026-06-02 and removed 2026-09-16. - actions/checkout v4 -> v6 - actions/setup-go v5 -> v6 - golangci/golangci-lint-action v6 -> v9 golangci-lint-action v7+ only supports golangci-lint v2, which is why the preceding commit migrated the config. Pinning to golangci-lint v2.11.4 (latest). `install-mode: goinstall` and `--out-format=github-actions` are no longer needed: v2 binaries are built with a recent Go toolchain, and the v9 action handles GitHub annotations natively.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bundles four fixes for release
0.3.34:kion_azure_policyexample was broken. A customer copiedexamples/resources/kion_azure_policy/resource.tfand hit:Root cause: the provider forwards the
policyattribute as thepropertiesbody of Azure's Policy Definition API, so the rule MUST be wrapped inpolicyRule. The example used top-levelif/then. The top-level Terraformparametersattribute was also misused — re-declaring the parameter schema instead of using the runtime{ "paramName": { "value": ... } }form.Fix:
policyRuleand includedisplayName/mode.parametersblock.parametersattribute uses the runtime value format.docs/resources/azure_policy.mdsynced.kion_custom_accountstart_datecodevalidation — cherry-picked from Fix start_datecode validation failing for computed values (#143) #145 (now closed). ReplacesGetOk()withGetRawConfig()inCustomizeDiffso computed values (e.g.formatdate()) aren't incorrectly rejected. Closes Custom accountstart_datecodevalidation fails when using a computed value #143.Security: grpc-go bump — cherry-picked from fix: update Go and grpc to address security findings #146 (now closed, thanks @enel1221). Bumps
google.golang.org/grpcfrom v1.61.1 to v1.79.3 to address GHSA-p77j-4mvh-x3m3 / CVE-2026-33186.Security: Go toolchain bump — cherry-picked from fix: update Go and grpc to address security findings #146 (thanks @enel1221). Bumps Go release line from 1.22 to 1.25 with
toolchain go1.25.9to address Go stdlib CVE-2025-68121. CI workflows (release.yml,golangci-lint.yml) pinned to go1.25.9.Version bumped to
0.3.34(final release version).Test plan
go build ./...cleango test ./...greenmake installbuilds the combined binary at~/.terraform.d/plugins/github.com/kionsoftware/kion/0.3.34/<os_arch>/kion_azure_policyexample against their sandbox (applies without the 400)kion_custom_accountwithstart_datecode = formatdate(...)plans and applies