Skip to content

Commit a497614

Browse files
committed
Consolidate test bundle and example bundle
The test bundle had a lot of great edge cases and examples for how to use terraform in a bundle that would be useful to make people aware of in our example bundle. I have updated the basic-tf-example bundle with the contents of our test bundle. I also added defaults for all the parameters so that it doesn't require any additional config to run. This is also good because our example bundle is tested in CI now. Signed-off-by: Carolyn Van Slyck <[email protected]>
1 parent 3266cda commit a497614

File tree

7 files changed

+14
-224
lines changed

7 files changed

+14
-224
lines changed

build/testdata/bundles/terraform/porter.yaml

Lines changed: 0 additions & 135 deletions
This file was deleted.

build/testdata/bundles/terraform/terraform/main.tf

Lines changed: 0 additions & 4 deletions
This file was deleted.

build/testdata/bundles/terraform/terraform/outputs.tf

Lines changed: 0 additions & 28 deletions
This file was deleted.

build/testdata/bundles/terraform/terraform/variables.tf

Lines changed: 0 additions & 49 deletions
This file was deleted.

examples/basic-tf-example/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Basic Terraform Example Bundle
2+
3+
This example demonstrates how to define and use variables and outputs of different data types in a bundle.
4+
5+
## Try it out
6+
7+
```
8+
cd examples/basic-tf-example
9+
porter build
10+
porter install
11+
porter upgrade
12+
porter uninstall
13+
```

examples/basic-tf-example/porter.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ state:
6363
path: terraform/terraform.tfvars.json
6464

6565
mixins:
66-
- exec
6766
- terraform:
6867
clientVersion: 1.0.0
6968

@@ -114,12 +113,6 @@ show:
114113
plan:
115114
- terraform:
116115
description: "Invoke 'terraform plan'"
117-
flags:
118-
no-color:
119-
out: "/dev/null"
120-
var:
121-
- "'myvar=${bundle.parameters.myvar}'"
122-
123116
# Note: this can't be 'version:' as this would conflict with top-level field
124117
# Hence the need for the 'arguments:' override
125118
printVersion:

scripts/test/test-cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -euo pipefail
3+
set -xeuo pipefail
44
export REGISTRY=${REGISTRY:-$USER}
55
export REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
66
export PORTER_HOME=${PORTER_HOME:-$REPO_DIR/bin}

0 commit comments

Comments
 (0)