Skip to content

Remove read operation on entity alias update - #1434

Merged
benashz merged 1 commit into
mainfrom
VAULT-6068/fix-entity-creation-failure
May 17, 2022
Merged

benashz merged 1 commit into
mainfrom
VAULT-6068/fix-entity-creation-failure

Conversation

@benashz

@benashz benashz commented May 4, 2022

Copy link
Copy Markdown
Collaborator

The identityEntityAliasUpdate function was performing a read operation
when it should not have been. The read operation should be constrained
to the defined ReadContext.

  • add new GetAPIRequestData() function that generalizes the translation
    of schema.ResourceData values to their Vault request data equivalents.

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

Relates OR Closes #0000

Release note for CHANGELOG:


Output from acceptance testing:

 $ time make testacc TESTARGS='-v -test.run TestAccIdentityEntityAlias*'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -v -v -test.run TestAccIdentityEntityAlias* -timeout 30m ./...

ok      github.com/hashicorp/terraform-provider-vault/util      (cached) [no tests to run]
=== RUN   TestAccIdentityEntityAlias
--- PASS: TestAccIdentityEntityAlias (3.14s)
=== RUN   TestAccIdentityEntityAliasDuplicateFlow
--- PASS: TestAccIdentityEntityAliasDuplicateFlow (7.48s)
=== RUN   TestAccIdentityEntityAlias_Update
--- PASS: TestAccIdentityEntityAlias_Update (3.09s)
=== RUN   TestAccIdentityEntityAlias_Metadata
--- PASS: TestAccIdentityEntityAlias_Metadata (3.07s)
PASS
ok      github.com/hashicorp/terraform-provider-vault/vault     19.717s
make testacc TESTARGS='-v -test.run TestAccIdentityEntityAlias*'  42.40s user 18.94s system 229% cpu 26.747 total


...

@benashz
benashz requested a review from vinay-gopalan May 4, 2022 20:30
@github-actions github-actions Bot added the size/L label May 4, 2022
@benashz benashz added this to the 3.6.0 milestone May 4, 2022
The identityEntityAliasUpdate function was performing a read operation
when it should not have been. The read operation should be constrained
to the defined ReadContext.

- add new GetAPIRequestData() function that generalizes the translation
  of schema.ResourceData values to their Vault request data equivalents.
@benashz
benashz force-pushed the VAULT-6068/fix-entity-creation-failure branch from aac7f29 to f19ae99 Compare May 10, 2022 21:20

@vinay-gopalan vinay-gopalan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great!

@benashz
benashz merged commit 6d08452 into main May 17, 2022
@benashz
benashz deleted the VAULT-6068/fix-entity-creation-failure branch May 17, 2022 13:35
marcboudreau pushed a commit to marcboudreau/terraform-provider-vault that referenced this pull request Nov 6, 2022
The identityEntityAliasUpdate function was performing a read operation
when it should not have been. The read operation should be constrained
to the defined ReadContext.

- add new GetAPIRequestData() function that generalizes the translation
  of schema.ResourceData values to their Vault request data equivalents.
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.

2 participants