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 OAuth Token ID updates not registering #1631

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hashimoon
Copy link
Contributor

@hashimoon hashimoon commented Mar 4, 2025

Description

Previously, terraform apply was required to run twice before the oauth_token_id would be persisted in the state file even though the oauth_token_id was updated as expected on the server after the first run of terraform apply. With this change, only a single run of terraform apply is necessary to persist the changes for the oauth_token_id to the state file.

Remember to:

Testing plan

  1. Create a resource with an oauth_token_id.
  2. Perform terraform plan and verify no changes are required.
  3. Update the value of oauth_token_id.
  4. Perform terraform plan and verify that changes to the vcs_repo.oauth_token_id are necessary
  5. Perform terraform apply.
  6. Perform terraform plan and verify no changes are required.

External links

Output from acceptance tests

Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.

If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.

$ TESTARGS="-run TestAccTFEWorkspace" make testacc

...

… `terraform apply`

This resolves the issue where when updating the `oauth_token_id`, `terraform apply` would have to be performed twice before to confirm the change in the state file. The first apply would perform the change on the server but would not register the change in the state file as expected.
@hashimoon hashimoon force-pushed the hashimoon/fix-oauth-token branch from b63f5a1 to 641c595 Compare March 4, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant