Skip to content

Commit

Permalink
Update kubernetes provider configuration based on hashicorp/terraform…
Browse files Browse the repository at this point in the history
  • Loading branch information
John Titus committed Mar 30, 2021
1 parent cacef8f commit 50e4ff6
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 6 deletions.
35 changes: 33 additions & 2 deletions modules/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ Full working references are available at [examples](examples)

There should be no changes required to move from previous versions of this module to version 0.12.0 or higher.

## Requirements

| Name | Version |
|------|---------|
| terraform | >= 0.12 |
| aws | >= 2.7.0 |

## Providers

| Name | Version |
Expand All @@ -32,14 +39,39 @@ There should be no changes required to move from previous versions of this modul
| null | n/a |
| template | n/a |

## Modules

No Modules.

## Resources

| Name |
|------|
| [aws_ami](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/data-sources/ami) |
| [aws_cloudwatch_log_group](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/cloudwatch_log_group) |
| [aws_eks_cluster](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/eks_cluster) |
| [aws_iam_instance_profile](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/iam_instance_profile) |
| [aws_iam_policy](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/iam_policy) |
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/data-sources/iam_policy_document) |
| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/data-sources/iam_role) |
| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/iam_role) |
| [aws_iam_role_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/iam_role_policy_attachment) |
| [aws_instance](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/instance) |
| [aws_security_group](https://registry.terraform.io/providers/hashicorp/aws/2.7.0/docs/resources/security_group) |
| [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) |
| [template_file](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/file) |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:-----:|
|------|-------------|------|---------|:--------:|
| alb\_ingress\_controller\_enable | A boolean value that determines if IAM policies related to ALB ingress controller should be created. | `bool` | `true` | no |
| bastion\_security\_groups | Security groups for the Amazon Linux 2 bastion | `list(string)` | <pre>[<br> ""<br>]</pre> | no |
| bastion\_subnet | Public subnet to put the Amazon Linux 2 bastion in | `string` | `""` | no |
| bootstrap\_arguments | Any optional parameters for the EKS Bootstrapping script. This is ignored for all os's except Amazon EKS | `string` | `""` | no |
| bootstrap\_arguments\_windows | Any optional parameters for the EKS Bootstrapping script. This is ignored for all os's except Windows EKS | `string` | `""` | no |
| cluster\_autoscaler\_enable | A boolean value that determines if IAM policies related to cluster autoscaler should be created. | `bool` | `true` | no |
| create\_bastion | Create an Amazon 2 Linux bastion to access private cluster resources with kubectl | `bool` | `false` | no |
| enabled\_cluster\_log\_types | A list of the desired control plane logging to enable. All logs are enabled by default. | `list(string)` | <pre>[<br> "api",<br> "audit",<br> "authenticator",<br> "controllerManager",<br> "scheduler"<br>]</pre> | no |
| environment | Application environment for which this network is being created. Preferred value are Development, Integration, PreProduction, Production, QA, Staging, or Test | `string` | `"Development"` | no |
| kubernetes\_version | The desired Kubernetes version for your cluster. If you do not specify a value here, the latest version available in Amazon EKS is used. | `string` | `""` | no |
Expand Down Expand Up @@ -71,4 +103,3 @@ There should be no changes required to move from previous versions of this modul
| name | Assigned name of the EKS Cluster |
| setup | Default EKS bootstrapping script for Linux EC2 instances |
| setup\_windows | Default EKS bootstrapping script for Windows EC2 instances |

26 changes: 24 additions & 2 deletions modules/kubernetes_components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,39 @@ Full working references are available at [examples](examples)

There should be no changes required to move from previous versions of this module to version 0.12.0 or higher.

## Requirements

| Name | Version |
|------|---------|
| terraform | >= 0.12 |
| kubernetes | >= 1.1.0 |

## Providers

| Name | Version |
|------|---------|
| kubernetes | >= 1.1.0 |

## Modules

No Modules.

## Resources

| Name |
|------|
| [kubernetes_cluster_role](https://registry.terraform.io/providers/hashicorp/kubernetes/1.1.0/docs/resources/cluster_role) |
| [kubernetes_cluster_role_binding](https://registry.terraform.io/providers/hashicorp/kubernetes/1.1.0/docs/resources/cluster_role_binding) |
| [kubernetes_config_map](https://registry.terraform.io/providers/hashicorp/kubernetes/1.1.0/docs/resources/config_map) |
| [kubernetes_deployment](https://registry.terraform.io/providers/hashicorp/kubernetes/1.1.0/docs/resources/deployment) |
| [kubernetes_role](https://registry.terraform.io/providers/hashicorp/kubernetes/1.1.0/docs/resources/role) |
| [kubernetes_role_binding](https://registry.terraform.io/providers/hashicorp/kubernetes/1.1.0/docs/resources/role_binding) |
| [kubernetes_service_account](https://registry.terraform.io/providers/hashicorp/kubernetes/1.1.0/docs/resources/service_account) |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:-----:|
|------|-------------|------|---------|:--------:|
| alb\_ingress\_controller\_enable | A variable to control whether or not the ALB Ingress resources are enabled | `bool` | `true` | no |
| alb\_max\_api\_retries | Maximum number of times to retry the aws calls | `number` | `10` | no |
| cluster\_autoscaler\_cpu\_limits | CPU Limits for the CA Pod | `string` | `"100m"` | no |
Expand All @@ -49,4 +72,3 @@ There should be no changes required to move from previous versions of this modul
## Outputs

No output.

8 changes: 6 additions & 2 deletions tests/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ provider "aws" {
provider "kubernetes" {
version = "~> 1.13.0"

cluster_ca_certificate = base64decode(module.eks.certificate_authority_data)
host = module.eks.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks.certificate_authority[0].data)
host = data.aws_eks_cluster.eks.endpoint
load_config_file = false
token = data.aws_eks_cluster_auth.eks.token
}
Expand All @@ -24,6 +24,10 @@ provider "template" {
version = "~> 2.0"
}

data "aws_eks_cluster" "eks" {
name = module.eks.name
}

data "aws_eks_cluster_auth" "eks" {
name = module.eks.name
}
Expand Down

0 comments on commit 50e4ff6

Please sign in to comment.