Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit 2b6417b

Browse files
authored
Merge pull request #478 from alexkappa/fix-action-secrets-v2
Fix action secrets (attempt #2 🙈)
2 parents 6d26a6d + d34e31b commit 2b6417b

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

auth0/resource_auth0_action.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func expandAction(d *schema.ResourceData) *management.Action {
262262
})
263263
})
264264

265-
Set(d, "secrets").Elem(func(d ResourceData) {
265+
List(d, "secrets").Elem(func(d ResourceData) {
266266
a.Secrets = append(a.Secrets, &management.ActionSecret{
267267
Name: String(d, "name"),
268268
Value: String(d, "value"),

example/action/main.tf

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
11
terraform {
22
required_providers {
33
auth0 = {
4-
source = "alexkappa/auth0"
5-
version = "0.24.1"
4+
source = "alexkappa/auth0"
5+
version = "0.24.3"
66
}
77
}
88
}
99

1010
provider "auth0" {}
1111

1212
resource "auth0_action" "do" {
13-
name = "Test Action ${timestamp()}"
14-
supported_triggers {
15-
id = "post-login"
16-
version = "v2"
17-
}
18-
code = <<-EOT
13+
14+
name = "Test Action ${timestamp()}"
15+
16+
supported_triggers {
17+
id = "post-login"
18+
version = "v2"
19+
}
20+
21+
runtime = "node16"
22+
code = <<-EOT
1923
exports.onContinuePostLogin = async (event, api) => {
2024
console.log(event)
2125
};"
2226
EOT
23-
deploy = true
24-
}
27+
28+
dependencies {
29+
name = "lodash"
30+
version = "latest"
31+
}
32+
dependencies {
33+
name = "request"
34+
version = "latest"
35+
}
36+
37+
secrets {
38+
name = "FOO"
39+
value = "Foo"
40+
}
41+
secrets {
42+
name = "BAR"
43+
value = "Bar"
44+
}
45+
46+
deploy = true
47+
}

0 commit comments

Comments
 (0)