Skip to content

Commit da8a8b1

Browse files
committed
review feedback
1 parent 91f4995 commit da8a8b1

35 files changed

+145
-106
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ require (
4343
github.com/xanzy/go-gitlab v0.77.0
4444
go.etcd.io/bbolt v1.3.6
4545
go.uber.org/zap v1.24.0
46+
golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15
4647
golang.org/x/term v0.3.0
4748
golang.org/x/text v0.5.0
4849
gopkg.in/yaml.v2 v2.4.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
502502
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
503503
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
504504
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
505+
golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15 h1:5oN1Pz/eDhCpbMbLstvIPa0b/BEQo6g6nwV3pLjfM6w=
506+
golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
505507
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
506508
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
507509
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=

runatlantis.io/docs/using-atlantis.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ If a flag is needed to be always appended, see [Custom Workflow Use Cases](custo
170170
---
171171
## atlantis state rm
172172
```bash
173-
atlantis state [options] rm ADDRESS... -- [terraform import flags]
173+
atlantis state [options] rm ADDRESS... -- [terraform state rm flags]
174174
```
175175
### Explanation
176176
Runs `terraform state rm` that matches the directory/project/workspace.
177-
This command discards the terraform plan result. After an import and before an apply, another `atlantis plan` must be run again.
177+
This command discards the terraform plan result. After run state rm and before an apply, another `atlantis plan` must be run again.
178178

179179
### Examples
180180
```bash
@@ -192,7 +192,7 @@ atlantis state -w staging rm ADDRESS
192192
```
193193

194194
::: tip
195-
* If import for_each resources, it requires a single quoted address.
195+
* If run state rm to for_each resources, it requires a single quoted address.
196196
* ex. `atlantis state rm 'aws_instance.example["foo"]'`
197197
:::
198198

server/controllers/events/events_controller_e2e_test.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -494,12 +494,10 @@ func TestGitHubWorkflow(t *testing.T) {
494494
ModifiedFiles: []string{"dir1/main.tf", "dir2/main.tf"},
495495
ExpAutoplan: true,
496496
Comments: []string{
497-
"atlantis import -d dir1 random_id.dummy1 AA",
498-
"atlantis import -d dir2 random_id.dummy2 BB",
497+
"atlantis import -d dir1 random_id.dummy AA",
498+
"atlantis import -d dir2 random_id.dummy BB",
499499
"atlantis plan",
500-
"atlantis state rm random_id.dummy1 AA",
501-
"atlantis state rm -d dir1 random_id.dummy1",
502-
"atlantis state -d dir2 rm random_id.dummy2",
500+
"atlantis state rm random_id.dummy",
503501
"atlantis plan",
504502
},
505503
ExpReplies: [][]string{
@@ -508,8 +506,6 @@ func TestGitHubWorkflow(t *testing.T) {
508506
{"exp-output-import-dummy2.txt"},
509507
{"exp-output-plan.txt"},
510508
{"exp-output-state-rm-multiple-projects.txt"},
511-
{"exp-output-state-rm-dummy1.txt"},
512-
{"exp-output-state-rm-dummy2.txt"},
513509
{"exp-output-plan-again.txt"},
514510
{"exp-output-merged.txt"},
515511
},

server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-import-dummy1.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Import successful!
1010

1111
The resources that were imported are shown above. These resources are now in
1212
your Terraform state and will henceforth be managed by Terraform.
13-
14-
1513
```
1614

1715
* :repeat: To **plan** this project again, comment:

server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-import-count.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Import successful!
1010

1111
The resources that were imported are shown above. These resources are now in
1212
your Terraform state and will henceforth be managed by Terraform.
13-
14-
1513
```
1614

1715
* :repeat: To **plan** this project again, comment:

server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-import-foreach.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Import successful!
1010

1111
The resources that were imported are shown above. These resources are now in
1212
your Terraform state and will henceforth be managed by Terraform.
13-
14-
1513
```
1614

1715
* :repeat: To **plan** this project again, comment:

server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-import-dummy1.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Import successful!
1010

1111
The resources that were imported are shown above. These resources are now in
1212
your Terraform state and will henceforth be managed by Terraform.
13-
14-
1513
```
1614

1715
* :repeat: To **plan** this project again, comment:

server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-import-dummy2.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Import successful!
1010

1111
The resources that were imported are shown above. These resources are now in
1212
your Terraform state and will henceforth be managed by Terraform.
13-
14-
1513
```
1614

1715
* :repeat: To **plan** this project again, comment:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resource "random_id" "dummy1" {
1+
resource "random_id" "dummy" {
22
keepers = {}
33
byte_length = 1
44
}

0 commit comments

Comments
 (0)