Skip to content

Commit

Permalink
TER-249: Move examples to folder and add script loading examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Caussat committed Apr 5, 2018
1 parent 20c502d commit dc00fc6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ If you're building the provider, follow the instructions to [install it as a plu

Examples are available in the examples directory:

- `basic_main`: shows how to define a simple ghost application
- `shared_modules_features_main`: shows how modules and features can be shared across ghost\_app resources using `locals`
- `basic`: shows how to define a simple ghost application
- `shared_modules_features`: shows how modules and features can be shared across ghost\_app resources using `locals`. It also shows how to write or import scripts.

Developing the Provider
---------------------------
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions examples/shared_modules_features/inputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
variable "password" {}
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ locals {
path = "/var/www"
scope = "code"
git_repo = "https://github.com/KnpLabs/KnpIpsum.git"

// You can load scripts from files
post_deploy = "${file("post_deploy.txt")}"

// You can also use heredocs
pre_deploy = <<-SCRIPT
#!/bin/bash
echo "EXAMPLE_CONFIG" >> /var/www/html/wp-config.php
SCRIPT
}

custom_module_2 = {
Expand Down
2 changes: 2 additions & 0 deletions examples/shared_modules_features/post_deploy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "EXAMPLE_CONFIG" >> /var/www/html/wp-config.php

0 comments on commit dc00fc6

Please sign in to comment.