Skip to content

Commit 2570ae0

Browse files
authored
Adding Route 53 configuration (#32)
* Adding Route 53 configuration * Fixed validation error
1 parent e74314a commit 2570ae0

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.github/workflows/validate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ on:
55
branches: [ master ]
66

77
env:
8-
TERRAFORM_VERSION: 1.2.5
8+
TERRAFORM_VERSION: 1.2.6
99

1010
jobs:
1111
validate:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616

1717
- name: Setup terraform ${{ env.TERRAFORM_VERSION }}
18-
uses: hashicorp/setup-terraform@v1
18+
uses: hashicorp/setup-terraform@v2
1919
with:
2020
terraform_version: ${{ env.TERRAFORM_VERSION }}
2121

example/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ resource "azurerm_key_vault_access_policy" "default" {
4242
}
4343

4444
module "keyvault_acmebot" {
45-
source = "../"
45+
source = "shibayan/keyvault-acmebot/azurerm"
46+
version = "~> 2.0"
4647

4748
function_app_name = "func-acmebot-module-${random_string.random.result}"
4849
app_service_plan_name = "plan-acmebot-module-${random_string.random.result}"

variables.tf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ variable "external_account_binding" {
109109
default = null
110110
}
111111

112+
# DNS Provider Configuration
112113
variable "azure_dns" {
113114
type = object({
114115
subscription_id = string
@@ -163,10 +164,11 @@ variable "google_dns" {
163164
default = null
164165
}
165166

166-
variable "gratis_dns" {
167+
variable "route_53" {
167168
type = object({
168-
username = string
169-
password = string
169+
access_key = string
170+
secret_key = string
171+
region = string
170172
})
171173
default = null
172174
}
@@ -219,9 +221,10 @@ locals {
219221
"Acmebot:GoogleDns:KeyFile64" = var.google_dns.key_file64
220222
} : {}
221223

222-
gratis_dns = var.gratis_dns != null ? {
223-
"Acmebot:GratisDns:Username" = var.gratis_dns.username
224-
"Acmebot:GratisDns:Password" = var.gratis_dns.password
224+
route_53 = var.route_53 != null ? {
225+
"Acmebot:Route53:AccessKey" = var.route_53.access_key
226+
"Acmebot:Route53:SecretKey" = var.route_53.secret_key
227+
"Acmebot:Route53:Region" = var.route_53.region
225228
} : {}
226229

227230
trans_ip = var.trans_ip != null ? {
@@ -251,7 +254,7 @@ locals {
251254
local.gandi,
252255
local.go_daddy,
253256
local.google_dns,
254-
local.gratis_dns,
257+
local.route_53,
255258
local.trans_ip,
256259
local.webhook_url,
257260
)

0 commit comments

Comments
 (0)