terraspace 0.2.4 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cody/aws/bin/build.sh +2 -0
- data/.cody/azurerm/bin/build.sh +2 -0
- data/.cody/google/bin/build.sh +2 -0
- data/CHANGELOG.md +39 -1
- data/README.md +14 -1
- data/lib/templates/base/git_hook/hook.sh +1 -1
- data/lib/templates/base/project/.gitignore +1 -0
- data/lib/templates/base/project/README.md +17 -0
- data/lib/terraspace.rb +6 -0
- data/lib/terraspace/all/base.rb +8 -0
- data/lib/terraspace/all/grapher.rb +129 -0
- data/lib/terraspace/all/preview.rb +43 -0
- data/lib/terraspace/all/runner.rb +169 -0
- data/lib/terraspace/all/summary.rb +119 -0
- data/lib/terraspace/app.rb +31 -9
- data/lib/terraspace/booter.rb +9 -0
- data/lib/terraspace/builder.rb +59 -22
- data/lib/terraspace/cli.rb +60 -33
- data/lib/terraspace/cli/all.rb +63 -0
- data/lib/terraspace/cli/build/placeholder.rb +2 -5
- data/lib/terraspace/cli/bundle.rb +1 -1
- data/lib/terraspace/cli/check_setup.rb +5 -0
- data/lib/terraspace/cli/cloud.rb +16 -6
- data/lib/terraspace/cli/cloud/runs.rb +22 -0
- data/lib/terraspace/cli/commander.rb +1 -8
- data/lib/terraspace/cli/down.rb +20 -0
- data/lib/terraspace/cli/help/all/down.md +32 -0
- data/lib/terraspace/cli/help/all/graph.md +21 -0
- data/lib/terraspace/cli/help/all/output.md +22 -0
- data/lib/terraspace/cli/help/all/plan.md +25 -0
- data/lib/terraspace/cli/help/all/providers.md +21 -0
- data/lib/terraspace/cli/help/all/refresh.md +17 -0
- data/lib/terraspace/cli/help/all/show.md +21 -0
- data/lib/terraspace/cli/help/all/up.md +27 -0
- data/lib/terraspace/cli/help/all/validate.md +21 -0
- data/lib/terraspace/cli/help/build.md +6 -0
- data/lib/terraspace/cli/help/bundle.md +9 -5
- data/lib/terraspace/cli/help/check_setup.md +9 -0
- data/lib/terraspace/cli/help/clean.md +5 -0
- data/lib/terraspace/cli/help/cloud/destroy.md +16 -0
- data/lib/terraspace/cli/help/cloud/list.md +7 -0
- data/lib/terraspace/cli/help/cloud/runs/list.md +36 -0
- data/lib/terraspace/cli/help/cloud/runs/prune.md +25 -0
- data/lib/terraspace/cli/help/cloud/sync.md +43 -0
- data/lib/terraspace/cli/help/console.md +8 -0
- data/lib/terraspace/cli/help/down.md +26 -0
- data/lib/terraspace/cli/help/info.md +43 -0
- data/lib/terraspace/cli/help/init.md +37 -0
- data/lib/terraspace/cli/help/list.md +20 -0
- data/lib/terraspace/cli/help/log.md +48 -0
- data/lib/terraspace/cli/help/logs/remove.md +5 -0
- data/lib/terraspace/cli/help/logs/truncate.md +5 -0
- data/lib/terraspace/cli/help/new/bootstrap_test.md +8 -0
- data/lib/terraspace/cli/help/new/example.md +8 -0
- data/lib/terraspace/cli/help/new/git_hook.md +6 -0
- data/lib/terraspace/cli/help/new/module.md +9 -0
- data/lib/terraspace/cli/help/new/module_test.md +12 -0
- data/lib/terraspace/cli/help/new/plugin.md +49 -0
- data/lib/terraspace/cli/help/new/project.md +40 -0
- data/lib/terraspace/cli/help/new/project_test.md +8 -0
- data/lib/terraspace/cli/help/new/shim.md +21 -0
- data/lib/terraspace/cli/help/new/stack.md +9 -0
- data/lib/terraspace/cli/help/output.md +6 -0
- data/lib/terraspace/cli/help/plan.md +29 -0
- data/lib/terraspace/cli/help/providers.md +18 -0
- data/lib/terraspace/cli/help/refresh.md +11 -0
- data/lib/terraspace/cli/help/seed.md +7 -0
- data/lib/terraspace/cli/help/show.md +36 -0
- data/lib/terraspace/cli/help/summary.md +11 -0
- data/lib/terraspace/cli/help/test.md +35 -0
- data/lib/terraspace/cli/help/up.md +30 -0
- data/lib/terraspace/cli/help/validate.md +9 -0
- data/lib/terraspace/cli/info.rb +4 -16
- data/lib/terraspace/cli/init.rb +35 -7
- data/lib/terraspace/cli/list.rb +14 -1
- data/lib/terraspace/cli/log.rb +112 -0
- data/lib/terraspace/cli/log/concern.rb +24 -0
- data/lib/terraspace/cli/logs.rb +15 -0
- data/lib/terraspace/cli/logs/tasks.rb +32 -0
- data/lib/terraspace/cli/new.rb +18 -18
- data/lib/terraspace/cli/new/git_hook.rb +5 -2
- data/lib/terraspace/cli/new/project.rb +1 -1
- data/lib/terraspace/cli/summary.rb +2 -2
- data/lib/terraspace/cli/tfc_concern.rb +14 -0
- data/lib/terraspace/cli/up.rb +32 -0
- data/lib/terraspace/command.rb +1 -1
- data/lib/terraspace/compiler/backend.rb +10 -0
- data/lib/terraspace/compiler/builder.rb +5 -4
- data/lib/terraspace/compiler/cleaner.rb +1 -1
- data/lib/terraspace/compiler/cleaner/backend_change.rb +21 -7
- data/lib/terraspace/compiler/commands_concern.rb +18 -0
- data/lib/terraspace/compiler/dirs_concern.rb +47 -0
- data/lib/terraspace/compiler/dsl/syntax/helpers/common.rb +26 -1
- data/lib/terraspace/core.rb +11 -2
- data/lib/terraspace/dependency/graph.rb +140 -0
- data/lib/terraspace/dependency/node.rb +38 -0
- data/lib/terraspace/dependency/registry.rb +11 -0
- data/lib/terraspace/logger.rb +6 -18
- data/lib/terraspace/logger/formatter.rb +13 -0
- data/lib/terraspace/mod.rb +7 -1
- data/lib/terraspace/plugin/summary/interface.rb +1 -1
- data/lib/terraspace/seeder/where.rb +6 -2
- data/lib/terraspace/shell.rb +107 -0
- data/lib/terraspace/terraform/api.rb +7 -45
- data/lib/terraspace/terraform/api/base.rb +7 -0
- data/lib/terraspace/terraform/api/client.rb +23 -3
- data/lib/terraspace/terraform/api/http.rb +14 -34
- data/lib/terraspace/terraform/api/http/concern.rb +10 -0
- data/lib/terraspace/terraform/api/runs.rb +28 -0
- data/lib/terraspace/terraform/api/token.rb +65 -0
- data/lib/terraspace/terraform/api/var.rb +20 -6
- data/lib/terraspace/terraform/api/vars.rb +2 -1
- data/lib/terraspace/terraform/api/workspace.rb +98 -0
- data/lib/terraspace/terraform/args/default.rb +48 -21
- data/lib/terraspace/terraform/cloud/runs.rb +13 -0
- data/lib/terraspace/terraform/cloud/runs/base.rb +33 -0
- data/lib/terraspace/terraform/cloud/runs/item_presenter.rb +37 -0
- data/lib/terraspace/terraform/cloud/runs/lister.rb +20 -0
- data/lib/terraspace/terraform/cloud/runs/pruner.rb +109 -0
- data/lib/terraspace/terraform/cloud/sync.rb +41 -0
- data/lib/terraspace/terraform/cloud/syncer.rb +52 -0
- data/lib/terraspace/terraform/cloud/workspace.rb +10 -30
- data/lib/terraspace/terraform/hooks/builder.rb +1 -1
- data/lib/terraspace/terraform/remote_state/fetcher.rb +143 -0
- data/lib/terraspace/terraform/remote_state/marker/output.rb +39 -0
- data/lib/terraspace/terraform/remote_state/marker/pretty_tracer.rb +37 -0
- data/lib/terraspace/terraform/remote_state/output_proxy.rb +29 -0
- data/lib/terraspace/terraform/runner.rb +24 -14
- data/lib/terraspace/util.rb +1 -5
- data/lib/terraspace/util/pretty.rb +18 -0
- data/lib/terraspace/version.rb +1 -1
- data/spec/fixtures/fetcher/c1.json +37 -0
- data/spec/fixtures/parser/cache_dirs/all/01-test.auto.tfvars +5 -0
- data/spec/fixtures/parser/cache_dirs/depends_on/01-test.auto.tfvars +2 -0
- data/spec/fixtures/parser/cache_dirs/output/01-test.auto.tfvars +2 -0
- data/spec/fixtures/summary/down.log +12 -0
- data/spec/fixtures/summary/output.log +5 -0
- data/spec/fixtures/summary/plan/error.log +20 -0
- data/spec/fixtures/summary/plan/success.log +17 -0
- data/spec/fixtures/summary/show.log +22 -0
- data/spec/fixtures/summary/up/error.log +13 -0
- data/spec/fixtures/summary/up/success.log +63 -0
- data/spec/fixtures/summary/validate/error.log +13 -0
- data/spec/fixtures/summary/validate/success.log +5 -0
- data/spec/terraspace/all/grapher_spec.rb +38 -0
- data/spec/terraspace/all/runner_spec.rb +48 -0
- data/spec/terraspace/all/summary_spec.rb +93 -0
- data/spec/terraspace/dependency/graph_spec.rb +162 -0
- data/spec/terraspace/seeder_spec.rb +0 -1
- data/spec/terraspace/terraform/remote_state/fetcher_spec.rb +52 -0
- data/terraspace.gemspec +5 -1
- metadata +179 -6
- data/lib/terraspace/cli/help/update.md +0 -5
- data/lib/terraspace/terraform/cloud.rb +0 -25
- data/lib/terraspace/util/sh.rb +0 -19
@@ -4,11 +4,15 @@
|
|
4
4
|
|
5
5
|
## More commands
|
6
6
|
|
7
|
-
terraspace bundle install
|
8
|
-
terraspace bundle update
|
9
|
-
terraspace bundle
|
7
|
+
terraspace bundle install # same as bundle
|
8
|
+
terraspace bundle update # Updates Terrafile.lock
|
9
|
+
terraspace bundle purge_cache # removes /tmp terraspace bundler folder
|
10
10
|
|
11
11
|
## Update a single module
|
12
12
|
|
13
|
-
terraspace bundle update
|
14
|
-
terraspace bundle update demo
|
13
|
+
terraspace bundle update MODULE
|
14
|
+
terraspace bundle update demo
|
15
|
+
|
16
|
+
## Info on a module
|
17
|
+
|
18
|
+
terraspace bundle info MODULE
|
@@ -0,0 +1,16 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace cloud destroy demo
|
4
|
+
You are about to delete the workspace: demo-dev-us-west-2
|
5
|
+
All variables, settings, run history, and state history will be removed.
|
6
|
+
This cannot be undone.
|
7
|
+
|
8
|
+
This will NOT remove any infrastructure managed by this workspace.
|
9
|
+
If needed, destroy the infrastructure prior to deleting the workspace with:
|
10
|
+
|
11
|
+
terraspace down demo
|
12
|
+
|
13
|
+
This will delete the workspace: demo-dev-us-west-2.
|
14
|
+
Are you sure? (y/N) y
|
15
|
+
Destroying workspace demo-dev-us-west-2
|
16
|
+
$
|
@@ -0,0 +1,36 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
Statuses of pending and planned are shown by default.
|
4
|
+
|
5
|
+
$ terraspace cloud runs list demo
|
6
|
+
+----------------------+---------+---------------------------------+---------------------+
|
7
|
+
| Id | Status | Message | Created At |
|
8
|
+
+----------------------+---------+---------------------------------+---------------------+
|
9
|
+
| run-AuTXsYU1svQEzQVg | pending | Queued manually using Terraform | 2020-09-18T11:30:41 |
|
10
|
+
| run-LuwMibh3ebiG7KQZ | planned | test | 2020-09-17T23:16:36 |
|
11
|
+
+----------------------+---------+---------------------------------+---------------------+
|
12
|
+
$
|
13
|
+
|
14
|
+
To see all most recent runs, use `--status all`.
|
15
|
+
|
16
|
+
$ terraspace cloud runs list demo --status all
|
17
|
+
+----------------------+-----------+--------------------------------+---------------------+
|
18
|
+
| Id | Status | Message | Created At |
|
19
|
+
+----------------------+-----------+--------------------------------+---------------------+
|
20
|
+
| run-LuwMibh3ebiG7KQZ | planned | test 3 | 2020-09-17T23:16:36 |
|
21
|
+
| run-z9f67TNMRamZiGMR | canceled | test 2 | 2020-09-17T23:15:55 |
|
22
|
+
| run-cN3CKT5po29p35Ta | discarded | test | 2020-09-17T22:24:31 |
|
23
|
+
| run-rXMd7dm3fHvVsA36 | discarded | Queued from Terraform Cloud UI | 2020-09-17T20:00:20 |
|
24
|
+
+----------------------+-----------+--------------------------------+---------------------+
|
25
|
+
$
|
26
|
+
|
27
|
+
You can provide a list of statuses to the `--status` filter option.
|
28
|
+
|
29
|
+
$ terraspace cloud runs list demo --status canceled discarded
|
30
|
+
+----------------------+-----------+--------------------------------+---------------------+
|
31
|
+
| Id | Status | Message | Created At |
|
32
|
+
+----------------------+-----------+--------------------------------+---------------------+
|
33
|
+
| run-gS2m1avc3U4j1fip | canceled | test | 2020-09-17T23:15:43 |
|
34
|
+
| run-ojwQ4r7MxuzyK3d9 | discarded | test | 2020-09-17T22:33:00 |
|
35
|
+
| run-dczeLQsMc3ya4XnY | canceled | test | 2020-09-17T22:32:55 |
|
36
|
+
+----------------------+-----------+--------------------------------+---------------------+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
This leaves the top run alone. The top run usually starts immediately planning once the other runs are pruned. Runs that are also in "Needs Confirmation" will be cancelled.
|
2
|
+
|
3
|
+
## Examples
|
4
|
+
|
5
|
+
terraspace cloud runs prune demo --noop
|
6
|
+
terraspace cloud runs prune demo # live run
|
7
|
+
|
8
|
+
## Example with Output
|
9
|
+
|
10
|
+
$ terraspace cloud runs prune demo
|
11
|
+
Will keep:
|
12
|
+
|
13
|
+
run-9muMrjrd22vhsP4u pending test 2020-09-18T12:47:11
|
14
|
+
|
15
|
+
Will prune:
|
16
|
+
|
17
|
+
run-fYTDzmKfCQf558UN pending test 2020-09-18T12:46:34
|
18
|
+
run-6bgSTattJGpaRn9X pending test 2020-09-18T12:46:28
|
19
|
+
run-jDHEtZb3vuFnuXqJ planned test 2020-09-18T12:38:35
|
20
|
+
|
21
|
+
Are you sure? (y/N) y
|
22
|
+
Cancelled run-fYTDzmKfCQf558UN test
|
23
|
+
Cancelled run-6bgSTattJGpaRn9X test
|
24
|
+
Discarded run-jDHEtZb3vuFnuXqJ test
|
25
|
+
$
|
@@ -0,0 +1,43 @@
|
|
1
|
+
## Examples
|
2
|
+
|
3
|
+
Sync all stacks:
|
4
|
+
|
5
|
+
$ terraspace cloud sync
|
6
|
+
About to sync these project stacks with Terraform Cloud workspaces:
|
7
|
+
|
8
|
+
Stack => Workspace
|
9
|
+
demo => demo-dev-us-west-2
|
10
|
+
demo2 => demo2-dev-us-west-2
|
11
|
+
|
12
|
+
A sync does the following for each workspace:
|
13
|
+
|
14
|
+
1. Create or update workspace, including the VCS settings.
|
15
|
+
2. Set the working dir.
|
16
|
+
3. Set env and terraform variables.
|
17
|
+
|
18
|
+
Are you sure? (y/N) y
|
19
|
+
Syncing to Terraform Cloud: demo => demo-dev-us-west-2
|
20
|
+
Syncing to Terraform Cloud: demo2 => demo2-dev-us-west-2
|
21
|
+
$
|
22
|
+
|
23
|
+
Sync specific stacks:
|
24
|
+
|
25
|
+
$ terraspace cloud sync demo
|
26
|
+
About to sync these project stacks with Terraform Cloud workspaces:
|
27
|
+
|
28
|
+
Stack => Workspace
|
29
|
+
demo => demo-dev-us-west-2
|
30
|
+
|
31
|
+
A sync does the following for each workspace:
|
32
|
+
|
33
|
+
1. Create or update workspace, including the VCS settings.
|
34
|
+
2. Set the working dir.
|
35
|
+
3. Set env and terraform variables.
|
36
|
+
|
37
|
+
Are you sure? (y/N) y
|
38
|
+
Syncing to Terraform Cloud: demo => demo-dev-us-west-2
|
39
|
+
$
|
40
|
+
|
41
|
+
Can also specify multiple stacks:
|
42
|
+
|
43
|
+
terraspace cloud sync demo demo2
|
@@ -0,0 +1,26 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace down demo
|
4
|
+
Building .terraspace-cache/us-west-2/dev/stacks/demo
|
5
|
+
Built in .terraspace-cache/us-west-2/dev/stacks/demo
|
6
|
+
Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
|
7
|
+
=> terraform destroy
|
8
|
+
# ...
|
9
|
+
Plan: 0 to add, 0 to change, 2 to destroy.
|
10
|
+
|
11
|
+
Changes to Outputs:
|
12
|
+
- bucket_name = "bucket-trusty-marmoset" -> null
|
13
|
+
|
14
|
+
Do you really want to destroy all resources?
|
15
|
+
Terraform will destroy all your managed infrastructure, as shown above.
|
16
|
+
There is no undo. Only 'yes' will be accepted to confirm.
|
17
|
+
Enter a value: yes
|
18
|
+
|
19
|
+
module.bucket.aws_s3_bucket.this: Destroying... [id=bucket-trusty-marmoset]
|
20
|
+
module.bucket.aws_s3_bucket.this: Destruction complete after 0s
|
21
|
+
random_pet.this: Destroying... [id=trusty-marmoset]
|
22
|
+
random_pet.this: Destruction complete after 0s
|
23
|
+
|
24
|
+
Destroy complete! Resources: 2 destroyed.
|
25
|
+
Time took: 21s
|
26
|
+
$
|
@@ -0,0 +1,43 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace info demo
|
4
|
+
+-----------+---------------------------------------------+
|
5
|
+
| Name | Value |
|
6
|
+
+-----------+---------------------------------------------+
|
7
|
+
| build_dir | stacks/demo |
|
8
|
+
| cache_dir | .terraspace-cache/us-west-2/dev/stacks/demo |
|
9
|
+
| name | demo |
|
10
|
+
| root | app/stacks/demo |
|
11
|
+
| type | stack |
|
12
|
+
| type_dir | stacks |
|
13
|
+
+-----------+---------------------------------------------+
|
14
|
+
|
15
|
+
You can also format the output in json:
|
16
|
+
|
17
|
+
$ terraspace info demo --format json
|
18
|
+
[
|
19
|
+
{
|
20
|
+
"Name": "build_dir",
|
21
|
+
"Value": "stacks/demo"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"Name": "cache_dir",
|
25
|
+
"Value": ".terraspace-cache/us-west-2/dev/stacks/demo"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"Name": "name",
|
29
|
+
"Value": "demo"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"Name": "root",
|
33
|
+
"Value": "app/stacks/demo"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"Name": "type",
|
37
|
+
"Value": "stack"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"Name": "type_dir",
|
41
|
+
"Value": "stacks"
|
42
|
+
}
|
43
|
+
]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Typically, Terrasapce auto init should handle initialization. You can run init if you need to though.
|
2
|
+
|
3
|
+
## Example
|
4
|
+
|
5
|
+
$ terraspace init demo
|
6
|
+
Building .terraspace-cache/us-west-2/dev/stacks/demo
|
7
|
+
Built in .terraspace-cache/us-west-2/dev/stacks/demo
|
8
|
+
Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
|
9
|
+
=> terraform init -get
|
10
|
+
Initializing modules...
|
11
|
+
|
12
|
+
Initializing the backend...
|
13
|
+
|
14
|
+
Initializing provider plugins...
|
15
|
+
- Using previously-installed hashicorp/aws v3.7.0
|
16
|
+
- Using previously-installed hashicorp/random v2.3.0
|
17
|
+
|
18
|
+
The following providers do not have any version constraints in configuration,
|
19
|
+
so the latest version was installed.
|
20
|
+
|
21
|
+
To prevent automatic upgrades to new major versions that may contain breaking
|
22
|
+
changes, we recommend adding version constraints in a required_providers block
|
23
|
+
in your configuration, with the constraint strings suggested below.
|
24
|
+
|
25
|
+
* hashicorp/aws: version = "~> 3.7.0"
|
26
|
+
* hashicorp/random: version = "~> 2.3.0"
|
27
|
+
|
28
|
+
Terraform has been successfully initialized!
|
29
|
+
|
30
|
+
You may now begin working with Terraform. Try running "terraform plan" to see
|
31
|
+
any changes that are required for your infrastructure. All Terraform commands
|
32
|
+
should now work.
|
33
|
+
|
34
|
+
If you ever set or change modules or backend configuration for Terraform,
|
35
|
+
rerun this command to reinitialize your working directory. If you forget, other
|
36
|
+
commands will detect it and remind you to do so if necessary.
|
37
|
+
$
|
@@ -0,0 +1,20 @@
|
|
1
|
+
## Examples
|
2
|
+
|
3
|
+
List both modules and stacks.
|
4
|
+
|
5
|
+
$ terraspace list
|
6
|
+
app/modules/example
|
7
|
+
app/stacks/demo
|
8
|
+
$
|
9
|
+
|
10
|
+
List only stacks.
|
11
|
+
|
12
|
+
$ terraspace list -t stack
|
13
|
+
app/stacks/demo
|
14
|
+
$
|
15
|
+
|
16
|
+
List only modules.
|
17
|
+
|
18
|
+
$ terraspace list -t module
|
19
|
+
app/modules/example
|
20
|
+
$
|
@@ -0,0 +1,48 @@
|
|
1
|
+
The log commands will filter out the logs for the last ran terraspace command. It does this by filtering for the last found PID in the log files.
|
2
|
+
|
3
|
+
## Quick Start
|
4
|
+
|
5
|
+
Follow all the logs as you're running `terraspace all up`:
|
6
|
+
|
7
|
+
terraspace log -f
|
8
|
+
|
9
|
+
Note, Terraspace automatically checks every second for new logs and adds them to be followed.
|
10
|
+
|
11
|
+
## View Logs
|
12
|
+
|
13
|
+
View last 10 lines of each log file.
|
14
|
+
|
15
|
+
terraspace log up network # view up log on specific stack
|
16
|
+
terraspace log up # view all up logs
|
17
|
+
terraspace log down # view all down logs
|
18
|
+
terraspace log # view all logs: up, down, etc
|
19
|
+
|
20
|
+
By default, the log command shows the last 10 lines of the logs for each log file. You can use the `-n` option to adjust this.
|
21
|
+
|
22
|
+
terraspace log -n 2 # view last 2 lines of all logs: up, down, etc
|
23
|
+
|
24
|
+
To show all logs, use the `-a` option.
|
25
|
+
|
26
|
+
terraspace log up -a
|
27
|
+
|
28
|
+
Note, if both an action and stack is specified, then it defaults to showing all logs. If you want not to show all logs, use `--no-all`.
|
29
|
+
|
30
|
+
## Tail Logs
|
31
|
+
|
32
|
+
To tail logs, use the `-f` option.
|
33
|
+
|
34
|
+
terraspace log up network -f # view up log on specific stack
|
35
|
+
terraspace log up -f # view all up logs
|
36
|
+
terraspace log down -f # view all down logs
|
37
|
+
terraspace log -f # view all logs: up, down, etc
|
38
|
+
|
39
|
+
## Timestamps
|
40
|
+
|
41
|
+
The timestamps are shown by default when you are looking for multiple files. When you specify both the action and stack for a single log file, then timestamps are not shown.
|
42
|
+
|
43
|
+
terraspace log up # timestamps will be shown in this case
|
44
|
+
terraspace log up network # timestamps not be shown in this case
|
45
|
+
|
46
|
+
To show timestamps:
|
47
|
+
|
48
|
+
terraspace up up network --timestamps
|
@@ -0,0 +1,12 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace new module_test example
|
4
|
+
=> Creating module test: example
|
5
|
+
exist app/modules/example
|
6
|
+
create app/modules/example/test/.rspec
|
7
|
+
create app/modules/example/test/Gemfile
|
8
|
+
create app/modules/example/test/spec/fixtures/stack/main.tf
|
9
|
+
create app/modules/example/test/spec/fixtures/stack/outputs.tf
|
10
|
+
create app/modules/example/test/spec/main_spec.rb
|
11
|
+
create app/modules/example/test/spec/spec_helper.rb
|
12
|
+
$
|
@@ -0,0 +1,49 @@
|
|
1
|
+
## Example
|
2
|
+
|
3
|
+
$ terraspace new plugin mycloud
|
4
|
+
=> Creating new plugin: mycloud
|
5
|
+
create terraspace_plugin_mycloud
|
6
|
+
create terraspace_plugin_mycloud/.gitignore
|
7
|
+
create terraspace_plugin_mycloud/.rspec
|
8
|
+
create terraspace_plugin_mycloud/CHANGELOG.md
|
9
|
+
create terraspace_plugin_mycloud/Gemfile
|
10
|
+
create terraspace_plugin_mycloud/LICENSE.txt
|
11
|
+
create terraspace_plugin_mycloud/README.md
|
12
|
+
create terraspace_plugin_mycloud/Rakefile
|
13
|
+
create terraspace_plugin_mycloud/bin/console
|
14
|
+
create terraspace_plugin_mycloud/bin/setup
|
15
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/module/main.tf
|
16
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/module/outputs.tf
|
17
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/module/variables.tf
|
18
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/project/config/terraform/backend.tf
|
19
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/project/config/terraform/provider.tf
|
20
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/stack/main.tf
|
21
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/stack/outputs.tf
|
22
|
+
create terraspace_plugin_mycloud/lib/templates/hcl/stack/variables.tf
|
23
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/module/main.rb
|
24
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/module/outputs.rb
|
25
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/module/variables.rb
|
26
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/project/config/terraform/backend.rb
|
27
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/project/config/terraform/provider.rb
|
28
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/stack/main.rb
|
29
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/stack/outputs.rb
|
30
|
+
create terraspace_plugin_mycloud/lib/templates/ruby/stack/variables.rb
|
31
|
+
create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/.rspec
|
32
|
+
create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/Gemfile
|
33
|
+
create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/fixtures/stack/main.tf
|
34
|
+
create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/fixtures/stack/outputs.tf
|
35
|
+
create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/fixtures/stack/variables.tf
|
36
|
+
create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/main_spec.rb
|
37
|
+
create terraspace_plugin_mycloud/lib/templates/test/rspec/module/test/spec/spec_helper.rb
|
38
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud.rb
|
39
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/autoloader.rb
|
40
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/clients.rb
|
41
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/backend.rb
|
42
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/config.rb
|
43
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/expander.rb
|
44
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/interfaces/layer.rb
|
45
|
+
create terraspace_plugin_mycloud/lib/terraspace_plugin_mycloud/version.rb
|
46
|
+
create terraspace_plugin_mycloud/spec/spec_helper.rb
|
47
|
+
create terraspace_plugin_mycloud/spec/terraspace_provider_mycloud_spec.rb
|
48
|
+
create terraspace_plugin_mycloud/terraspace_plugin_mycloud.gemspec
|
49
|
+
$
|