Skip to content

Commit 01dd47b

Browse files
committed
modularize
1 parent 228831a commit 01dd47b

34 files changed

+476
-103
lines changed

.terraform.lock.hcl

Lines changed: 24 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Deploy a platform on Google Cloud by setting up basic infrastructure using varia
3030

3131
- ~~You have to update your `ingress_hosts` A records in order to get traffic to your site. And to generate the SSL certificate.~~
3232
- You may need to modify the `certmanager` module to support your particular certificate needs. Current implementation uses [dns01 challenge solver with cloudflare](https://cert-manager.io/docs/configuration/acme/dns01/cloudflare/).
33+
- There is a bug with the `newrelic_cloud_gcp_link_account` resource https://github.com/newrelic/terraform-provider-newrelic/issues/2733
3334

3435
### Usage
3536

File renamed without changes.

apis/outputs.tf

Whitespace-only changes.

apis/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
variable "project_id" {
2+
type = string
3+
description = "GCP project id"
4+
}

certmanager.tf renamed to certmanager/main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ resource "kubernetes_namespace_v1" "cert_manager_namespace" {
33
metadata {
44
name = "cert-manager"
55
}
6-
7-
depends_on = [google_container_node_pool.primary_nodes]
86
}
97

108
# cert-manager dns01 challenge api key secret
@@ -62,5 +60,5 @@ module "cert_manager" {
6260
}
6361
}
6462

65-
depends_on = [google_container_node_pool.primary_nodes, kubernetes_secret_v1.cloudflare_api_token]
63+
depends_on = [kubernetes_secret_v1.cloudflare_api_token]
6664
}

certmanager/outputs.tf

Whitespace-only changes.

certmanager/variables.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
variable "cloudflare_api_key" {
2+
type = string
3+
description = "cloudflare api key for dns01 validation"
4+
}
5+
6+
variable "cluster_issuer_email" {
7+
type = string
8+
description = "email address for cert-manager"
9+
}
10+
11+
variable "cluster_issuer_private_key_secret_name" {
12+
type = string
13+
description = "eventual location of cert-manager tls key and cert"
14+
}
15+
16+
variable "cloudflare_email" {
17+
type = string
18+
description = "email address for cert-manager"
19+
}
20+
21+
variable "ingress_hosts" {
22+
type = map(map(string))
23+
description = "hostnames (domains) that will be used in certs and/or routing"
24+
}

clusters.tf renamed to clusters/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resource "google_container_cluster" "primary" {
44
location = var.project_region
55
node_locations = ["${var.project_region}-f"]
66

7-
network = google_compute_network.example.id
7+
network = var.example_network_id
88

99

1010
remove_default_node_pool = true

clusters/outputs.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "google_container_cluster_primary_name" {
2+
value = google_container_cluster.primary.name
3+
}

0 commit comments

Comments
 (0)