-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
53577b0
commit 0c76c2d
Showing
3 changed files
with
133 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Additional IP addresses example | ||
|
||
This example shows how to add additional IP addresses to the certifcate using the module. | ||
|
||
```hcl | ||
terraform { | ||
required_version = ">= 0.12.31" | ||
required_providers { | ||
google = { | ||
version = "~> 3.69" | ||
} | ||
} | ||
} | ||
provider "google" { | ||
project = var.project_id | ||
region = var.project_region | ||
} | ||
data "google_project" "project" {} | ||
resource "google_service_account" "test" { | ||
account_id = "test-account" | ||
} | ||
resource "google_compute_address" "test" { | ||
name = "test-ip" | ||
address_type = "EXTERNAL" | ||
} | ||
module "tls_cert" { | ||
source = "devops-rob/tls/gcp" | ||
project_id = var.project_id | ||
region = var.project_region | ||
service_account_email = google_service_account.test.email | ||
tls_bucket = "test-tls-bucket" | ||
tls_cert_name = "devopsrob" | ||
ip_addresses = [ | ||
google_compute_address.test.address, | ||
"127.0.0.1", | ||
] | ||
} | ||
``` |
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,50 @@ | ||
# Updated Certficate Authority example | ||
|
||
This example shows how to specify the Certificate Authority subject in the module. | ||
|
||
```hcl | ||
terraform { | ||
required_version = ">= 0.12.31" | ||
required_providers { | ||
google = { | ||
version = "~> 3.69" | ||
} | ||
} | ||
} | ||
provider "google" { | ||
project = var.project_id | ||
region = var.project_region | ||
} | ||
data "google_project" "project" {} | ||
variable "project_id" {} | ||
variable "project_region" {} | ||
resource "google_service_account" "test" { | ||
account_id = "test-account" | ||
} | ||
module "tls_cert" { | ||
source = "devops-rob/tls/gcp" | ||
project_id = var.project_id | ||
region = var.project_region | ||
service_account_email = google_service_account.test.email | ||
tls_bucket = "test-tls-bucket" | ||
tls_cert_name = "devopsrob" | ||
tls_ca_subject = { | ||
common_name = "HashiCorp Inc. Root" | ||
organization = "HashiCorp, Inc" | ||
organizational_unit = "Department of Certificate Authority" | ||
street_address = ["123 Hashi Street"] | ||
locality = "The Internet" | ||
province = "London" | ||
country = "UK" | ||
postal_code = "SW1 2EG" | ||
} | ||
} | ||
``` |
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,38 @@ | ||
# Minimal exmample | ||
|
||
This example shows a minimal way of using the module with all of the default variavle values. | ||
|
||
```hcl | ||
terraform { | ||
required_version = ">= 0.12.31" | ||
required_providers { | ||
google = { | ||
version = "~> 3.69" | ||
} | ||
} | ||
} | ||
provider "google" { | ||
project = var.project_id | ||
region = var.project_region | ||
} | ||
data "google_project" "project" {} | ||
variable "project_id" {} | ||
variable "project_region" {} | ||
resource "google_service_account" "test" { | ||
account_id = "test-account" | ||
} | ||
module "tls_cert" { | ||
source = "devops-rob/tls/gcp" | ||
project_id = var.project_id | ||
region = var.project_region | ||
service_account_email = google_service_account.test.email | ||
tls_bucket = "test-tls-bucket" | ||
tls_cert_name = "devopsrob" | ||
} | ||
``` |