This repository has been archived by the owner on Apr 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TER-263: Add import example and update Readme
- Loading branch information
Jordan Caussat
committed
Apr 10, 2018
1 parent
b71b695
commit 76d65ee
Showing
5 changed files
with
153 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
variable "password" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
provider "ghost" { | ||
user = "demo" | ||
password = "${var.password}" | ||
endpoint = "https://localhost" | ||
} | ||
|
||
resource "ghost_app" "basic_import" { | ||
// You can ignore parameters using lifecycle.ignore_changes meta-parameter | ||
lifecycle { | ||
ignore_changes = ["log_notifications", "safe_deployment"] | ||
} | ||
|
||
name = "wordpress" | ||
env = "dev" | ||
role = "webfront" | ||
|
||
region = "eu-west-1" | ||
instance_type = "t2.micro" | ||
vpc_id = "vpc-1234567" | ||
|
||
build_infos = { | ||
subnet_id = "subnet-1234567" | ||
ssh_username = "admin" | ||
source_ami = "ami-1234567" | ||
} | ||
|
||
environment_infos = { | ||
instance_profile = "iam.ec2.demo" | ||
key_name = "ghost-demo" | ||
public_ip_address = true | ||
|
||
root_block_device = { | ||
name = "testblockdevice" | ||
size = 20 | ||
} | ||
|
||
optional_volumes = [ | ||
{ | ||
device_name = "/dev/xvdd" | ||
volume_type = "gp2" | ||
volume_size = 20 | ||
iops = 0 | ||
}, | ||
] | ||
|
||
subnet_ids = ["subnet-1234567"] | ||
security_groups = ["sg-1234567", "sg-1234567"] | ||
|
||
instance_tags = [ | ||
{ | ||
tag_name = "Name" | ||
tag_value = "wordpress" | ||
}, | ||
] | ||
} | ||
|
||
autoscale = { | ||
name = "autoscale" | ||
min = 1 | ||
max = 3 | ||
enable_metrics = true | ||
} | ||
|
||
modules = [ | ||
{ | ||
name = "wordpress" | ||
path = "/var/www" | ||
scope = "code" | ||
git_repo = "https://github.com/KnpLabs/KnpIpsum.git" | ||
uid = 0 | ||
gid = 0 | ||
build_pack = "" | ||
pre_deploy = "" | ||
post_deploy = "" | ||
after_all_deploy = "" | ||
}, | ||
] | ||
|
||
features = [ | ||
{ | ||
name = "php5" | ||
version = "5.4" | ||
provisioner = "salt" | ||
}, | ||
{ | ||
name = "package" | ||
provisioner = "ansible" | ||
|
||
parameters = <<-JSON | ||
{ | ||
"package_name" : [ | ||
"nano", | ||
"cowsay", | ||
"ffmpeg", | ||
"curl" | ||
] | ||
} | ||
JSON | ||
}, | ||
] | ||
|
||
lifecycle_hooks = { | ||
pre_buildimage = "echo PRE_BUILD >> /var/www/html/wp-config.php" | ||
|
||
post_buildimage = <<-SCRIPT | ||
#!/bin/bash | ||
echo "EXAMPLE_CONFIG" >> /var/www/html/wp-config.php | ||
SCRIPT | ||
|
||
pre_bootstrap = "" | ||
post_bootstrap = "" | ||
} | ||
|
||
environment_variables = [ | ||
{ | ||
key = "myvar" | ||
value = "myvalue" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters