Skip to content

Commit b75286f

Browse files
authored
Merge pull request #154 from hookdeck:chore/update-full-example
chore(examples): add existing resource ID variables to examples
2 parents 4857c93 + 2c79ba4 commit b75286f

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

examples/full/main.tf

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ variable "STRIPE_SECRET_KEY" {
1010
type = string
1111
}
1212

13+
variable "EXISTING_SOURCE_ID" {
14+
type = string
15+
default = null
16+
}
17+
18+
variable "EXISTING_DESTINATION_ID" {
19+
type = string
20+
default = null
21+
}
22+
23+
variable "EXISTING_CONNECTION_ID" {
24+
type = string
25+
default = null
26+
}
27+
1328
terraform {
1429
required_providers {
1530
hookdeck = {
@@ -122,15 +137,15 @@ resource "hookdeck_connection" "second_connection" {
122137
}
123138

124139
data "hookdeck_source" "manually_created_source" {
125-
id = "src_112rkwa855tb0z"
140+
id = var.EXISTING_SOURCE_ID
126141
}
127142

128143
data "hookdeck_destination" "manually_created_destination" {
129-
id = "des_tsrZIbyk0JBB"
144+
id = var.EXISTING_DESTINATION_ID
130145
}
131146

132147
data "hookdeck_connection" "manually_created_connection" {
133-
id = "web_xDRnu9yq9GMl"
148+
id = var.EXISTING_CONNECTION_ID
134149
}
135150

136151
resource "hookdeck_connection" "first_connection_using_data_sources" {

examples/full/terraform.tfvars.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
HOOKDECK_API_KEY = "<YOUR_HOOKDECK_API_KEY>"
22

3+
EXISTING_SOURCE_ID = "<EXISTING_SOURCE_ID>"
4+
EXISTING_DESTINATION_ID = "<EXISTING_DESTINATION_ID>"
5+
EXISTING_CONNECTION_ID = "<EXISTING_CONNECTION_ID>"
6+
37
HEADER_FILTER_VALUES = [
48
"account.created.v1",
59
"transaction.cancelled.v1",

0 commit comments

Comments
 (0)