Skip to content

Commit

Permalink
adding READMEs to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
devops-rob committed Jul 26, 2021
1 parent 53577b0 commit 0c76c2d
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 0 deletions.
45 changes: 45 additions & 0 deletions examples/additional-ip-addresses/README.md
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",
]
}
```
50 changes: 50 additions & 0 deletions examples/certificate-authority-subject-example/README.md
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"
}
}
```
38 changes: 38 additions & 0 deletions examples/minimal-example/README.md
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"
}
```

0 comments on commit 0c76c2d

Please sign in to comment.