forked from Wilfred/difftastic
-
Notifications
You must be signed in to change notification settings - Fork 0
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 Wilfred#3 from MichaHoffmann/add_heredoc_templates
WIP add heredoc templates; only EOF marker at the moment
- Loading branch information
Showing
903 changed files
with
61,966 additions
and
6,072 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
root = true | ||
|
||
[*.{c,txt,js}] | ||
[*.{cc,txt,js}] | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 8 | ||
|
Empty file.
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,17 @@ | ||
name: acceptance | ||
on: | ||
push: | ||
|
||
jobs: | ||
unittests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: nixbuild/nix-quick-install-action@v5 | ||
- run: nix-shell --run 'tree-sitter test' | ||
acceptance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: nixbuild/nix-quick-install-action@v5 | ||
- run: nix-shell --run 'tree-sitter parse --quiet --stat example/real_world_stuff/*/*' |
This file was deleted.
Oops, something went wrong.
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
39 changes: 39 additions & 0 deletions
39
example/real_world_stuff/oracle/oracle%bosh-oracle-cpi-release%ci%terraform%datasources.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Availability Domain | ||
data "oci_identity_availability_domains" "ADs" { | ||
compartment_id = "${var.oracle_tenancy_ocid}" | ||
filter { | ||
name = "name" | ||
values = ["${var.director_ad}"] | ||
} | ||
} | ||
|
||
data "oci_identity_compartments" "Compartments" { | ||
compartment_id = "${var.oracle_tenancy_ocid}" | ||
filter { | ||
name = "name" | ||
values = ["${var.director_compartment_name}"] | ||
} | ||
} | ||
|
||
data "oci_core_virtual_networks" "VCNs" { | ||
compartment_id = "${data.null_data_source.SetupConfig.inputs.compartment_id}" | ||
filter { | ||
name = "display_name" | ||
values = ["${var.director_vcn}"] | ||
} | ||
} | ||
|
||
data "null_data_source" "SetupConfig" { | ||
inputs = { | ||
ad_name = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}" | ||
compartment_id = "${lookup(data.oci_identity_compartments.Compartments.compartments[0],"id")}" | ||
} | ||
} | ||
|
||
data "null_data_source" "VCN" { | ||
inputs = { | ||
id = "${lookup(data.oci_core_virtual_networks.VCNs.virtual_networks[0], "id")}" | ||
dhcp_options_id = "${lookup(data.oci_core_virtual_networks.VCNs.virtual_networks[0], "default_dhcp_options_id")}" | ||
default_route_table_id = "${lookup(data.oci_core_virtual_networks.VCNs.virtual_networks[0], "default_route_table_id")}" | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
example/real_world_stuff/oracle/oracle%bosh-oracle-cpi-release%ci%terraform%network.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
resource "oci_core_virtual_network" "VCN" { | ||
cidr_block = "${var.vcn_cidr}" | ||
compartment_id = "${data.null_data_source.SetupConfig.outputs["compartment_id"]}" | ||
display_name = "${var.director_vcn}" | ||
} | ||
*/ | ||
|
||
resource "oci_core_security_list" "ci_public_all" { | ||
compartment_id = "${data.null_data_source.SetupConfig.inputs.compartment_id}" | ||
display_name = "ci_public_all" | ||
vcn_id = "${data.null_data_source.VCN.inputs.id}" | ||
egress_security_rules = [{ | ||
protocol = "all" | ||
destination = "0.0.0.0/0" | ||
}] | ||
ingress_security_rules = [{ | ||
protocol = "all" | ||
source = "0.0.0.0/0" | ||
}] | ||
} | ||
|
||
resource "oci_core_subnet" "director_subnet" { | ||
availability_domain = "${data.null_data_source.SetupConfig.inputs.ad_name}" | ||
cidr_block = "${var.director_subnet_cidr}" | ||
display_name = "ci_director_subnet_${replace(data.null_data_source.SetupConfig.inputs.ad_name, "-", "_")}" | ||
dhcp_options_id = "${data.null_data_source.VCN.inputs.dhcp_options_id}" | ||
compartment_id = "${data.null_data_source.SetupConfig.inputs.compartment_id}" | ||
vcn_id = "${data.null_data_source.VCN.inputs.id}" | ||
route_table_id = "${data.null_data_source.VCN.inputs.default_route_table_id}" | ||
security_list_ids = ["${oci_core_security_list.ci_public_all.id}"] | ||
prohibit_public_ip_on_vnic = false | ||
} | ||
|
||
resource "oci_core_subnet" "bats_subnet1" { | ||
availability_domain = "${data.null_data_source.SetupConfig.inputs.ad_name}" | ||
cidr_block = "${var.bats_subnet1_cidr}" | ||
display_name = "ci_bats_subnet1_${replace(data.null_data_source.SetupConfig.inputs.ad_name, "-", "_")}" | ||
dhcp_options_id = "${data.null_data_source.VCN.inputs.dhcp_options_id}" | ||
compartment_id = "${data.null_data_source.SetupConfig.inputs.compartment_id}" | ||
vcn_id = "${data.null_data_source.VCN.inputs.id}" | ||
route_table_id = "${data.null_data_source.VCN.inputs.default_route_table_id}" | ||
security_list_ids = ["${oci_core_security_list.ci_public_all.id}"] | ||
prohibit_public_ip_on_vnic = false | ||
} | ||
|
||
resource "oci_core_subnet" "bats_subnet2" { | ||
availability_domain = "${data.null_data_source.SetupConfig.inputs.ad_name}" | ||
cidr_block = "${var.bats_subnet2_cidr}" | ||
display_name = "ci_bats_subnet2_${replace(data.null_data_source.SetupConfig.inputs.ad_name, "-", "_")}" | ||
dhcp_options_id = "${data.null_data_source.VCN.inputs.dhcp_options_id}" | ||
compartment_id = "${data.null_data_source.SetupConfig.inputs.compartment_id}" | ||
vcn_id = "${data.null_data_source.VCN.inputs.id}" | ||
route_table_id = "${data.null_data_source.VCN.inputs.default_route_table_id}" | ||
security_list_ids = ["${oci_core_security_list.ci_public_all.id}"] | ||
prohibit_public_ip_on_vnic = false | ||
} |
95 changes: 95 additions & 0 deletions
95
example/real_world_stuff/oracle/oracle%bosh-oracle-cpi-release%ci%terraform%output.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
output vcn { | ||
value = "${var.director_vcn}" | ||
} | ||
output subnet_id { | ||
value = "${oci_core_subnet.director_subnet.id}" | ||
|
||
} | ||
output compartment_id { | ||
value = "${oci_core_subnet.director_subnet.compartment_id}" | ||
} | ||
|
||
output ad { | ||
value = "${oci_core_subnet.director_subnet.availability_domain}" | ||
} | ||
|
||
output subnet_name { | ||
value = "${oci_core_subnet.director_subnet.display_name}" | ||
} | ||
output subnet_cidr { | ||
value = "${oci_core_subnet.director_subnet.cidr_block}" | ||
} | ||
|
||
output subnet_gw { | ||
value = "${cidrhost(oci_core_subnet.director_subnet.cidr_block, 1)}" | ||
} | ||
|
||
output subnet_first_ip { | ||
value = "${cidrhost(oci_core_subnet.director_subnet.cidr_block, 2)}" | ||
} | ||
|
||
output bats_subnet1_name { | ||
value = "${oci_core_subnet.bats_subnet1.display_name}" | ||
} | ||
|
||
output bats_subnet1_cidr { | ||
value = "${oci_core_subnet.bats_subnet1.cidr_block}" | ||
} | ||
|
||
output bats_subnet1_gw { | ||
value ="${cidrhost(oci_core_subnet.bats_subnet1.cidr_block, 1)}" | ||
} | ||
|
||
output bats_subnet1_reserved { | ||
value = "${cidrhost(oci_core_subnet.bats_subnet1.cidr_block, 2)} - ${cidrhost(oci_core_subnet.bats_subnet1.cidr_block, 9)}" | ||
} | ||
|
||
output bats_subnet1_static { | ||
value = "${cidrhost(oci_core_subnet.bats_subnet1.cidr_block, 10)} - ${cidrhost(oci_core_subnet.bats_subnet1.cidr_block, 30)}" | ||
} | ||
|
||
output bats_subnet1_static_ip { | ||
value = "${cidrhost(oci_core_subnet.bats_subnet1.cidr_block, 30)}" | ||
} | ||
|
||
output bats_subnet2_name { | ||
value = "${oci_core_subnet.bats_subnet2.display_name}" | ||
} | ||
|
||
output bats_subnet2_cidr { | ||
value = "${oci_core_subnet.bats_subnet2.cidr_block}" | ||
} | ||
|
||
output bats_subnet2_gw { | ||
value ="${cidrhost(oci_core_subnet.bats_subnet2.cidr_block, 1)}" | ||
} | ||
|
||
output bats_subnet2_reserved { | ||
value = "${cidrhost(oci_core_subnet.bats_subnet2.cidr_block, 2)} - ${cidrhost(oci_core_subnet.bats_subnet2.cidr_block, 9)}" | ||
} | ||
|
||
output bats_subnet2_static { | ||
value = "${cidrhost(oci_core_subnet.bats_subnet2.cidr_block, 10)} - ${cidrhost(oci_core_subnet.bats_subnet2.cidr_block, 30)}" | ||
} | ||
|
||
output bats_subnet2_static_ip { | ||
value = "${cidrhost(oci_core_subnet.bats_subnet2.cidr_block, 30)}" | ||
} | ||
|
||
/* | ||
output director_subnet { | ||
value = <<EOS | ||
{ | ||
"subnet_id" : "${oci_core_subnet.director_subnet.id}", | ||
"compartment_id" : "${oci_core_subnet.director_subnet.compartment_id}", | ||
"ad" : "${oci_core_subnet.director_subnet.availability_domain}", | ||
"vcn": "${var.director_vcn}", | ||
"subnet_name" : "${oci_core_subnet.director_subnet.display_name}", | ||
"subnet_cidr" : "${oci_core_subnet.director_subnet.cidr_block}", | ||
"subnet_gw" : "${cidrhost(oci_core_subnet.director_subnet.cidr_block, 1)}", | ||
"director_ip" : "${cidrhost(oci_core_subnet.director_subnet.cidr_block, 2)}" | ||
} | ||
EOS | ||
} | ||
*/ |
7 changes: 7 additions & 0 deletions
7
example/real_world_stuff/oracle/oracle%bosh-oracle-cpi-release%ci%terraform%providers.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
provider "oci" { | ||
tenancy_ocid = "${var.oracle_tenancy_ocid}" | ||
user_ocid = "${var.oracle_user_ocid}" | ||
fingerprint = "${var.oracle_fingerprint}" | ||
private_key_path = "${var.oracle_private_key_path}" | ||
region = "${var.oracle_region}" | ||
} |
32 changes: 32 additions & 0 deletions
32
example/real_world_stuff/oracle/oracle%bosh-oracle-cpi-release%ci%terraform%variables.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Authentication | ||
variable "oracle_tenancy_ocid" {} | ||
variable "oracle_user_ocid" {} | ||
variable "oracle_fingerprint" {} | ||
variable "oracle_private_key_path" {} | ||
|
||
# Compartment to create resources in | ||
variable "director_compartment_name" {} | ||
variable "director_vcn" {} | ||
|
||
# Cloud services | ||
variable oracle_region { | ||
default = "us-phoenix-1" | ||
} | ||
|
||
# Networking | ||
variable "vcn_cidr" { | ||
default = "10.0.0.0/16" | ||
} | ||
|
||
variable "director_subnet_cidr" { | ||
} | ||
|
||
variable "director_ad" { | ||
default = "WZYX:PHX-AD-1" | ||
} | ||
|
||
variable "bats_subnet1_cidr" { | ||
} | ||
|
||
variable "bats_subnet2_cidr" { | ||
} |
57 changes: 57 additions & 0 deletions
57
...ld_stuff/oracle/oracle%cloud-asset-appsul-terraform-samples%EBusinessSuite%datasources.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | ||
The Universal Permissive License (UPL), Version 1.0*/ | ||
|
||
|
||
# Get list of Availability Domains | ||
data "oci_identity_availability_domains" "ADs" { | ||
compartment_id = "${var.tenancy_ocid}" | ||
} | ||
|
||
# Get name of Availability Domains | ||
data "template_file" "deployment_ad" { | ||
count = "${length(var.AD)}" | ||
template = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[var.AD[count.index] - 1], "name")}" | ||
} | ||
|
||
# Get list of Fault Domains | ||
data "oci_identity_fault_domains" "fds" { | ||
count = "${length(var.AD)}" | ||
availability_domain = "${element(data.template_file.deployment_ad.*.rendered, count.index)}" | ||
compartment_id = "${var.compartment_ocid}" | ||
} | ||
|
||
locals { | ||
fds = "${flatten(concat(data.oci_identity_fault_domains.fds.*.fault_domains))}" | ||
faultdomains_per_ad = 3 | ||
} | ||
|
||
# Get name of Fault Domains | ||
data "template_file" "deployment_fd" { | ||
template = "$${name}" | ||
count = "${length(var.AD) * (local.faultdomains_per_ad) }" | ||
vars = { | ||
name = "${lookup(local.fds[count.index], "name")}" | ||
} | ||
} | ||
|
||
# Get latest Oracle Linux image | ||
data "oci_core_images" "InstanceImageOCID" { | ||
compartment_id = "${var.tenancy_ocid}" | ||
operating_system = "${var.InstanceOS}" | ||
operating_system_version = "${var.linux_os_version}" | ||
filter { | ||
name = "display_name" | ||
values = ["^.*Oracle[^G]*$"] | ||
regex = true | ||
} | ||
} | ||
|
||
# Get swift object storage name for Service Gateway | ||
data "oci_core_services" "svcgtw_services" { | ||
filter { | ||
name = "name" | ||
values = [".*Object.*Storage"] | ||
regex = true | ||
} | ||
} |
Oops, something went wrong.