Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Terrafrom 0.12 #10

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

ivankorn
Copy link
Contributor

@ivankorn ivankorn commented Jul 31, 2019

Fixes #4, fixes #5, fixes #6, fixes #7, fixes #8

  • Migrated to terraform 0.12 syntax
  • Added variables type validation.
  • Added provider version restriction.
  • Added/upgraded helper functions
  • Replaced MD markers for doc generator, removed old script
  • Bumbed version, updaed CHANGELOG and README
  • Upgraded tf validator and md doc generator fucntions to latest versions.
  • Added versions.tf with restriction to TF 0.12
  • Fixed linters calls, Makefile and linters bug reported in Fix linter warnings and related makefile bug #5
  • Fixed broken docker image variables reported in Fix broken docker image variable #6
  • Upgraded to new docker image
  • Fixed make create | converge | verify | dsetroy calls reported in Fix make docker_create #8
  • Removed docker checks which are now deprecated as well as hadolint issue

@ivankorn
Copy link
Contributor Author

integration tests run is all green

bash-4.4# kitchen create
-----> Starting Kitchen (v1.24.0)
-----> Creating <minimal-local>...
       Terraform v0.12.3
       + provider.google v2.11.0
       
       Your version of Terraform is out of date! The latest version
       is 0.12.5. You can update by downloading from www.terraform.io/downloads.html
$$$$$$ Running command `terraform init -input=false -lock=true -lock-timeout=0s  -upgrade -force-copy -backend=true  -get=true -get-plugins=true -verify-plugins=true` in directory /cft/workdir/test/fixtures/minimal
       Upgrading modules...
       - memstore in ../../..
       
       Initializing the backend...
       
       Initializing provider plugins...
       
       The following providers do not have any version constraints in configuration,
       so the latest version was installed.
       
       To prevent automatic upgrades to new major versions that may contain breaking
       changes, it is recommended to add version = "..." constraints to the
       corresponding provider blocks in configuration, with the constraint strings
       suggested below.
       
       * provider.google: version = "~> 2.11"
       
       Terraform has been successfully initialized!
$$$$$$ Running command `terraform workspace select kitchen-terraform-minimal-local` in directory /cft/workdir/test/fixtures/minimal
       
       Workspace "kitchen-terraform-minimal-local" doesn't exist.
       
       You can create this workspace with the "new" subcommand.
$$$$$$ Running command `terraform workspace new kitchen-terraform-minimal-local` in directory /cft/workdir/test/fixtures/minimal
       Created and switched to workspace "kitchen-terraform-minimal-local"!
       
       You're now on a new, empty workspace. Workspaces isolate their state,
       so if you run "terraform plan" Terraform will not see any existing state
       for this configuration.
       Finished creating <minimal-local> (0m1.30s).
-----> Kitchen is finished. (0m2.69s)
bash-4.4# kitchen converge
-----> Starting Kitchen (v1.24.0)
-----> Converging <minimal-local>...
       Terraform v0.12.3
       + provider.google v2.11.0
       
       Your version of Terraform is out of date! The latest version
       is 0.12.5. You can update by downloading from www.terraform.io/downloads.html
$$$$$$ Running command `terraform workspace select kitchen-terraform-minimal-local` in directory /cft/workdir/test/fixtures/minimal
$$$$$$ Running command `terraform get -update` in directory /cft/workdir/test/fixtures/minimal
       - memstore in ../../..
$$$$$$ Running command `terraform validate   ` in directory /cft/workdir/test/fixtures/minimal
       Success! The configuration is valid.
       
$$$$$$ Running command `terraform apply -lock=true -lock-timeout=0s -input=false -auto-approve=true  -parallelism=10 -refresh=true  ` in directory /cft/workdir/test/fixtures/minimal
       module.memstore.google_project_service.redis[0]: Creating...
       module.memstore.google_project_service.redis[0]: Still creating... [10s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [20s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [30s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [40s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [50s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [1m0s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [1m10s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [1m20s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [1m30s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [1m40s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [1m50s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [2m0s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [2m10s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [2m20s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [2m30s elapsed]
       module.memstore.google_project_service.redis[0]: Still creating... [2m40s elapsed]
       module.memstore.google_project_service.redis[0]: Creation complete after 2m48s [id=gl-ivankorniienko-seed/redis.googleapis.com]
       module.memstore.google_redis_instance.default: Creating...
       module.memstore.google_redis_instance.default: Still creating... [10s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [20s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [30s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [40s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [50s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [1m0s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [1m10s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [1m20s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [1m30s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [1m40s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [1m50s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [2m0s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [2m10s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [2m20s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [2m30s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [2m40s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [2m50s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [3m0s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [3m10s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [3m20s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [3m30s elapsed]
       module.memstore.google_redis_instance.default: Still creating... [3m40s elapsed]
       module.memstore.google_redis_instance.default: Creation complete after 3m43s [id=gl-ivankorniienko-seed/us-east1/test-minimal]
       
       Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
       
       Outputs:
       
       credentials_path = /cft/workdir/credentials.json
       location_id = us-east1-b
       memory_size_gb = 1
       name = test-minimal
       output_current_location_id = us-east1-b
       output_host = 10.0.0.4
       output_id = gl-ivankorniienko-seed/us-east1/test-minimal
       output_region = us-east1
       project_id = gl-ivankorniienko-seed
       region = us-east1
       Finished converging <minimal-local> (6m32.26s).
-----> Kitchen is finished. (6m33.65s)
bash-4.4# kitchen verify 
-----> Starting Kitchen (v1.24.0)
-----> Setting up <minimal-local>...
       Finished setting up <minimal-local> (0m0.00s).
-----> Verifying <minimal-local>...
$$$$$$ Running command `terraform workspace select kitchen-terraform-minimal-local` in directory /cft/workdir/test/fixtures/minimal
$$$$$$ Running command `terraform output -json` in directory /cft/workdir/test/fixtures/minimal
minimal: Verifying

Profile: minimal
Version: (not specified)
Target:  local://

  ✔  redis-instance: Command: `gcloud redis instances describe test-minimal --project=gl-ivankorniienko-seed --region=us-east1 --format=json`
     ✔  Command: `gcloud redis instances describe test-minimal --project=gl-ivankorniienko-seed --region=us-east1 --format=json` should include {:memorySizeGb => 1}
     ✔  Command: `gcloud redis instances describe test-minimal --project=gl-ivankorniienko-seed --region=us-east1 --format=json` exit_status should eq 0
     ✔  Command: `gcloud redis instances describe test-minimal --project=gl-ivankorniienko-seed --region=us-east1 --format=json` stderr should eq ""

  Outputs
     ✔  should reflect inputted variables
     ✔  should have a valid host ip
     ✔  should have a valid id

Profile Summary: 1 successful control, 0 control failures, 0 controls skipped
Test Summary: 6 successful, 0 failures, 0 skipped
       Finished verifying <minimal-local> (0m1.88s).
-----> Kitchen is finished. (0m3.30s)
bash-4.4# 
bash-4.4# kitchen destroy
-----> Starting Kitchen (v1.24.0)
-----> Destroying <minimal-local>...
       Terraform v0.12.3
       + provider.google v2.5.1
       
       Your version of Terraform is out of date! The latest version
       is 0.12.5. You can update by downloading from www.terraform.io/downloads.html
$$$$$$ Running command `terraform init -input=false -lock=true -lock-timeout=0s  -force-copy -backend=true  -get=true -get-plugins=true -verify-plugins=true` in directory /cft/workdir/test/fixtures/minimal
       Initializing modules...
       
       Initializing the backend...
       
       Initializing provider plugins...
       
       Terraform has been successfully initialized!
$$$$$$ Running command `terraform workspace select kitchen-terraform-minimal-local` in directory /cft/workdir/test/fixtures/minimal
$$$$$$ Running command `terraform destroy -auto-approve -lock=true -lock-timeout=0s -input=false  -parallelism=10 -refresh=true  ` in directory /cft/workdir/test/fixtures/minimal
       module.memstore.google_project_service.redis[0]: Refreshing state... [id=gl-ivankorniienko-seed/redis.googleapis.com]
       module.memstore.google_redis_instance.default: Refreshing state... [id=gl-ivankorniienko-seed/us-east1/test-minimal]
       module.memstore.google_redis_instance.default: Destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 10s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 20s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 30s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 40s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 50s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 1m0s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 1m10s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 1m20s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 1m30s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 1m40s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 1m50s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 2m0s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 2m10s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 2m20s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 2m30s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 2m40s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 2m50s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 3m0s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 3m10s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 3m20s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 3m30s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 3m40s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 3m50s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 4m0s elapsed]
       module.memstore.google_redis_instance.default: Still destroying... [id=gl-ivankorniienko-seed/us-east1/test-minimal, 4m10s elapsed]
       module.memstore.google_redis_instance.default: Destruction complete after 4m12s
       module.memstore.google_project_service.redis[0]: Destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com]
       module.memstore.google_project_service.redis[0]: Still destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com, 10s elapsed]
       module.memstore.google_project_service.redis[0]: Still destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com, 20s elapsed]
       module.memstore.google_project_service.redis[0]: Still destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com, 30s elapsed]
       module.memstore.google_project_service.redis[0]: Still destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com, 40s elapsed]
       module.memstore.google_project_service.redis[0]: Still destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com, 50s elapsed]
       module.memstore.google_project_service.redis[0]: Still destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com, 1m0s elapsed]
       module.memstore.google_project_service.redis[0]: Still destroying... [id=gl-ivankorniienko-seed/redis.googleapis.com, 1m10s elapsed]
       module.memstore.google_project_service.redis[0]: Destruction complete after 1m10s
       
       Destroy complete! Resources: 2 destroyed.
$$$$$$ Running command `terraform workspace select default` in directory /cft/workdir/test/fixtures/minimal
       Switched to workspace "default".
$$$$$$ Running command `terraform workspace delete kitchen-terraform-minimal-local` in directory /cft/workdir/test/fixtures/minimal
       Deleted workspace "kitchen-terraform-minimal-local"!
       Finished destroying <minimal-local> (5m32.60s).
-----> Kitchen is finished. (5m34.27s)

@ivankorn
Copy link
Contributor Author

ivankorn commented Jul 31, 2019

out of scope linters to be addressed in #5 terraform checks are all ok

Please note Docker and Python warnings in scope of #5

[16:56][user@host:~/workspace/google/terraform-google-memorystore]$ make -s
Running shellcheck
Running flake8
./test/verify_boilerplate.py:56:15: N803 argument name 'ARGS' should be lowercase
./test/verify_boilerplate.py:184:28: N803 argument name 'ARGS' should be lowercase
Running go fmt and go vet
Running terraform fmt
terraform fmt -diff -check=true -write=false . 
terraform fmt -diff -check=true -write=false ./examples/basic 
terraform fmt -diff -check=true -write=false ./test/fixtures/minimal 
Running terraform validate
helpers/terraform_validate . 

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./examples/basic 
Initializing modules...
Downloading git::ssh://git@github.com/terraform-google-modules/terraform-google-memorystore for memorystore...
- memorystore in .terraform/modules/memorystore

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "google" (terraform-providers/google) 2.11.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.google: version = "~> 2.11"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./test/fixtures/minimal 
Initializing modules...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

Running hadolint on Dockerfiles
/dev/stdin:17 DL3006 Always tag the version of an image explicitly
/dev/stdin:23 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
/dev/stdin:17 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
/dev/stdin:35 DL3003 Use WORKDIR to switch to a directory
/dev/stdin:51 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
/dev/stdin:75 DL3003 Use WORKDIR to switch to a directory
make: *** [Makefile:61: check_docker] Error 1
[16:57][user@host:~/workspace/google/terraform-google-memorystore]$ 

With hadolint disabled lineters fail only Python check #5

[16:58][user@host:~/workspace/google/terraform-google-memorystore]$ make -s
Running shellcheck
Running flake8
./test/verify_boilerplate.py:56:15: N803 argument name 'ARGS' should be lowercase
./test/verify_boilerplate.py:184:28: N803 argument name 'ARGS' should be lowercase
Running go fmt and go vet
Running terraform fmt
terraform fmt -diff -check=true -write=false . 
terraform fmt -diff -check=true -write=false ./examples/basic 
terraform fmt -diff -check=true -write=false ./test/fixtures/minimal 
Running terraform validate
helpers/terraform_validate . 

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./examples/basic 
Initializing modules...
Downloading git::ssh://git@github.com/terraform-google-modules/terraform-google-memorystore for memorystore...
- memorystore in .terraform/modules/memorystore

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "google" (terraform-providers/google) 2.11.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.google: version = "~> 2.11"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./test/fixtures/minimal 
Initializing modules...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

Running hadolint on Dockerfiles
skipping hadolint check
skipping hadolint check
Checking for required files
Testing the validity of the header check
Checking file headers
Checking file headers
The following lines have trailing whitespace
Generating markdown docs with terraform-docs
Skipping ./examples/basic because README.md does not exist.
[16:58][user@host:~/workspace/google/terraform-google-memorystore]$ 

@ingwarr
Copy link

ingwarr commented Jul 31, 2019

@ivankorn As I know we should use standard Docker images, so I think we should delete the directory build with dockerfiles and appropriate tests in test/make.sh and Makefile should be disabled. So hadolint issue is outdated

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
test/make.sh Outdated Show resolved Hide resolved
@ivankorn
Copy link
Contributor Author

@ivankorn As I know we should use standard Docker images, so I think we should delete the directory build with dockerfiles and appropriate tests in test/make.sh and Makefile should be disabled. So hadolint issue is outdated

Thank you for raising this, @ingwarr ! I've removed all the deprecated code and updated our migration checklist to reflect the same.

@ivankorn ivankorn self-assigned this Jul 31, 2019
@ivankorn ivankorn added the enhancement New feature or request label Jul 31, 2019
@ivankorn
Copy link
Contributor Author

updated linter checks:

[01:09][user@host:~/workspace/google/terraform-google-memorystore]$ make -s
Running shellcheck
Running flake8
Running go fmt and go vet
Running terraform fmt
terraform fmt -diff -check=true -write=false . 
terraform fmt -diff -check=true -write=false ./examples/basic 
terraform fmt -diff -check=true -write=false ./test/fixtures/minimal 
Running terraform validate
helpers/terraform_validate . 

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./examples/basic 
Initializing modules...

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.google: version = "~> 2.11"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./test/fixtures/minimal 
Initializing modules...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

Testing the validity of the header check
Checking file headers
Checking file headers
Checking for trailing whitespace
Generating markdown docs with terraform-docs
Skipping ./examples/basic because README.md does not exist.

@ingwarr
Copy link

ingwarr commented Jul 31, 2019

I think it ready for the next round of review

Copy link

@ingwarr ingwarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it ready

@ivankorn
Copy link
Contributor Author

ivankorn commented Aug 1, 2019

@ingwarr @kopachevsky , thank you for review! Publishing

@aaron-lane aaron-lane self-assigned this Sep 5, 2019
main.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
- Migrated to terraform 0.12 syntax
- Added variables type validation.
- Added provider version restriction.
- Added/upgraded helper functions
- Replaced MD markers for doc generator, removed old script
- Bumbed version, updaed CHANGELOG and README
- Upgraded tf validator and md doc generator fucntions to latest versions.
- Added versions.tf with restriction to TF 0.12
- Fixed linters calls, Makefile and linters bug reported in terraform-google-modules#5
- Fixed broken docker image variables reported in terraform-google-modules#6
- Upgraded to new docker image
- Fixed `make create | converge | verify | dsetroy` calls  reported in terraform-google-modules#8
- Removed docker checks which are now deprecated as well as [hadolint issue](terraform-google-modules/terraform-google-project-factory#252)
@ivankorn
Copy link
Contributor Author

Linters re-run:

[17:44][user@host:~/workspace/google/terraform-google-memorystore]$ make -s
Running shellcheck
Running flake8
Running go fmt and go vet
Running terraform fmt
terraform fmt -diff -check=true -write=false . 
terraform fmt -diff -check=true -write=false ./examples/basic 
terraform fmt -diff -check=true -write=false ./test/fixtures/minimal 
Running terraform validate
helpers/terraform_validate . 

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.google: version = "~> 2.5"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./examples/basic 
Initializing modules...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

helpers/terraform_validate ./test/fixtures/minimal 
Initializing modules...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Success! The configuration is valid.

Testing the validity of the header check
Checking file headers
Checking file headers
Checking for trailing whitespace
Generating markdown docs with terraform-docs
Skipping ./examples/basic because README.md does not exist.
[17:44][user@host:~/workspace/google/terraform-google-memorystore]$ 

@aaron-lane aaron-lane merged commit d66cf75 into terraform-google-modules:master Sep 24, 2019
pkatsovich pushed a commit to recurly/terraform-google-memorystore that referenced this pull request Aug 2, 2020
…modules/ludo-cloudbuild

CI: Cloud Build linting trigger configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants