File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Terraform Landscape Change Log
22
3+ ## 0.1.17
4+
5+ * Fix handling of dashed line separators after state refresh output
6+
37## 0.1.16
48
59* Fix handling of initialization messages output by ` terraform init `
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ def process_string(plan_output)
4343 # as these break the parser which thinks "-" is a resource deletion
4444 scrubbed_output . gsub! ( /^- .*\. \. \. $/ , '' )
4545
46+ # Remove separation lines that appear after refreshing state
47+ scrubbed_output . gsub! ( /^-+$/ , '' )
48+
4649 # Remove preface
4750 if ( match = scrubbed_output . match ( /^Path:[^\n ]+/ ) )
4851 scrubbed_output = scrubbed_output [ match . end ( 0 ) ..-1 ]
Original file line number Diff line number Diff line change 22
33# Defines the gem version.
44module TerraformLandscape
5- VERSION = '0.1.16 ' . freeze
5+ VERSION = '0.1.17 ' . freeze
66end
Original file line number Diff line number Diff line change 177177 No changes
178178 OUT
179179 end
180+
181+ context 'when output contains a separator after refreshing state' do
182+ let ( :terraform_output ) { normalize_indent ( <<-TXT ) }
183+ Refreshing Terraform state in-memory prior to plan...
184+ The refreshed state will be used to calculate this plan, but will not be
185+ persisted to local or remote state storage.
186+
187+ aws_vpc.poc: Refreshing state... (ID: ##vpc-xxxxxxxxxxxxx)
188+ data.aws_iam_policy_document.flowlogs: Refreshing state...
189+ data.aws_iam_policy_document.rds_assume_policy: Refreshing state...
190+ data.aws_iam_policy_document.flowlogs_assume_role_policy: Refreshing state...
191+ aws_iam_role.rds: Refreshing state... (ID: xxxxxxxxxxxxxxxxxRole)
192+ aws_iam_role.flowlogs: Refreshing state... (ID: xxxxxxxxxxxxxxRole)
193+ aws_iam_role_policy.flowlogs: Refreshing state... (ID: xxxxxxxxxxxxxCreatePolicy)
194+ aws_iam_role_policy_attachment.rds: Refreshing state... (ID: xxxxxxxxxxxxxxRole-20171030050803915500000001)
195+
196+ ------------------------------------------------------------------------
197+
198+ No changes. Infrastructure is up-to-date.
199+
200+ This means that Terraform did not detect any differences between your
201+ configuration and real physical resources that exist. As a result, no
202+ actions need to be performed.
203+ TXT
204+
205+ it { should == normalize_indent ( <<-OUT ) }
206+ No changes
207+ OUT
208+ end
180209 end
181210end
You can’t perform that action at this time.
0 commit comments