terraform-google-lb-http icon indicating copy to clipboard operation
terraform-google-lb-http copied to clipboard

Feature/cloudarmor policies

Open vponnam opened this issue 3 years ago β€’ 1 comments

New cloudarmor_policies module and associated example and test-cases for managing security polices.

vponnam avatar May 18 '22 19:05 vponnam

Thanks for the PR! πŸš€
βœ… Lint checks have passed.

comment-bot-dev avatar May 18 '22 19:05 comment-bot-dev

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Oct 24 '22 23:10 github-actions[bot]

@vponnam Thanks for the PR! πŸš€ Unfortunately it looks like some of our CI checks failed. See the Contributing Guide for details.

  • ⚠️check_generate_modules The modules need to be regenerated. Please run make_build.
Checking submodule's files generation
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' /workspace/modules/cloudarmor_policies/README.md /tmp/tmp.PFHgcMyM4L/workspace/modules/cloudarmor_policies/README.md
36c36
< | project_id | ProjectID where policy is created. | `string` | n/a | yes |
---
> | project\_id | ProjectID where policy is created. | `string` | n/a | yes |
Error: submodule's files generation has not been run, please run the
'make build' command and commit changes
  • ⚠️check_documentation The documentation needs to be regenerated. Please run make generate_docs.
Checking for documentation generation
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=autogen' '--exclude=*.tfvars' '--exclude=*metadata.yaml' /workspace/modules/cloudarmor_policies/README.md /tmp/tmp.CcBGXWES3c/generate_docs/workspace/modules/cloudarmor_policies/README.md
36c36
< | project_id | ProjectID where policy is created. | `string` | n/a | yes |
---
> | project\_id | ProjectID where policy is created. | `string` | n/a | yes |
Error: Documentation generation has not been run, please run the
'make docker_generate_docs' command and commit the above changes.
  • ⚠️check_tflint Failed TFlint check. More details below.
Checking for tflint
Working in . ...
tflint passed . 
Working in ./examples/cloudarmor-policies ...
tflint passed ./examples/cloudarmor-policies 
Working in ./examples/cloudrun ...
tflint passed ./examples/cloudrun 
Working in ./examples/dynamic-backend ...
tflint passed ./examples/dynamic-backend 
Working in ./examples/https-gke ...
tflint passed ./examples/https-gke 
Working in ./examples/https-gke/gke-node-port ...
tflint passed ./examples/https-gke/gke-node-port 
Working in ./examples/https-redirect ...
tflint passed ./examples/https-redirect 
Working in ./examples/mig-nat-http-lb ...
tflint passed ./examples/mig-nat-http-lb 
Working in ./examples/multi-backend-multi-mig-bucket-https-lb ...
tflint passed ./examples/multi-backend-multi-mig-bucket-https-lb 
Working in ./examples/multi-mig-http-lb ...
tflint passed ./examples/multi-mig-http-lb 
Working in ./examples/multiple-certs ...
tflint passed ./examples/multiple-certs 
Working in ./examples/shared-vpc ...
tflint passed ./examples/shared-vpc 
Working in ./modules/cloudarmor_policies ...
3 issue(s) found:
Notice: `security_policy_id` output has no description (terraform_documented_outputs)
 on outputs.tf line 17:
 17: output "security_policy_id" {
Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.1.1/docs/rules/terraform_documented_outputs.md
Warning: variable "security_policies" is declared but not used (terraform_unused_declarations)
 on variables.tf line 17:
 17: variable "security_policies" {
Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.1.1/docs/rules/terraform_unused_declarations.md
Notice: `rules` variable has no description (terraform_documented_variables)
 on variables.tf line 23:
 23: variable "rules" {
Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.1.1/docs/rules/terraform_documented_variables.md
tflint failed ./modules/cloudarmor_policies 
Working in ./modules/dynamic_backends ...
tflint passed ./modules/dynamic_backends 
Working in ./modules/serverless_negs ...
tflint passed ./modules/serverless_negs 
Skipping ./test/fixtures/cloudarmor-policies
Skipping ./test/fixtures/cloudrun
Skipping ./test/fixtures/https-redirect
Skipping ./test/fixtures/mig_nat
Skipping ./test/fixtures/multi_certs
Skipping ./test/fixtures/multi_mig
Skipping ./test/setup
  • ⚠️check_terraform Failed Terraform check. More details below.
Running terraform fmt
Running terraform validate
terraform_validate .
Success!
The configuration is valid.
terraform_validate ./examples/cloudarmor-policies
β•·
β”‚

Error: 
Missing required argument
β”‚

β”‚

 on main.tf line 17, in module "cloud_armor_security_policies":
β”‚

 17: module "cloud_armor_security_policies" 
{
β”‚

β”‚

The argument "project_id" is required, but no definition was found.
β•΅
β•·
β”‚

Error: 
Unsupported argument
β”‚

β”‚

 on main.tf line 19, in module "cloud_armor_security_policies":
β”‚

 19:   
project
= var.project_id
β”‚

β”‚

An argument named "project" is not expected here.
β•΅
terraform_validate ./examples/cloudrun
Success!
The configuration is valid.
terraform_validate ./examples/dynamic-backend
Success!
The configuration is valid.
terraform_validate ./examples/https-gke
Success!
The configuration is valid.
terraform_validate ./examples/https-gke/gke-node-port
Success!
The configuration is valid.
terraform_validate ./examples/https-redirect
Success!
The configuration is valid.
terraform_validate ./examples/mig-nat-http-lb
Success!
The configuration is valid.
terraform_validate ./examples/multi-backend-multi-mig-bucket-https-lb
Success!
The configuration is valid.
terraform_validate ./examples/multi-mig-http-lb
Success!
The configuration is valid.
terraform_validate ./examples/multiple-certs
Success!
The configuration is valid.
terraform_validate ./examples/shared-vpc
Success!
The configuration is valid.
terraform_validate ./modules/cloudarmor_policies
Success!
The configuration is valid.
terraform_validate ./modules/dynamic_backends
Success!
The configuration is valid.
terraform_validate ./modules/serverless_negs
Success!
The configuration is valid.
terraform_validate ./test/fixtures/cloudarmor-policies
β•·
β”‚

Error: 
Missing required argument
β”‚

β”‚

 on ../../../examples/cloudarmor-policies/main.tf line 17, in module "cloud_armor_security_policies":
β”‚

 17: module "cloud_armor_security_policies" 
{
β”‚

β”‚

The argument "project_id" is required, but no definition was found.
β•΅
β•·
β”‚

Error: 
Unsupported argument
β”‚

β”‚

 on ../../../examples/cloudarmor-policies/main.tf line 19, in module "cloud_armor_security_policies":
β”‚

 19:   
project
= var.project_id
β”‚

β”‚

An argument named "project" is not expected here.
β•΅
terraform_validate ./test/fixtures/cloudrun
Success!
The configuration is valid.
terraform_validate ./test/fixtures/https-redirect
Success!
The configuration is valid.
terraform_validate ./test/fixtures/mig_nat
Success!
The configuration is valid.
terraform_validate ./test/fixtures/multi_certs
Success!
The configuration is valid.
terraform_validate ./test/fixtures/multi_mig
Success!
The configuration is valid.
terraform_validate ./test/setup
Success!
The configuration is valid.

comment-bot-dev avatar Jan 17 '23 19:01 comment-bot-dev

@bharathkkb Can we close this PR since we have a dedicated cloud armor module https://registry.terraform.io/modules/GoogleCloudPlatform/cloud-armor/google/latest

imrannayer avatar Jan 20 '23 20:01 imrannayer

Sorry, this has been a long pending PR and wasn't able to take this to the finish line w.r.t other priorities. Happy to close the this PR for now and re-evaluate any potential additions w.r.t the dedicated module at a later time.

vponnam avatar Jan 21 '23 02:01 vponnam