-
Notifications
You must be signed in to change notification settings - Fork 620
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 #3684 from masatake/terraform-parser
* Terraform: new parser * added _foreignLanguage flag to --langdef option * added _language flag to --regex-<LANG>, --mline-regex-<LANG>, and --_mtable-regex-<LANG>
- Loading branch information
Showing
38 changed files
with
644 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
example_database_password input.tf /^data "aws_ssm_parameter" "example_database_password" {$/;" d |
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,3 @@ | ||
data "aws_ssm_parameter" "example_database_password" { | ||
name = "example-database-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 @@ | ||
database input.tf /^module "database" {$/;" m |
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,3 @@ | ||
module "database" { | ||
source = "../../modules/database" | ||
} |
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 @@ | ||
password input.tf /^output "password" {$/;" o |
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,3 @@ | ||
output "password" { | ||
value = data.aws_ssm_parameter.example_database_password.value | ||
} |
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 @@ | ||
aws input.tf /^provider "aws" {$/;" p |
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,3 @@ | ||
provider "aws" { | ||
region = "us-east-1" | ||
} |
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 @@ | ||
example_events_bus input.tf /^resource "aws_cloudwatch_event_bus" "example_events_bus" {$/;" r |
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,3 @@ | ||
resource "aws_cloudwatch_event_bus" "example_events_bus" { | ||
name = var.events_bus_name | ||
} |
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,3 @@ | ||
--sort=no | ||
--extras=+r | ||
--fields=+rl |
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,7 @@ | ||
aws input.tf /^provider "aws" {$/;" p language:Terraform roles:def | ||
events_bus_name input.tf /^variable "events_bus_name" {$/;" v language:Terraform roles:def | ||
example_events_bus input.tf /^resource "aws_cloudwatch_event_bus" "example_events_bus" {$/;" r language:Terraform roles:def | ||
database input.tf /^module "database" {$/;" m language:Terraform roles:def | ||
example_database_password input.tf /^data "aws_ssm_parameter" "example_database_password" {$/;" d language:Terraform roles:def | ||
password input.tf /^output "password" {$/;" o language:Terraform roles:def | ||
events_bus_name input-0.tfvars /^events_bus_name = "hyper-connector"$/;" v language:Terraform roles:assigned |
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 @@ | ||
events_bus_name = "hyper-connector" |
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,27 @@ | ||
provider "aws" { | ||
region = "us-east-1" | ||
} | ||
|
||
variable "events_bus_name" { | ||
type = string | ||
default = "hello-world" | ||
} | ||
|
||
# variable "dont_extract_me0" { | ||
// variable "dont_extract_me1" { | ||
|
||
resource "aws_cloudwatch_event_bus" "example_events_bus" { | ||
name = var.events_bus_name | ||
} | ||
|
||
module "database" { | ||
source = "../../modules/database" | ||
} | ||
|
||
data "aws_ssm_parameter" "example_database_password" { | ||
name = "example-database-password" | ||
} | ||
|
||
output "password" { | ||
value = data.aws_ssm_parameter.example_database_password.value | ||
} |
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 @@ | ||
events_bus_name input.tf /^variable "events_bus_name" {$/;" v |
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,4 @@ | ||
variable "events_bus_name" { | ||
type = string | ||
default = "hello-world" | ||
} |
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,47 @@ | ||
.. _ctags-lang-terraform(7): | ||
|
||
============================================================== | ||
ctags-lang-terraform | ||
============================================================== | ||
|
||
Random notes about tagging Terraform files with Universal Ctags | ||
|
||
:Version: 6.0.0 | ||
:Manual group: Universal Ctags | ||
:Manual section: 7 | ||
|
||
SYNOPSIS | ||
-------- | ||
| **ctags** ... --languages=+Terraform ... | ||
| **ctags** ... --language-force=Terraform ... | ||
| **ctags** ... --map-Terraform=+.tf ... | ||
| | ||
| **ctags** ... --extras=+{reference} --languages=+TerraformVariables ... | ||
| **ctags** ... --extras=+{reference} --language-force=TerraformVariables ... | ||
| **ctags** ... --extras=+{reference} --map-Terraform=+.tfvars ... | ||
DESCRIPTION | ||
----------- | ||
This man page gathers random notes about tagging Terraform files. | ||
|
||
TIPS | ||
----------- | ||
|
||
Extracting variables assigned in Variable definitions | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Specify ``--extras=+{reference}`` and ``--languages=+TerraformVariables`` | ||
to extract variables assigned in variables definitions (`*.tfvars`). | ||
The TerraformVariables parser extracts variables in `*.tfvars` files | ||
with ``variable`` kind with ``assigned`` role of ``Terraform`` language. | ||
|
||
KNOWN BUGS | ||
---------- | ||
* The parser doesn't ignore strings inside a block comment (``/* ... */``). | ||
|
||
* The parser doesn't extract variables defined with ``locals`` keyword. | ||
|
||
SEE ALSO | ||
-------- | ||
:ref:`ctags(1) <ctags(1)>`, | ||
`Configuration Syntax <https://developer.hashicorp.com/terraform/language/syntax/configuration>`_ (https://developer.hashicorp.com/terraform/language/syntax/configuration), | ||
`Variable Definitions (.tfvars) Files <https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files>`_ (https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files) |
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
Oops, something went wrong.