Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: description updates for aws_secret_backend are ignored #2057

Merged

Conversation

jgrumboe
Copy link
Contributor

@jgrumboe jgrumboe commented Oct 17, 2023

Description

This PR fixes the vault_aws_secret_backend that updates of description are written to Vault.

Closes #1982

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Acceptance tests where run against all supported Vault Versions

Output from acceptance testing:

❯ make testacc TESTARGS='-run=AWSSecretBackend -v'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -run=AWSSecretBackend -v -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/generated [no test files]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/codegen   (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode    (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode    (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet    (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role        (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template    (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/helper    [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/consts   [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/group   [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/mfa     [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/pki      [no test files]
?       github.com/hashicorp/terraform-provider-vault/schema    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation      (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/internal/identity/entity  (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/internal/provider (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/testutil  (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vault/util      (cached) [no tests to run]
2023/10/18 00:05:32 [INFO] Using Vault token with the following policies: root
=== RUN   TestAccAWSSecretBackendRole_basic
--- PASS: TestAccAWSSecretBackendRole_basic (5.62s)
=== RUN   TestAccAWSSecretBackendRole_import
--- PASS: TestAccAWSSecretBackendRole_import (4.98s)
=== RUN   TestAccAWSSecretBackendRole_nested
--- PASS: TestAccAWSSecretBackendRole_nested (3.82s)
=== RUN   TestAccAWSSecretBackendStaticRole
    resource_aws_secret_backend_static_role_test.go:21: "AWS_STATIC_USER" must be set
--- SKIP: TestAccAWSSecretBackendStaticRole (0.00s)
=== RUN   TestAccAWSSecretBackend_basic
--- PASS: TestAccAWSSecretBackend_basic (5.23s)
=== RUN   TestAccAWSSecretBackend_usernameTempl
--- PASS: TestAccAWSSecretBackend_usernameTempl (2.35s)
=== RUN   TestAccAWSSecretBackend_remount
--- PASS: TestAccAWSSecretBackend_remount (4.80s)
PASS
ok      github.com/hashicorp/terraform-provider-vault/vault     27.448s

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

@jgrumboe
Copy link
Contributor Author

jgrumboe commented Oct 17, 2023

It would be nice to get the hacktoberfest-accepted label on this PR, if it's ok. Thanks @fairclothjm

@jgrumboe
Copy link
Contributor Author

@fairclothjm I just found out that vault_jwt_auth_backend is also failing to update description, maybe others too.
Should I include it in this PR or open a new one?

@fairclothjm
Copy link
Contributor

@jgrumboe I haven't had a chance to look at this closely. But if you do open a PR for jwt auth please do so in a separate PR. I recall the the handling of description is not consistent across different backend resources. I think this has to do with the description needing to be a part of the tune configuration in vault but not all resources make use of tune. Again, I haven't looked closely at this but that is what I recall.

@jgrumboe
Copy link
Contributor Author

I will open a separate PR for other description issues.

@jgrumboe
Copy link
Contributor Author

jgrumboe commented Nov 7, 2023

Can this PR be merged?

@jgrumboe
Copy link
Contributor Author

jgrumboe commented Dec 6, 2023

Is anything missing for merging?

Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @jgrumboe !

@fairclothjm fairclothjm added this to the 3.24.0 milestone Jan 10, 2024
@fairclothjm fairclothjm merged commit 51618d0 into hashicorp:main Jan 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vault provider does not update description of previously created AWS secrets engine mount
2 participants