Skip to content

Commit

Permalink
Merge pull request #115 from dios-david/add-php-source
Browse files Browse the repository at this point in the history
* chore: fix cio datacentre issue

* adding php source

* generate docs

---------

Co-authored-by: Yashasvi Bajpai <[email protected]>
  • Loading branch information
yashasvibajpai authored Dec 11, 2024
2 parents 120eee3 + c1daf6d commit abf22c1
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 140 deletions.
140 changes: 70 additions & 70 deletions docs/resources/destination_customerio.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,75 +32,75 @@ resource "rudderstack_destination_customerio" "example" {
# blacklist = ["one", "two", "three"]
# }
# consent_management {
# web = [
# {
# provider = "oneTrust"
# consents = ["one_web", "two_web", "three_web"]
# resolution_strategy = ""
# },
# {
# provider = "ketch"
# consents = ["one_web", "two_web", "three_web"]
# resolution_strategy = ""
# },
# {
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_web", "two_web", "three_web"]
# }
# ]
# android = [{
# provider = "ketch"
# consents = ["one_android", "two_android", "three_android"]
# resolution_strategy = ""
# }]
# ios = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_ios", "two_ios", "three_ios"]
# }]
# unity = [{
# provider = "custom"
# resolution_strategy = "or"
# consents = ["one_unity", "two_unity", "three_unity"]
# }]
# reactnative = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_reactnative", "two_reactnative", "three_reactnative"]
# }]
# flutter = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_flutter", "two_flutter", "three_flutter"]
# }]
# cordova = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cordova", "two_cordova", "three_cordova"]
# }]
# amp = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_amp", "two_amp", "three_amp"]
# }]
# cloud = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cloud", "two_cloud", "three_cloud"]
# }]
# warehouse = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_warehouse", "two_warehouse", "three_warehouse"]
# }]
# shopify = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_shopify", "two_shopify", "three_shopify"]
# }]
# }
consent_management {
web = [
{
provider = "oneTrust"
consents = ["one_web", "two_web", "three_web"]
resolution_strategy = ""
},
{
provider = "ketch"
consents = ["one_web", "two_web", "three_web"]
resolution_strategy = ""
},
{
provider = "custom"
resolution_strategy = "and"
consents = ["one_web", "two_web", "three_web"]
}
]
# android = [{
# provider = "ketch"
# consents = ["one_android", "two_android", "three_android"]
# resolution_strategy = ""
# }]
# ios = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_ios", "two_ios", "three_ios"]
# }]
# unity = [{
# provider = "custom"
# resolution_strategy = "or"
# consents = ["one_unity", "two_unity", "three_unity"]
# }]
# reactnative = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_reactnative", "two_reactnative", "three_reactnative"]
# }]
# flutter = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_flutter", "two_flutter", "three_flutter"]
# }]
# cordova = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cordova", "two_cordova", "three_cordova"]
# }]
# amp = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_amp", "two_amp", "three_amp"]
# }]
# cloud = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cloud", "two_cloud", "three_cloud"]
# }]
# warehouse = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_warehouse", "two_warehouse", "three_warehouse"]
# }]
# shopify = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_shopify", "two_shopify", "three_shopify"]
# }]
}
}
}
```
Expand Down Expand Up @@ -142,7 +142,7 @@ Required:
Optional:

- `consent_management` (Block List, Max: 1) Allows you to specify consent configuration data for multiple providers for each source type. (see [below for nested schema](#nestedblock--config--consent_management))
- `datacenter` (String) Input your Customer.io Data Center. (US or EU).
- `datacenter` (String) Input your Customer.io Data Center. (US or EU)
- `device_token_event_name` (String) Enter the name of the event that is fired immediately after setting the device token.
- `event_filtering` (Block List, Max: 1) RudderStack lets you determine which events should be allowed to flow through or blocked. (see [below for nested schema](#nestedblock--config--event_filtering))
- `use_native_sdk` (Block List, Max: 1) Enable this setting to send the events through Customer.io's native JavaScript SDK. (see [below for nested schema](#nestedblock--config--use_native_sdk))
Expand Down
37 changes: 37 additions & 0 deletions docs/resources/source_php.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
page_title: "rudderstack_source_php Resource - terraform-provider-rudderstack"
subcategory: ""
description: |-
---

# rudderstack_source_php (Resource)

This resource represents a PHP event stream source. For more information check
https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-php-sdk/

## Example Usage

```terraform
resource "rudderstack_source_php" "example" {
name = "example-php"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Human readable name of the source. The value has to be unique across all sources.

### Optional

- `enabled` (Boolean) An enabled source allows data to be read from it. For event stream sources this controls wether events can be sent to that source by various SDKs.

### Read-Only

- `created_at` (String) Time when the resource was created, in ISO 8601 format.
- `id` (String) The ID of this resource.
- `updated_at` (String) Time when the resource was last updated, in ISO 8601 format.
- `write_key` (String) The write key that identifies the source in RudderStack data plane.
138 changes: 69 additions & 69 deletions examples/destination_customerio.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,74 +18,74 @@ resource "rudderstack_destination_customerio" "example" {
# blacklist = ["one", "two", "three"]
# }

# consent_management {
# web = [
# {
# provider = "oneTrust"
# consents = ["one_web", "two_web", "three_web"]
# resolution_strategy = ""
# },
# {
# provider = "ketch"
# consents = ["one_web", "two_web", "three_web"]
# resolution_strategy = ""
# },
# {
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_web", "two_web", "three_web"]
# }
# ]
# android = [{
# provider = "ketch"
# consents = ["one_android", "two_android", "three_android"]
# resolution_strategy = ""
# }]
# ios = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_ios", "two_ios", "three_ios"]
# }]
# unity = [{
# provider = "custom"
# resolution_strategy = "or"
# consents = ["one_unity", "two_unity", "three_unity"]
# }]
# reactnative = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_reactnative", "two_reactnative", "three_reactnative"]
# }]
# flutter = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_flutter", "two_flutter", "three_flutter"]
# }]
# cordova = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cordova", "two_cordova", "three_cordova"]
# }]
# amp = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_amp", "two_amp", "three_amp"]
# }]
# cloud = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cloud", "two_cloud", "three_cloud"]
# }]
# warehouse = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_warehouse", "two_warehouse", "three_warehouse"]
# }]
# shopify = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_shopify", "two_shopify", "three_shopify"]
# }]
# }
consent_management {
web = [
{
provider = "oneTrust"
consents = ["one_web", "two_web", "three_web"]
resolution_strategy = ""
},
{
provider = "ketch"
consents = ["one_web", "two_web", "three_web"]
resolution_strategy = ""
},
{
provider = "custom"
resolution_strategy = "and"
consents = ["one_web", "two_web", "three_web"]
}
]
# android = [{
# provider = "ketch"
# consents = ["one_android", "two_android", "three_android"]
# resolution_strategy = ""
# }]
# ios = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_ios", "two_ios", "three_ios"]
# }]
# unity = [{
# provider = "custom"
# resolution_strategy = "or"
# consents = ["one_unity", "two_unity", "three_unity"]
# }]
# reactnative = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_reactnative", "two_reactnative", "three_reactnative"]
# }]
# flutter = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_flutter", "two_flutter", "three_flutter"]
# }]
# cordova = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cordova", "two_cordova", "three_cordova"]
# }]
# amp = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_amp", "two_amp", "three_amp"]
# }]
# cloud = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_cloud", "two_cloud", "three_cloud"]
# }]
# warehouse = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_warehouse", "two_warehouse", "three_warehouse"]
# }]
# shopify = [{
# provider = "custom"
# resolution_strategy = "and"
# consents = ["one_shopify", "two_shopify", "three_shopify"]
# }]
}
}
}
3 changes: 3 additions & 0 deletions examples/source_php.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "rudderstack_source_php" "example" {
name = "example-php"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func init() {
},
"datacenter": {
Type: schema.TypeString,
Optional: false,
Optional: true,
Default: "US",
Description: "Input your Customer.io Data Center. (US or EU)",
},
Expand Down
5 changes: 5 additions & 0 deletions rudderstack/integrations/sources/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,9 @@ func init() {
Properties: []c.ConfigProperty{},
SkipConfig: true,
})
c.Sources.Register("php", c.ConfigMeta{
APIType: "PHP",
Properties: []c.ConfigProperty{},
SkipConfig: true,
})
}
4 changes: 4 additions & 0 deletions rudderstack/integrations/sources/sources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ func TestSourceResourceWebhookShopify(t *testing.T) {
func TestSourceResourcePython(t *testing.T) {
cmt.AssertSource(t, "python", []configs.TestConfig{configs.EmptyTestConfig})
}

func TestSourceResourcePHP(t *testing.T) {
cmt.AssertSource(t, "php", []configs.TestConfig{configs.EmptyTestConfig})
}
17 changes: 17 additions & 0 deletions templates/resources/source_php.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
page_title: "rudderstack_source_php Resource - terraform-provider-rudderstack"
subcategory: ""
description: |-

---

# rudderstack_source_php (Resource)

This resource represents a PHP event stream source. For more information check
https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-php-sdk/

## Example Usage

{{tffile "examples/source_php.tf"}}

{{ .SchemaMarkdown | trimspace }}

0 comments on commit abf22c1

Please sign in to comment.