Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: Use "terraform state pull" instead of "terraform show" #1262

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

Merged
merged 1 commit into from
May 2, 2022

Conversation

kylecarbs
Copy link
Member

Although the terraform-exec docs don't indicate this, the result of
"terraform show" isn't actually the state... it's a trimmed version
of the state that excludes resource identifiers, essentially removing
all state that did exist.

Tests will be written to ensure Terraform state reconciliation can occur.
This will happen in another PR, as dogfood is currently broken because of this.

@kylecarbs kylecarbs requested a review from coadler May 2, 2022 19:04
@kylecarbs kylecarbs self-assigned this May 2, 2022
@kylecarbs kylecarbs enabled auto-merge (squash) May 2, 2022 19:06
@codecov
Copy link

codecov bot commented May 2, 2022

Codecov Report

Merging #1262 (b2ad1eb) into main (dacc025) will decrease coverage by 8.65%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##             main    #1262      +/-   ##
==========================================
- Coverage   66.09%   57.44%   -8.66%     
==========================================
  Files         275      275              
  Lines       17952    18034      +82     
  Branches      216      216              
==========================================
- Hits        11866    10360    -1506     
- Misses       4851     6541    +1690     
+ Partials     1235     1133     -102     
Flag Coverage Δ
unittest-go-macos-latest 53.17% <0.00%> (-0.19%) ⬇️
unittest-go-postgres- ?
unittest-go-ubuntu-latest 55.68% <57.14%> (-0.16%) ⬇️
unittest-go-windows-2022 51.42% <0.00%> (-0.19%) ⬇️
unittest-js 70.69% <ø> (ø)
Impacted Files Coverage Δ
provisioner/terraform/provision.go 71.89% <57.14%> (+0.01%) ⬆️
coderd/database/queries.sql.go 0.00% <0.00%> (-81.15%) ⬇️
coderd/devtunnel/tunnel.go 0.00% <0.00%> (-79.67%) ⬇️
coderd/database/pubsub.go 0.00% <0.00%> (-77.78%) ⬇️
coderd/database/db.go 0.00% <0.00%> (-55.18%) ⬇️
coderd/database/migrate.go 0.00% <0.00%> (-45.00%) ⬇️
cli/cliui/agent.go 77.19% <0.00%> (-5.27%) ⬇️
coderd/coderdtest/coderdtest.go 93.83% <0.00%> (-5.05%) ⬇️
provisioner/echo/serve.go 54.40% <0.00%> (-4.81%) ⬇️
cli/server.go 54.94% <0.00%> (-3.85%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dacc025...b2ad1eb. Read the comment docs.

Although the terraform-exec docs don't indicate this, the result of
"terraform show" isn't actually the state... it's a trimmed version
of the state that excludes resource identifiers, essentially removing
all state that did exist.

Tests will be written to ensure Terraform state reconciliation can occur.
This will happen in another PR, as dogfood is currently broken because of this.
@kylecarbs kylecarbs merged commit 43c6bff into main May 2, 2022
@kylecarbs kylecarbs deleted the fixstate branch May 2, 2022 20:02
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
kylecarbs added a commit that referenced this pull request Jun 10, 2022
Although the terraform-exec docs don't indicate this, the result of
"terraform show" isn't actually the state... it's a trimmed version
of the state that excludes resource identifiers, essentially removing
all state that did exist.

Tests will be written to ensure Terraform state reconciliation can occur.
This will happen in another PR, as dogfood is currently broken because of this.
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.

3 participants