Skip to content

Commit

Permalink
Merge branch 'main' into migration/20240523
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha authored Sep 12, 2024
2 parents 8cfee10 + 58ca8a3 commit 6537df9
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 65 deletions.
54 changes: 0 additions & 54 deletions .github/auto-release.yml

This file was deleted.

Binary file modified .github/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ repository:
description: Terraform module for provisioning an EKS cluster
homepage: https://cloudposse.com/accelerate
topics: terraform, terraform-module, eks, aws, masters, kubernetes, k8s, hcl2, eks-cluster, eks-workers, fargate




7 changes: 4 additions & 3 deletions .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ permissions:
pull-requests: write
id-token: write
contents: write
statuses: write

jobs:
terraform-module:
test:
uses: cloudposse/.github/.github/workflows/shared-terraform-chatops.yml@main
secrets:
github_access_token: ${{ secrets.REPO_ACCESS_TOKEN }}
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/terratest') }}
secrets: inherit
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ Available targets:
| <a name="input_allowed_security_group_ids"></a> [allowed\_security\_group\_ids](#input\_allowed\_security\_group\_ids) | A list of IDs of Security Groups to allow access to the cluster. | `list(string)` | `[]` | no |
| <a name="input_associated_security_group_ids"></a> [associated\_security\_group\_ids](#input\_associated\_security\_group\_ids) | A list of IDs of Security Groups to associate the cluster with.<br>These security groups will not be modified. | `list(string)` | `[]` | no |
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
| <a name="input_bootstrap_self_managed_addons_enabled"></a> [bootstrap\_self\_managed\_addons\_enabled](#input\_bootstrap\_self\_managed\_addons\_enabled) | Manages bootstrap of default networking addons after cluster has been created | `bool` | `null` | no |
| <a name="input_cloudwatch_log_group_class"></a> [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS` | `string` | `null` | no |
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If provided, the KMS Key ID to use to encrypt AWS CloudWatch logs | `string` | `null` | no |
| <a name="input_cluster_attributes"></a> [cluster\_attributes](#input\_cluster\_attributes) | Override label module default cluster attributes | `list(string)` | <pre>[<br> "cluster"<br>]</pre> | no |
| <a name="input_cluster_depends_on"></a> [cluster\_depends\_on](#input\_cluster\_depends\_on) | If provided, the EKS will depend on this object, and therefore not be created until this object is finalized.<br>This is useful if you want to ensure that the cluster is not created before some other condition is met, e.g. VPNs into the subnet are created. | `any` | `null` | no |
Expand Down
2 changes: 2 additions & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
| <a name="input_allowed_security_group_ids"></a> [allowed\_security\_group\_ids](#input\_allowed\_security\_group\_ids) | A list of IDs of Security Groups to allow access to the cluster. | `list(string)` | `[]` | no |
| <a name="input_associated_security_group_ids"></a> [associated\_security\_group\_ids](#input\_associated\_security\_group\_ids) | A list of IDs of Security Groups to associate the cluster with.<br>These security groups will not be modified. | `list(string)` | `[]` | no |
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
| <a name="input_bootstrap_self_managed_addons_enabled"></a> [bootstrap\_self\_managed\_addons\_enabled](#input\_bootstrap\_self\_managed\_addons\_enabled) | Manages bootstrap of default networking addons after cluster has been created | `bool` | `null` | no |
| <a name="input_cloudwatch_log_group_class"></a> [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS` | `string` | `null` | no |
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If provided, the KMS Key ID to use to encrypt AWS CloudWatch logs | `string` | `null` | no |
| <a name="input_cluster_attributes"></a> [cluster\_attributes](#input\_cluster\_attributes) | Override label module default cluster attributes | `list(string)` | <pre>[<br> "cluster"<br>]</pre> | no |
| <a name="input_cluster_depends_on"></a> [cluster\_depends\_on](#input\_cluster\_depends\_on) | If provided, the EKS will depend on this object, and therefore not be created until this object is finalized.<br>This is useful if you want to ensure that the cluster is not created before some other condition is met, e.g. VPNs into the subnet are created. | `any` | `null` | no |
Expand Down
5 changes: 3 additions & 2 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ module "eks_cluster" {
cluster_encryption_config_kms_key_policy = var.cluster_encryption_config_kms_key_policy
cluster_encryption_config_resources = var.cluster_encryption_config_resources

addons = local.addons
addons_depends_on = [module.eks_node_group]
addons = local.addons
addons_depends_on = [module.eks_node_group]
bootstrap_self_managed_addons_enabled = var.bootstrap_self_managed_addons_enabled

access_entry_map = local.access_entry_map
access_config = {
Expand Down
6 changes: 6 additions & 0 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ variable "addons" {
description = "Manages [`aws_eks_addon`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) resources."
}

variable "bootstrap_self_managed_addons_enabled" {
description = "Manages bootstrap of default networking addons after cluster has been created"
type = bool
default = null
}

variable "private_ipv6_enabled" {
type = bool
default = false
Expand Down
2 changes: 2 additions & 0 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ resource "aws_iam_policy" "cluster_elb_service_role" {

name = "${module.label.id}-ServiceRole"
policy = one(data.aws_iam_policy_document.cluster_elb_service_role[*].json)

tags = module.this.tags
}

resource "aws_iam_role_policy_attachment" "cluster_elb_service_role" {
Expand Down
14 changes: 8 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ resource "aws_cloudwatch_log_group" "default" {
retention_in_days = var.cluster_log_retention_period
kms_key_id = var.cloudwatch_log_group_kms_key_id
tags = module.label.tags
log_group_class = var.cloudwatch_log_group_class
}

resource "aws_kms_key" "cluster" {
Expand All @@ -55,12 +56,13 @@ resource "aws_kms_alias" "cluster" {
resource "aws_eks_cluster" "default" {
#bridgecrew:skip=BC_AWS_KUBERNETES_1:Allow permissive security group for public access, difficult to restrict without a VPN
#bridgecrew:skip=BC_AWS_KUBERNETES_4:Let user decide on control plane logging, not necessary in non-production environments
count = local.enabled ? 1 : 0
name = module.label.id
tags = module.label.tags
role_arn = local.eks_service_role_arn
version = var.kubernetes_version
enabled_cluster_log_types = var.enabled_cluster_log_types
count = local.enabled ? 1 : 0
name = module.label.id
tags = module.label.tags
role_arn = local.eks_service_role_arn
version = var.kubernetes_version
enabled_cluster_log_types = var.enabled_cluster_log_types
bootstrap_self_managed_addons = var.bootstrap_self_managed_addons_enabled

access_config {
authentication_mode = var.access_config.authentication_mode
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ variable "cloudwatch_log_group_kms_key_id" {
default = null
}

variable "cloudwatch_log_group_class" {
type = string
description = "Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS`"
default = null
}

variable "addons" {
type = list(object({
addon_name = string
Expand Down Expand Up @@ -191,6 +197,12 @@ variable "addons_depends_on" {
default = null
}

variable "bootstrap_self_managed_addons_enabled" {
description = "Manages bootstrap of default networking addons after cluster has been created"
type = bool
default = null
}

variable "cluster_attributes" {
type = list(string)
description = "Override label module default cluster attributes"
Expand Down

0 comments on commit 6537df9

Please sign in to comment.