Addresses losing externally managed policies on Vault Identity Group resources. Mirrored changes made in 1950 but for Identity Groups.
Like in 1950, I put tests in the vault_identity_group_policies resource as that seemed like the most appropriate place.
Note: I am using Windows for development and changed line returns from CRLF to LF. The make fmt reformatted all Go files in my local clone so I'm guessing line returns were automatically updated to CRLF when I cloned the repo. If this needs to be adjusted, please do so.
Release note for CHANGELOG:
Fix vault_identity_group loses externally managed policies on updates when external_policies = true
Closes #1956
Checklist
[x] Added CHANGELOG entry (only for user-facing changes)
[ ] Acceptance tests where run against all supported Vault Versions
Output from acceptance testing:
$ make testacc TESTARGS='-test.run TestAccIdentityGroup'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -test.run TestAccIdentityGroup -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]
ok github.com/hashicorp/terraform-provider-vault/codegen (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]
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/schema [no test files]
? github.com/hashicorp/terraform-provider-vault/internal/pki [no test files]
ok github.com/hashicorp/terraform-provider-vault/internal/provider (cached) [no tests to run]
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 128.122s
...
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
Description
Addresses losing externally managed policies on Vault Identity Group resources. Mirrored changes made in 1950 but for Identity Groups.
Like in 1950, I put tests in the
vault_identity_group_policies
resource as that seemed like the most appropriate place.Note: I am using Windows for development and changed line returns from
CRLF
toLF
. Themake fmt
reformatted all Go files in my local clone so I'm guessing line returns were automatically updated toCRLF
when I cloned the repo. If this needs to be adjusted, please do so.Release note for CHANGELOG: Fix
vault_identity_group
loses externally managed policies on updates whenexternal_policies = true
Closes #1956
Checklist
Output from acceptance testing:
Community Note