-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1882 from derBroBro/terraform-support
Terraform support
- Loading branch information
Showing
14 changed files
with
261 additions
and
5 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
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
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,18 @@ | ||
resource "aws_db_instance" "wordpress" { | ||
# worng spaces # to much spaces | ||
|
||
allocated_storage = 10 | ||
storage_type = "gp2" | ||
engine = "mariadb" | ||
engine_version = "10.0.24" | ||
|
||
instance_class = "db.t2.micro" | ||
identifier = "db-${var.env}" | ||
name = "wordpress" | ||
|
||
username = "wordpress" | ||
password = "${var.wordpress_db_pass}" | ||
db_subnet_group_name = "${aws_db_subnet_group.default.name}" | ||
vpc_security_group_ids = ["${aws_security_group.RuleWebServerIn.id}"] | ||
apply_immediately = true | ||
} |
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,21 @@ | ||
resource "aws_db_instance" "wordpress" { | ||
# worng spaces | ||
# to much spaces | ||
|
||
allocated_storage = 10 | ||
storage_type = "gp2" | ||
engine = "mariadb" | ||
engine_version = "10.0.24" | ||
|
||
instance_class = "db.t2.micro" | ||
identifier = "db-${var.env}" | ||
name = "wordpress" | ||
|
||
|
||
|
||
username = "wordpress" | ||
password = "${var.wordpress_db_pass}" | ||
db_subnet_group_name = "${aws_db_subnet_group.default.name}" | ||
vpc_security_group_ids = ["${aws_security_group.RuleWebServerIn.id}"] | ||
apply_immediately = true | ||
} |
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,38 @@ | ||
### | ||
Requires terraform installed | ||
### | ||
|
||
"use strict" | ||
Beautifier = require('./beautifier') | ||
|
||
module.exports = class Terraformfmt extends Beautifier | ||
name: "terraformfmt" | ||
link: "https://www.terraform.io/docs/commands/fmt.html" | ||
|
||
options: { | ||
Terraform: false | ||
} | ||
|
||
executables: [ | ||
{ | ||
name: "Terraform" | ||
cmd: "terraform" | ||
homepage: "https://www.terraform.io" | ||
installation: "https://www.terraform.io" | ||
version: { | ||
parse: (text) -> text.match(/Terraform v(\d+\.\d+\.\d+)/)[1] | ||
} | ||
docker: { | ||
image: "hashicorp/terraform" | ||
} | ||
} | ||
] | ||
|
||
beautify: (text, language, options) -> | ||
@exe("terraform").run([ | ||
"fmt" | ||
tempFile = @tempFile("input", text) | ||
]) | ||
.then(=> | ||
@readFile(tempFile) | ||
) |
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 |
---|---|---|
|
@@ -77,6 +77,7 @@ module.exports = class Languages | |
"xml" | ||
"xtemplate" | ||
"yaml" | ||
"terraform" | ||
] | ||
|
||
### | ||
|
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,20 @@ | ||
module.exports = { | ||
|
||
name: "Terraform" | ||
namespace: "terraform" | ||
fallback: ['js'] | ||
|
||
### | ||
Supported Grammars | ||
### | ||
grammars: [ | ||
"Terraform" | ||
] | ||
|
||
### | ||
Supported extensions | ||
### | ||
extensions: [ | ||
"tf" | ||
] | ||
} |
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