Comments (6)
I've just played around a little and got a few bugs fixed, but it seems to be more complicated as expected and one must also take into account comments, as well as brackets within strings. I keep you posted on the progress.
from pre-commit-terraform.
Is this the affecting line: https://github.com/terraform-aws-modules/terraform-aws-security-group/blob/master/variables.tf#L26 ?
from pre-commit-terraform.
I don't think so, but I also can't identify exactly which line makes the problem.
Here is the beginning of produced tf-file after awk
script:
description = var.description
description = var.description
description = var.rules[var.ingress_rules[count.index]][3]
description = var.rules[var.computed_ingress_rules[count.index]][3]
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = var.rules[var.egress_rules[count.index]][3]
description = var.rules[var.computed_egress_rules[count.index]][3]
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
description = lookup(
output "this_security_group_id" {
description = "The ID of the security group"
}
output "this_security_group_vpc_id" {
description = "The VPC ID"
}
output "this_security_group_owner_id" {
description = "The owner ID"
}
output "this_security_group_name" {
description = "The name of the security group"
}
output "this_security_group_description" {
description = "The description of the security group"
}
//output "this_security_group_ingress" {
//}
//output "this_security_group_egress" {
variable "rules" {
description = "Map of known security group rules (define as 'name' = ['from port', 'to port', 'protocol', 'description'])"
type = "map(list(any))"
...................
from pre-commit-terraform.
@antonbabenko I've added another version here: cytopia/docker-terraform-docs#13
I will still need to add all discovered edge cases in the test directory, so I can ensure this is stable for the currently discovered issues. Once it plays well, I'll update the PR at: cloudposse/build-harness#155
Feel free to copy the file over and see how it works in your projects
from pre-commit-terraform.
Update
I've tested main module, all sub-modules as well as all examples in https://github.com/terraform-aws-modules/terraform-aws-security-group/ very quickly via:
d=$(pwd); for i in $(/bin/ls); do if test -d $d/$i; then cd $d/$i; if ! docker run --rm -v $(pwd):/data cytopia/terraform-docs terraform-docs-012 md .;then exit 1;fi ; else echo $d/$i; fi done
Everything generates without any errors.
I am not sure what arguments you add to terraform-docs
, so you should probably test it via the pre-commit-terraform project and ensure no changes are present after the generation.
from pre-commit-terraform.
v1.15.0 has been released with the fix.
from pre-commit-terraform.
Related Issues (20)
- Custom Docker image - Pre-install pre-commit hooks inside image HOT 6
- mapfile: command not found in zsh HOT 4
- Add `terragrunt_providers_lock` hook HOT 11
- terraform_checkov hook fails in Docker container since version v1.83.5 HOT 5
- Checkov install silently fails during image build (and is also missing when pulling from ghcr.io) HOT 4
- Bash environment variable expansion not working for trivy HOT 26
- Provide non-root docker build HOT 4
- terraform validate: Force rerun `t init` when plugin cache is enabled and parrallelism conflit happens HOT 8
- Ability to use terraform_plan framework of checkov HOT 8
- [trivy/pre-commit] Terraform trivy configuration excludes .trivyignore files, forcing repetitive ignore statements HOT 7
- Windows Support / Rewrite hooks to Python HOT 11
- Quotation Marks in Environment Variables HOT 2
- Get docker image running in github action HOT 10
- [tf aws provider version] terraform_validate false negative on `aws_kinesis_firehose_delivery_stream.extended_s3_configuration.file_extension` HOT 3
- Add PATH to terraform_docs HOT 7
- [terraform outdated provider] New Data Source: aws_ecr_lifecycle_policy_document HOT 4
- Remove Political Banners from Repo
- [`trivy:ignore:` usage] Terraform Security Check AVD-AWS-0342 HOT 9
- Terragrunt validate-inputs hook? HOT 7
- Validate failing to upgrade lock file locally on version change HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pre-commit-terraform.