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

update parsing for terraform v0.14 #3

Merged
merged 1 commit into from
Jan 21, 2021
Merged

Conversation

xinluh
Copy link
Contributor

@xinluh xinluh commented Jan 15, 2021

Prior version of terraform plan output something like

<...>
some_resource: Refreshing state... [id=some_resource]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place
  - destroy
<...>
------------------------------------------------------------------------

But latest terraform no longer output the first ------ line:

<...>
some_resource: Refreshing state... [id=some_resource]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place
  - destroy
<...>
------------------------------------------------------------------------

So the parsing strips all the actual diff.

This PR fixes the parsing by stripping out the lines containing Refreshing state... instead of looking for content between the ---- lines.

Prior version of `terraform plan` output something like 

```
<...>
some_resource: Refreshing state... [id=some_resource]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place
  - destroy
<...>
------------------------------------------------------------------------
```

But latest terraform no longer output the first `------` line:
```
<...>
some_resource: Refreshing state... [id=some_resource]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place
  - destroy
<...>
------------------------------------------------------------------------
```

So the parsing strips all the actual diff.

This PR fixes the parsing by stripping out the lines containing `Refreshing state...` instead of looking for content between the `----` lines.
@robburger
Copy link
Owner

Thanks @xinluh 🙌
I'll merge this in to the base branch now. I have a few other changes I'd like to get in before moving the v1 tag on the action, but it should be in the next few days!

@robburger robburger merged commit 900d61a into robburger:master Jan 21, 2021
@xinluh xinluh deleted the patch-1 branch February 16, 2021 02:09
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.

2 participants