Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 31, 2024
1 parent 720439a commit 93fd3fc
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 34 deletions.
31 changes: 7 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,17 @@ repos:
args: ['--allow-missing-credentials']
- id: detect-private-key


- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shfmt
args: ['-l', '-i', '2', '-ci', '-sr', '-w']
- id: shellcheck

# Dockerfile linter
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
- id: hadolint
args: [
'--ignore', 'DL3007', # Using latest
'--ignore', 'DL3013', # Pin versions in pip
'--ignore', 'DL3027', # Do not use apt
'--ignore', 'DL3059', # Docker `RUN`s shouldn't be consolidated here
'--ignore', 'DL4006', # Not related to alpine
'--ignore', 'SC1091', # Useless check
'--ignore', 'SC2015', # Useless check
'--ignore', 'SC3037', # Not related to alpine
]

# JSON5 Linter
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
# https://prettier.io/docs/en/options.html#parser
files: '.json5$'

# Terraform Hooks
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.92.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
hooks:
- id: terraform_fmt
- id: terraform_docs
36 changes: 36 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"branches": [
"main",
"master"
],
"ci": false,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"successComment":
"This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
"labels": false,
"releasedLabels": false
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file."
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
],
"message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
1 change: 0 additions & 1 deletion cluster_admin_group.tf.disable
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ module "group_cluster-admin" {
var.tags,
)
}

1 change: 0 additions & 1 deletion cluster_admin_policies.tf.disable
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@ data "aws_iam_policy_document" "cluster-admin_assume_policy" {
resources = [module.role_cluster-admin.role_arn]
}
}

1 change: 0 additions & 1 deletion cluster_admin_roles.tf.disable
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ output "role_cluster-admin-role_arn" {
description = "Role ARN for EKS Cluster Admin Role"
value = module.role_cluster-admin.role_arn
}

4 changes: 2 additions & 2 deletions dns_zones.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------
# DNS Zone for EKS
# DNS Zone for EKS
#-------------------------------------------------
locals {
cluster_domain_name = format("%v.%v", var.cluster_name, var.vpc_domain_name)
Expand All @@ -9,7 +9,7 @@ locals {
zone_ids = compact(var.zone_ids)
}
#-------------------------------------------------
# Providers for Cross Account DNS Action
# Providers for Cross Account DNS Action
#-------------------------------------------------
provider "aws" {
alias = "route53_main_east"
Expand Down
2 changes: 1 addition & 1 deletion examples/testing/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ variable "tags" {
description = "AWS Tags to apply to appropriate resources"
type = map(string)
default = {}
}
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ locals {
# This is done especially since access entries are fairly course grained, especially given the granularity we can achieve via EKS native
# RBAC constructs in Roles and ClusterRoles and bindings.
# This below is just an example, in practice we'd notionally be creating a role (or multiple) specific to the cluster and setting policy
# to allow the cluster users to assume said role; but we need to spend some time parsing what exactly are the permissions we plan to hand
# to allow the cluster users to assume said role; but we need to spend some time parsing what exactly are the permissions we plan to hand
# out to these clusters.
access_entries = {
inf-admin-t2 = {
Expand Down
2 changes: 1 addition & 1 deletion node_ports.tf.disable
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ locals {
# type = "ingress"
# self = true
# }
# }
# }
1 change: 0 additions & 1 deletion security_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,3 @@ resource "aws_security_group" "additional_eks_cluster_sg" {
cidr_blocks = ["0.0.0.0/0"]
}
}

2 changes: 1 addition & 1 deletion sg_ports.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ locals {
# ipv6_cidr_blocks = var.cluster_ip_family == "ipv6" ? ["::/0"] : null
}
}
}
}

0 comments on commit 93fd3fc

Please sign in to comment.