vultr / terraform-provider-vultr

Terraform Vultr provider
https://www.terraform.io/docs/providers/vultr/
Mozilla Public License 2.0
190 stars 65 forks source link

Remove deprecated SDK meta version function usage #432

Closed optik-aper closed 8 months ago

optik-aper commented 8 months ago

Description

Resolve the deprecation lint error:

Golangci-Lint: vultr/config.go#L32
SA1019: meta.SDKVersionString is deprecated: Use Go standard library [runtime/debug] package build information instead. (staticcheck)

These changes will lookup the module by the path, then set the User-Agent string to Terraform/ plus whatever is returned from the module. For example:

User-Agent=Terraform/v2.30.0

If for some reason it cannot determine the version number, it will default to v0.0.0 for the sake of consistency

Checklist:

Testing

Set the debug output, run a command and check the value passed in the output file.

export TF_LOG_PATH=...
export TF_LOG=debug
terraform apply