https://github.com/edahlseng/terraform-provider-shopify
https://github.com/edahlseng/terraform-provider-shopify
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/edahlseng/terraform-provider-shopify
- Owner: edahlseng
- Created: 2018-09-24T23:46:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T13:36:33.000Z (about 2 years ago)
- Last Synced: 2024-08-03T22:19:12.507Z (9 months ago)
- Language: Go
- Homepage:
- Size: 706 KB
- Stars: 10
- Watchers: 1
- Forks: 6
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- jimsghstars - edahlseng/terraform-provider-shopify - (Go)
README
Shopify Terraform Provider
==========================Setup
-----From within the Shopify Admin Interface:
* Click on "Apps" from the list on the left hand sidebar (or go to .myshopify.com/admin/apps
* Click on "Manage private apps" (or go to .myshopify.com/admin/apps/private)
* Create a new private app
* Configure the provider as follows:```hcl
provider "shopify" {
access_token = ""
domain = ".myshopify.com"
}
```Resources
---------### shopify_webhook
For reference, see [Shopify's Webhook Documentation](https://help.shopify.com/en/api/reference/events/webhook).
_Note: Webhooks created via this resource are not visible within the Shopify Admin GUI. To view webhook created this resource, an API request needs to be made with the same app credentials passed into this provider. Example:_
```shell
curl https://.myshopify.com/admin/webhooks.json -H "X-Shopify-Access-Token: "
```#### Example Usage:
```hcl
resource "shopify_webhook" "example" {
address = "https://mywebhook.example.com"
topic = "orders/create"
format = "json"
}
```#### Argument Reference:
The following arguments are supported:
* topic (Required) - The event topic for which webhook messages should be sent. See the Shopify documentation for the full list of available topics.
* address (Required) - The full URL to send webhooks to
* format (Required) - The format to send webhook messages in. Can be either `json` or `xml`.#### Attributes Reference
In addition to all arguments above, the following attributes are exported:
* topic - The event topic for which webhook messages are sent
* address - The full URL to send webhooks to
* format - The format to send webhook messages in. Will be one of `json` or `xml`.#### Import
Instances can be imported using the id, e.g.
```shell
terraform import shopify_webhook.example 440719081554
```Building The Provider
---------------------```shell
make build # `gnumake build` on macOS
```