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

fix: Documentation language inconsistencies, typos and tests #419

Merged

Conversation

vovinacci
Copy link
Contributor

@vovinacci vovinacci commented Apr 13, 2021

This PR:

  • Fixes documentation language inconsistencies and typos.
  • Fixes license header in 3-networks/modules/transitivity/assets/gw.yaml
  • Removes double IntelliJ IDEA .idea directory mention in .gitignore.
  • Pins terraform-google-lb-internal module version to 2.4.0
  • Adds missing health check logging toggle attribute in terraform-google-lb-internal

- Fix documentation language inconsistencies and typos
- Remove double IntelliJ IDEA files mention in `.gitignore`
@vovinacci vovinacci requested review from bharathkkb, rjerrems and a team as code owners April 13, 2021 12:16
@vovinacci
Copy link
Contributor Author

Linter check is failing, however running make docker_test_lint locally looks good. I don't have access to the failed tests run, could you please advice on what went wrong? Many thanks in advance!

P.S. Additional complains are logged in #420, however it should not affect linter check.

@daniel-cit
Copy link
Contributor

Hi @vovinacci thanks for the PR.

All three checks failed because of the issue you reported:

Step #1 - "lint": terraform_validate ./3-networks/modules/transitivity 
Step #1 - "lint": 
Step #1 - "lint": Error: Invalid value for module argument
Step #1 - "lint": 
Step #1 - "lint":   on main.tf line 97, in module "ilbs":
Step #1 - "lint":   97:   health_check = {
Step #1 - "lint":   98:     type                = "tcp"
Step #1 - "lint":   99:     check_interval_sec  = 5
Step #1 - "lint":  100:     healthy_threshold   = 4
Step #1 - "lint":  101:     timeout_sec         = 1
Step #1 - "lint":  102:     unhealthy_threshold = 5
Step #1 - "lint":  103:     response            = null
Step #1 - "lint":  104:     proxy_header        = "NONE"
Step #1 - "lint":  105:     port                = 22
Step #1 - "lint":  106:     port_name           = null
Step #1 - "lint":  107:     request             = null
Step #1 - "lint":  108:     request_path        = null
Step #1 - "lint":  109:     host                = null
Step #1 - "lint":  110:   }
Step #1 - "lint": 
Step #1 - "lint": The given value is not suitable for child module variable "health_check"
Step #1 - "lint": defined at .terraform/modules/ilbs/variables.tf:73,1-24: attribute
Step #1 - "lint": "enable_log" is required.

It looks like that the cause is not having a pinned version in the module call

together with the latest change in the terraform-google-lb-internal module:

terraform-google-modules/terraform-google-lb-internal#49

variable "health_check" {
  description = "Health check to determine whether instances are responsive and able to do work"
  type = object({
    type                = string
    check_interval_sec  = number
    healthy_threshold   = number
    timeout_sec         = number
    unhealthy_threshold = number
    response            = string
    proxy_header        = string
    port                = number
    port_name           = string
    request             = string
    request_path        = string
    host                = string
    enable_log          = bool <<<<<<<
  })
}

@daniel-cit
Copy link
Contributor

@vovinacci
I would suggest to pin the module to the latest release 2.4.0
https://github.com/terraform-google-modules/terraform-google-lb-internal/releases/tag/v2.4.0
and later add the enable_log when the change get into the next release.

Could you please test if it works if the module is pinned to version 2.4.0?

@bharathkkb @rjerrems what do you think?

@vovinacci
Copy link
Contributor Author

@daniel-cit Thanks very much for your quick reply.

I've pinned terraform-google-lb-internal to 2.4.0 (including module name fix to be able to pin the version) and added missing attribute along with health_check_enable_log variable. By default it's false and it's not set anywhere outside of the module. Hope that's fine with you.

Tests are back to green, module seems to be working fine.

@bharathkkb @rjerrems

@vovinacci vovinacci changed the title fix: Documentation language inconsistencies and typos fix: Documentation language inconsistencies typos, pin terraform-google-lb-internal version to 2.4.0 Apr 13, 2021
@vovinacci vovinacci changed the title fix: Documentation language inconsistencies typos, pin terraform-google-lb-internal version to 2.4.0 fix: Documentation language inconsistencies typos, tests Apr 13, 2021
@vovinacci vovinacci changed the title fix: Documentation language inconsistencies typos, tests fix: Documentation language inconsistencies, typos and tests Apr 13, 2021
Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @vovinacci

@bharathkkb bharathkkb merged commit 71b633f into terraform-google-modules:master Apr 14, 2021
@vovinacci vovinacci deleted the fix-typos-20210413 branch April 14, 2021 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants