-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
508 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
output "bastion_public_ip" { | ||
value = azurerm_linux_virtual_machine.bastion.public_ip_address | ||
} | ||
|
||
output "bastion_hostname" { | ||
value = azurerm_dns_a_record.bastion_dns_record.fqdn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "azurerm_dns_zone" "marxan" { | ||
name = var.domain | ||
resource_group_name = var.resource_group.name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output "dns_zone" { | ||
value = azurerm_dns_zone.marxan | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
variable "resource_group" { | ||
description = "The Azure resource group where the module will create its resources" | ||
} | ||
|
||
variable "domain" { | ||
description = "The domain name" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
kubernetes/modules/cert_manager/k8s_files/01_cluster-issuer.yaml.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: letsencrypt | ||
spec: | ||
acme: | ||
# You must replace this email address with your own. | ||
# Let's Encrypt will use this to contact you about expiring | ||
# certificates, and issues related to your account. | ||
email: ${email} | ||
# ACME server URL for Let’s Encrypt’s staging environment. | ||
# The staging environment will not issue trusted certificates but is | ||
# used to ensure that the verification process is working properly | ||
# before moving to production | ||
server: ${cert_server} | ||
privateKeySecretRef: | ||
# Secret resource used to store the account's private key. | ||
name: cluster-cert-issuer-account-key | ||
# Enable the HTTP-01 challenge provider | ||
# you prove ownership of a domain by ensuring that a particular | ||
# file is present at the domain | ||
solvers: | ||
- http01: | ||
ingress: | ||
class: azure/application-gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
resource "helm_release" "cert-manager" { | ||
name = "cert-manager" | ||
repository = "https://charts.jetstack.io" | ||
chart = "cert-manager" | ||
version = "1.7.1" | ||
|
||
namespace = "cert-manager" | ||
|
||
wait = false | ||
create_namespace = true | ||
|
||
set { | ||
name = "installCRDs" | ||
value = "true" | ||
} | ||
|
||
set { | ||
name = "startupapicheck.timeout" | ||
value = "5m" | ||
} | ||
} | ||
|
||
|
||
resource "kubectl_manifest" "alb_ingress_controller_main" { | ||
yaml_body = templatefile("${path.module}/k8s_files/01_cluster-issuer.yaml.tmpl", { | ||
email : var.email, | ||
cert_server : var.cert_server, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
variable "k8s_host" { | ||
description = "Hostname of the k8s cluster" | ||
type = string | ||
} | ||
|
||
variable "k8s_client_certificate" { | ||
description = "Client certificate for the k8s cluster" | ||
type = string | ||
} | ||
|
||
variable "k8s_client_key" { | ||
description = "Client key for the k8s cluster" | ||
type = string | ||
} | ||
|
||
variable "k8s_cluster_ca_certificate" { | ||
description = "Cluster CA certificate for the k8s cluster" | ||
type = string | ||
} | ||
|
||
variable "email" { | ||
description = "Email address to use for cert renovation warnings" | ||
type = string | ||
} | ||
|
||
variable "cert_server" { | ||
description = "Lets encrypt server URL" | ||
type = string | ||
default = "https://acme-v02.api.letsencrypt.org/directory" | ||
} |
Oops, something went wrong.