-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
docs: Update and standardize examples to follow conventions defined in pre-commit checks #424
Conversation
@@ -45,5 +17,4 @@ module "eks-cluster-with-import-vpc" { | |||
|
|||
vpc_id = data.terraform_remote_state.vpc_s3_backend.outputs.vpc_id | |||
private_subnet_ids = data.terraform_remote_state.vpc_s3_backend.outputs.private_subnets | |||
public_subnet_ids = data.terraform_remote_state.vpc_s3_backend.outputs.public_subnets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terraform validate gave this error when it was present:
│ Error: Unsupported argument
│
│ on main.tf line 20, in module "eks_cluster_with_import_vpc":
│ 20: public_subnet_ids = data.terraform_remote_state.vpc_s3_backend.outputs.public_subnets
│
│ An argument named "public_subnet_ids" is not expected here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @vara-bonthu , do we still need PR, are we still using pr-test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, you can remove the deploy/pr
folder and pr-test.yaml
github workflow. We can replace this with examples-tfplan-tests.yaml
github workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need the vpc-test.yml
and deploy/e2e/
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we don't need that as well. We may need to cleanup the existing VPC by running vpc-test-cleanup.yaml
workflow before removing the following files
vpc-test.yaml
, vpc-test-cleanup.yaml
e2e-test.yaml
and e2e-test-cleanup.yaml
. All these will be replaced with Terratest e2e-terratest.yaml
deploy/e2e/eks
and deploy/e2e/vpc
can be removed which is used by the above workflows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you @bryantbiggs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have added few questions.
You also added few empty outputs.tf
files for few add-ons. Is this for supporting pre-commit checks?
regarding the versions and outputs - because we are stating that these are modules then the tflint rules apply; specifically:
if you copy the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! E2E tests complete?
It's worth creating a tag before merging this PR
…gned to pre-commit tags
What does this PR do?
versions.tf
per conventions; this also aligns versions that are used to be consistent.tflint.hcl
file that wasn't enforcing lint rules, add rules to pre-commit to ensure conventions are enforcedterraform_docs
to ensure lockfile doesn't affect version shown in READMEsoutputs.tf
file per convention; add empty file where one is not present in the directoryTODO
for now since that is a breaking changeterraform_docs
replacement pattern so that pre-commit will update documentation on detected changes; this was not updating previously and the documentation was out of sync with the sourcekubernetes
,helm
, andkubectl
providers to useexec()
method per the Terraform provider docs. This follows same pattern used by the EKS service within thekubeconfig
file to ensure credentials are refreshed. This also removes the use of two data sourcesaws_eks_cluster_auth
andaws_eks_cluster
per exampleMotivation
More
pre-commit run -a
with this PRNote: Not all the PRs required examples and docs except a new pattern or add-on added.
For Moderators
Additional Notes