Skip to content

Commit

Permalink
Adding Route 53 configuration (#32)
Browse files Browse the repository at this point in the history
* Adding Route 53 configuration

* Fixed validation error
  • Loading branch information
shibayan authored Jul 30, 2022
1 parent e74314a commit 2570ae0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ on:
branches: [ master ]

env:
TERRAFORM_VERSION: 1.2.5
TERRAFORM_VERSION: 1.2.6

jobs:
validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup terraform ${{ env.TERRAFORM_VERSION }}
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ env.TERRAFORM_VERSION }}

Expand Down
3 changes: 2 additions & 1 deletion example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ resource "azurerm_key_vault_access_policy" "default" {
}

module "keyvault_acmebot" {
source = "../"
source = "shibayan/keyvault-acmebot/azurerm"
version = "~> 2.0"

function_app_name = "func-acmebot-module-${random_string.random.result}"
app_service_plan_name = "plan-acmebot-module-${random_string.random.result}"
Expand Down
17 changes: 10 additions & 7 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ variable "external_account_binding" {
default = null
}

# DNS Provider Configuration
variable "azure_dns" {
type = object({
subscription_id = string
Expand Down Expand Up @@ -163,10 +164,11 @@ variable "google_dns" {
default = null
}

variable "gratis_dns" {
variable "route_53" {
type = object({
username = string
password = string
access_key = string
secret_key = string
region = string
})
default = null
}
Expand Down Expand Up @@ -219,9 +221,10 @@ locals {
"Acmebot:GoogleDns:KeyFile64" = var.google_dns.key_file64
} : {}

gratis_dns = var.gratis_dns != null ? {
"Acmebot:GratisDns:Username" = var.gratis_dns.username
"Acmebot:GratisDns:Password" = var.gratis_dns.password
route_53 = var.route_53 != null ? {
"Acmebot:Route53:AccessKey" = var.route_53.access_key
"Acmebot:Route53:SecretKey" = var.route_53.secret_key
"Acmebot:Route53:Region" = var.route_53.region
} : {}

trans_ip = var.trans_ip != null ? {
Expand Down Expand Up @@ -251,7 +254,7 @@ locals {
local.gandi,
local.go_daddy,
local.google_dns,
local.gratis_dns,
local.route_53,
local.trans_ip,
local.webhook_url,
)
Expand Down

0 comments on commit 2570ae0

Please sign in to comment.