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

Workspaces with no resources run terraform apply on every reconcile #71

Closed
bobh66 opened this issue Jul 7, 2022 · 0 comments · Fixed by #72
Closed

Workspaces with no resources run terraform apply on every reconcile #71

bobh66 opened this issue Jul 7, 2022 · 0 comments · Fixed by #72
Assignees
Labels
bug Something isn't working

Comments

@bobh66
Copy link
Collaborator

bobh66 commented Jul 7, 2022

What happened?

If a Workspace has no resources, only outputs for example, the current Observe logic returns ResourceExists: false every reconcile because there are 0 resources returned from terraform state list.

If the Workspace has outputs and terraform plan has returned no delta then the ResourceExists attribute can be set to true

How can we reproduce it?

Create a Workspace that has no resources, only outputs, and observe in the debug logs that the Workspace is constantly calling the Update/Create method on every loop

What environment did it happen in?

Crossplane version: 1.8.1

@bobh66 bobh66 added the bug Something isn't working label Jul 7, 2022
@bobh66 bobh66 self-assigned this Jul 7, 2022
bobh66 added a commit to bobh66/provider-terraform that referenced this issue Jul 7, 2022
Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
@bobh66 bobh66 closed this as completed in #72 Jul 7, 2022
bobh66 added a commit that referenced this issue Jul 7, 2022
Include outputs in test for ResourceExists  (#71)
bobh66 added a commit to bobh66/provider-terraform that referenced this issue Jul 10, 2022
Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant