Skip to content

Commit

Permalink
add lke module
Browse files Browse the repository at this point in the history
See #4

@edwardtheharris - [email protected]

Xander Harris

Changelog: changed
  • Loading branch information
edwardtheharris committed Apr 5, 2024
1 parent bf4865f commit 521ee1c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 29 deletions.
12 changes: 6 additions & 6 deletions aks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ No required inputs.

The following input variables are optional (have default values):

### aks\_cluster\_name
### aks_cluster_name

Description: n/a

Expand All @@ -66,39 +66,39 @@ Type: `string`

Default: `""`

### node\_count
### node_count

Description: n/a

Type: `number`

Default: `1`

### resource\_group\_name
### resource_group_name

Description: n/a

Type: `string`

Default: `"tf-aks-gh"`

### sp\_client\_id
### sp_client_id

Description: n/a

Type: `string`

Default: `""`

### sp\_client\_secret
### sp_client_secret

Description: n/a

Type: `string`

Default: `""`

### vm\_size
### vm_size

Description: n/a

Expand Down
2 changes: 1 addition & 1 deletion aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variable "location" {

variable "member" {
default = ""
type = string
type = string
}

variable "node_count" {
Expand Down
14 changes: 3 additions & 11 deletions eks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,30 @@ No required inputs.

The following input variables are optional (have default values):

### AWS\_ACCESS\_KEY\_ID
### AWS_ACCESS_KEY_ID

Description: Access key ID

Type: `string`

Default: `""`

### AWS\_SECRET\_ACCESS\_KEY
### AWS_SECRET_ACCESS_KEY

Description: AWS secret access key

Type: `string`

Default: `""`

### aws\_region
### aws_region

Description: The region in which the EKS cluster will be deployed.

Type: `string`

Default: `"us-west-2"`

### member

Description: n/a

Type: `string`

Default: `""`

## Outputs

The following outputs are exported:
Expand Down
6 changes: 3 additions & 3 deletions gke/function.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ resource "google_cloudfunctions_function" "hello-world" {

# IAM entry for members to invoke the function
resource "google_cloudfunctions_function_iam_binding" "binding" {
project = google_cloudfunctions_function.hello-world.project
region = google_cloudfunctions_function.hello-world.region
project = google_cloudfunctions_function.hello-world.project
region = google_cloudfunctions_function.hello-world.region
cloud_function = google_cloudfunctions_function.hello-world.name
role = "roles/viewer"
role = "roles/viewer"
members = [
var.cf_member,
]
Expand Down
4 changes: 2 additions & 2 deletions gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ resource "google_container_cluster" "primary" {

private_cluster_config {
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
}
# We can't create a cluster with no node pool defined, but we want to only use
# separately managed node pools. So we create the smallest possible default
Expand Down
4 changes: 2 additions & 2 deletions gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ variable "AWS_SECRET_ACCESS_KEY" {
}

variable "cf_member" {
default = ""
default = ""
description = "Function executor"
}

variable "project_id" {
default = ""
description = "Google Cloud Project ID"
type = string
type = string
}

variable "region" {
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ module "eks" {
}

module "gke" {
cf_member = var.cf_member
cf_member = var.cf_member
project_id = var.project_id
region = var.region
source = "./gke"
region = var.region
source = "./gke"
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variable "AWS_SECRET_ACCESS_KEY" {
}

variable "cf_member" {
default = ""
default = ""
description = "Cloud Function invoker"
}

Expand Down

0 comments on commit 521ee1c

Please sign in to comment.