Skip to content

Commit 2b680c6

Browse files
committed
initial commit
0 parents  commit 2b680c6

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Les Aker
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
22+

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
terraform-linode-algo-image
2+
=========
3+
4+
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
5+
6+
Terraform module that creates a [Linode](https://linode.com) Image pre-baked with updates and the [Algo](https://github.com/trailofbits/algo) repo.
7+
8+
## Usage
9+
10+
```
11+
module "algo_image" {
12+
source = "github.com/akerl/terraform-linode-algo-base"
13+
}
14+
```
15+
16+
## License
17+
18+
terraform-linode-algo-base is released under the MIT License. See the bundled LICENSE file for details.

main.tf

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
resource "random_id" "vm_suffix" {
2+
byte_length = 8
3+
}
4+
5+
module "vm" {
6+
source = "github.com/akerl/terraform-linode-algo-base"
7+
8+
name = "algo-image_${random_id.vm_suffix.hex}"
9+
region = "us-east"
10+
type = "g6-standard-1"
11+
algo_repo = "${var.algo_repo}"
12+
source_image_id = "linode/ubuntu18.04"
13+
}
14+
15+
resource "linode_image" "image" {
16+
linode_id = "${module.vm.linode_id}"
17+
disk_id = "${module.vm.disk_id}"
18+
}

outputs.tf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
output "image_id" {
2+
value = "${module.image.id}"
3+
description = "ID of the Algo Image"
4+
}

variables.tf

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
variable "algo_repo" {
2+
type = "string"
3+
default = "https://github.com/akerl/algo"
4+
description = "Repo to use for Algo code"
5+
}

0 commit comments

Comments
 (0)