Skip to content

Commit 25d9442

Browse files
author
Nikita Dugar
authored
Merge pull request #8 from clouddrove/issue-3
Issue 3
2 parents 1a56599 + 9ab0b69 commit 25d9442

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

main.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource "tls_self_signed_cert" "ca" {
2525
organization = var.organization_name
2626
}
2727

28-
dns_names = ["clouddrove.com"]
28+
dns_names = var.dns_names
2929

3030
validity_period_hours = 87600
3131
is_ca_certificate = true
@@ -57,7 +57,7 @@ resource "tls_cert_request" "root" {
5757
organization = var.organization_name
5858
}
5959

60-
dns_names = ["clouddrove.com"]
60+
dns_names = var.dns_names
6161
}
6262

6363
resource "tls_locally_signed_cert" "root" {
@@ -98,7 +98,7 @@ resource "tls_cert_request" "server" {
9898
organization = var.organization_name
9999
}
100100

101-
dns_names = ["clouddrove.com"]
101+
dns_names = var.dns_names
102102
}
103103

104104
resource "tls_locally_signed_cert" "server" {
@@ -131,7 +131,9 @@ resource "aws_ec2_client_vpn_endpoint" "default" {
131131
client_cidr_block = var.cidr_block
132132

133133
authentication_options {
134-
type = "certificate-authentication"
134+
type = var.type
135+
saml_provider_arn = var.saml_arn
136+
self_service_saml_provider_arn = var.self_saml_arn
135137
root_certificate_chain_arn = join("", aws_acm_certificate.root.*.arn)
136138
}
137139

variables.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,28 @@ variable "network_cidr" {
8686
type = list(any)
8787
default = []
8888
description = "Client Network CIDR"
89+
}
90+
91+
variable "dns_names" {
92+
type = list(any)
93+
default = ["clouddrove.com"]
94+
description = "List of DNS names for which a certificate is being requested."
95+
}
96+
97+
variable "type" {
98+
type = string
99+
default = "certificate-authentication"
100+
description = "The type of client authentication to be used. "
101+
}
102+
103+
variable "saml_arn" {
104+
type = string
105+
default = ""
106+
description = "The ARN of the IAM SAML identity provider. "
107+
}
108+
109+
variable "self_saml_arn" {
110+
type = string
111+
default = ""
112+
description = "The ARN of the IAM SAML identity provider for the self service portal. "
89113
}

0 commit comments

Comments
 (0)