hashicorp / terraform-provider-vault

Terraform Vault provider
https://www.terraform.io/docs/providers/vault/
Mozilla Public License 2.0
458 stars 540 forks source link

Fix creation of `vault_pki_secret_backend_root_sign_intermediate` resource with zero path length #2253

Open vaerh opened 4 months ago

vaerh commented 4 months ago

Description

When filling the data map, values are incorrectly evaluated using the GetOk function, so zero integer values are discarded. For this reason it is not possible to set the max_path_length = 0 restriction for a certificate.

Checklist

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestPkiSecretBackendRootSignIntermediate*'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -run=TestPkiSecretBackendRootSignIntermediate* -timeout 30m ./...
?       github.com/hashicorp/terraform-provider-vault   [no test files]
?       github.com/hashicorp/terraform-provider-vault/cmd/coverage      [no test files]
?       github.com/hashicorp/terraform-provider-vault/cmd/generate      [no test files]
?       github.com/hashicorp/terraform-provider-vault/helper    [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/consts   [no test files]
ok      github.com/hashicorp/terraform-provider-vault/codegen   (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/internal/identity/entity  (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/mfa     [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/group   [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/pki      [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/sync     [no test files]
?       github.com/hashicorp/terraform-provider-vault/schema    [no test files]
ok      github.com/hashicorp/terraform-provider-vault/internal/provider (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/util/mountutil    [no test files]
ok      github.com/hashicorp/terraform-provider-vault/testutil  (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/util      (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/vault     48.623s
...

Community Note

hashicorp-cla-app[bot] commented 4 months ago

CLA assistant check
All committers have signed the CLA.

hashicorp-cla-app[bot] commented 4 months ago

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

rismalrv commented 3 months ago

+1

rismalrv commented 3 months ago

sorry to bother, any timeline it get merge?