Skip to content

Commit

Permalink
Upgraded TF version to 14.3 + providers/modules to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Castéran authored and pcasteran committed Dec 22, 2020
1 parent d684f26 commit dc3086d
Show file tree
Hide file tree
Showing 21 changed files with 160 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ terraform graph | terraform-graph-beautifier \
## Input and outputs
The command performs the following:
1. Parsing of the Graphviz [Dot](https://www.graphviz.org/doc/info/lang.html) script generated by `terraform graph` from the standard input or the specified file (`--input` parameter).
1. Extraction of the graph of the Terraform configuration elements and their dependencies.
1. Extraction of the graph containing the Terraform configuration elements and their dependencies.
1. Generation of the result to the standard output or file (`--output` parameter). The following output types (`--output-type` parameter) are supported:
- **cyto-html** (default) : an HTML page using [Cytoscape.js](https://js.cytoscape.org/) to render the graph (see [example](doc/config1.html));
- **cyto-json** : a JSON document of the graph in the Cytoscape.js [format](https://js.cytoscape.org/#notation/elements-json) (see [example](doc/config1.json));
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module github.com/pcasteran/terraform-graph-beautifier

go 1.14
go 1.15

require (
github.com/awalterschulze/gographviz v2.0.1+incompatible
github.com/markbates/pkger v0.17.0
github.com/gobuffalo/here v0.6.2 // indirect
github.com/markbates/pkger v0.17.1
github.com/rs/zerolog v1.18.0
)
14 changes: 12 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gobuffalo/here v0.6.0 h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI=
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gobuffalo/here v0.6.2 h1:ZtCqC7F9ou3moLbYfHM1Tj+gwHGgWhjyRjVjsir9BE0=
github.com/gobuffalo/here v0.6.2/go.mod h1:D75Sq0p2BVHdgQu3vCRsXbg85rx943V19urJpqAVWjI=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/markbates/pkger v0.17.0 h1:RFfyBPufP2V6cddUyyEVSHBpaAnM1WzaMNyqomeT+iY=
github.com/markbates/pkger v0.17.0/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI=
github.com/markbates/pkger v0.17.1 h1:/MKEtWqtc0mZvu9OinB9UzVN9iYCwLWuyUv4Bw+PCno=
github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand All @@ -22,6 +26,8 @@ github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand All @@ -33,6 +39,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2 changes: 1 addition & 1 deletion pkged.go

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions samples/config1/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions samples/config1/noop/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
provider "null" {
}
8 changes: 8 additions & 0 deletions samples/config1/noop/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
null = {
source = "hashicorp/null"
version = "~> 3.0.0"
}
}
}
8 changes: 8 additions & 0 deletions samples/config1/random_file/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
provider "random" {
}

provider "local" {
}

provider "time" {
}
18 changes: 18 additions & 0 deletions samples/config1/random_file/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
terraform {
required_providers {
random = {
source = "hashicorp/random"
version = "~> 3.0.0"
}

local = {
source = "hashicorp/local"
version = "~> 2.0.0"
}

time = {
source = "hashicorp/time"
version = "~> 0.6.0"
}
}
}
3 changes: 0 additions & 3 deletions samples/config1/version.tf

This file was deleted.

3 changes: 3 additions & 0 deletions samples/config1/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.14.3"
}
27 changes: 27 additions & 0 deletions samples/gcp/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/gcp/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GCP sample configuration

Dummy configuration using some of the Google Cloud provided Terraform [modules](https://registry.terraform.io/modules/terraform-google-modules).
Dummy configuration using some Google Cloud provided Terraform [modules](https://registry.terraform.io/modules/terraform-google-modules).

Having a visual representation of these modules really shows how much they are complicated, due to the important amount of resources inside.
2 changes: 1 addition & 1 deletion samples/gcp/bigquery.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ locals {

module "bigquery" {
source = "terraform-google-modules/bigquery/google"
version = "~> 4.2"
version = "~> 4.3.0"

dataset_id = "raw"
dataset_name = "Raw data"
Expand Down
2 changes: 1 addition & 1 deletion samples/gcp/gcs.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "gcs_buckets" {
source = "terraform-google-modules/cloud-storage/google"
version = "~> 1.6"
version = "~> 1.7.2"
project_id = var.project_id
location = var.region
storage_class = "REGIONAL"
Expand Down
2 changes: 1 addition & 1 deletion samples/gcp/network.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "vpc" {
source = "terraform-google-modules/network/google"
version = "~> 2.3"
version = "~> 2.6.0"
project_id = var.project_id
network_name = var.network
routing_mode = "GLOBAL"
Expand Down
21 changes: 0 additions & 21 deletions samples/gcp/provider.tf

This file was deleted.

7 changes: 7 additions & 0 deletions samples/gcp/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
provider "google" {
# Credentials to use to provision the resources.
# No credentials specified : use the ones inferred from the execution environment.

# Default values to use for the resources created with this provider.
project = var.project_id
}
4 changes: 2 additions & 2 deletions samples/gcp/service_accounts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ locals {
// Use the old style v2.0 version that uses `count`.
module "service_accounts_v2" {
source = "terraform-google-modules/service-accounts/google"
version = "~> 2.0"
version = "~> 2.0.2"
project_id = var.project_id
prefix = local.service_accounts_prefix
names = ["foo", "bar"]
Expand All @@ -18,7 +18,7 @@ module "service_accounts_v2" {
// Use the new style v3.0 version that uses `for_each`.
module "service_accounts_v3" {
source = "terraform-google-modules/service-accounts/google"
version = "~> 3.0"
version = "~> 3.0.1"
project_id = var.project_id
prefix = local.service_accounts_prefix
names = ["baz"]
Expand Down
3 changes: 0 additions & 3 deletions samples/gcp/version.tf

This file was deleted.

10 changes: 10 additions & 0 deletions samples/gcp/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
terraform {
required_version = ">= 0.14.3"

required_providers {
google = {
source = "hashicorp/google"
version = "3.51.0"
}
}
}

0 comments on commit dc3086d

Please sign in to comment.