Skip to content

Commit

Permalink
[Docs] Create base documentation (#9)
Browse files Browse the repository at this point in the history
* Initial Documentation
* Clean up README
* Badges
* Descriptions for all items
  • Loading branch information
MNThomson committed Jun 18, 2022
1 parent b8ba1e1 commit 1994b60
Show file tree
Hide file tree
Showing 18 changed files with 400 additions and 234 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Terraform
example.tf
test.tf
.terraform
.terraform.d
*tfstate*
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ localInstall:
terraform init -plugin-dir .terraform.d/plugins/

clean:
rm -rf .terraform .terraform.lock.hcl
rm -rf .terraform .terraform.d .terraform.lock.hcl
rm -rf terraform.tfstate*
rm -rf terraform-provider-dominos

Expand Down
58 changes: 0 additions & 58 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
21 changes: 12 additions & 9 deletions docs/data-sources/address.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
page_title: "dominos_address Data Source - terraform-provider-dominos"
subcategory: ""
description: |-
Example data source
This data source takes in the delivery address and writes it back out in the two different JSON formats that the API expects.
For carryout, this is purely to find the closest store.
---

# dominos_address (Data Source)

Example data source
This data source takes in the delivery address and writes it back out in the two different JSON formats that the API expects.

For carryout, this is purely to find the closest store.



Expand All @@ -17,18 +20,18 @@ Example data source

### Required

- `city` (String)
- `postal_code` (String)
- `region` (String)
- `street` (String)
- `city` (String) The city to deliver the pizza to. Ex: 'Anytown'.
- `postal_code` (String) The region to deliver the pizza to (or zip for the USA). Ex: 'A1A1A1'.
- `region` (String) The region to deliver the pizza to, meaning the province or state. Ex: 'BC'.
- `street` (String) The street to deliver the pizza to. Ex: '123 Main St'.

### Optional

- `type` (String)
- `type` (String) The type of location to deliver to. Default: 'House'.

### Read-Only

- `api_object` (String)
- `url_object` (String)
- `api_object` (String) The computed json payload for the specified address.
- `url_object` (String) The computed line1 & line2 for the specified address.


27 changes: 20 additions & 7 deletions docs/data-sources/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@
page_title: "dominos_menu Data Source - terraform-provider-dominos"
subcategory: ""
description: |-
Example data source
If you would prefer to do your own filtering, you can get access to every item on the dominos menu in your area using this data source.
This data source takes in storeid and provides menu, a list of all (186, at my dominos) name/code/pricecents blocks.
For the love of all that's holy, do not accidentally feed this data source directly into the dominos_order.
This will be expensive and probably pretty annoying to the Dominos store, which will be serving you 1 of each 2-liter bottle of soda, 1 of each 20oz bottle, at least 4 different kinds of salad, probably like 6 different kinds of chicken wings, and I think 12 of each kind of pizza?
(Small, medium, large) x (Hand Tossed, Pan, Stuffed Crust, Gluten Free)?
Oh plus breads. There's breads on the menu, I found that out while trawling through API responses.
I wonder who eats those. Are they good? Let me know!
---

# dominos_menu (Data Source)

Example data source
If you would prefer to do your own filtering, you can get access to every item on the dominos menu in your area using this data source.
This data source takes in store_id and provides menu, a list of all (186, at my dominos) name/code/price_cents blocks.

For the love of all that's holy, do not accidentally feed this data source directly into the dominos_order.
This will be expensive and probably pretty annoying to the Dominos store, which will be serving you 1 of each 2-liter bottle of soda, 1 of each 20oz bottle, at least 4 different kinds of salad, probably like 6 different kinds of chicken wings, and I think 12 of each kind of pizza?
(Small, medium, large) x (Hand Tossed, Pan, Stuffed Crust, Gluten Free)?
Oh plus breads. There's breads on the menu, I found that out while trawling through API responses.
I wonder who eats those. Are they good? Let me know!



Expand All @@ -17,19 +30,19 @@ Example data source

### Required

- `store_id` (Number)
- `store_id` (Number) The ID of the store to get the menu for.

### Read-Only

- `menu` (Attributes List) Menu Items (see [below for nested schema](#nestedatt--menu))
- `menu` (Attributes List) An array of all menu item for the given store. (see [below for nested schema](#nestedatt--menu))

<a id="nestedatt--menu"></a>
### Nested Schema for `menu`

Read-Only:

- `code` (String)
- `name` (String)
- `price_cents` (Number)
- `code` (String) The dominos code for the item.
- `name` (String) The name of the item.
- `price_cents` (Number) The price in cents of the item.


25 changes: 17 additions & 8 deletions docs/data-sources/menu_item.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
page_title: "dominos_menu_item Data Source - terraform-provider-dominos"
subcategory: ""
description: |-
Example data source
This data source takes in the storeid and a list of strings (as querystring), and outputs the menu items in matches.
Each item in matches has three attributes: name, code, and pricecents.
The name is human-readable, but not useful for ordering.
The pricecents is also only informational.
Each string in query_string must literally match the name of the menu item for the menu item to appear in matches.
---

# dominos_menu_item (Data Source)

Example data source
This data source takes in the store_id and a list of strings (as query_string), and outputs the menu items in matches.
Each item in matches has three attributes: name, code, and price_cents.
The name is human-readable, but not useful for ordering.
The price_cents is also only informational.

Each string in query_string must literally match the name of the menu item for the menu item to appear in matches.



Expand All @@ -17,20 +26,20 @@ Example data source

### Required

- `query_string` (List of String)
- `store_id` (Number)
- `query_string` (List of String) Each string in query_string must literally match the name of the menu item for the menu item to appear in matches.
- `store_id` (Number) The ID of the store to get the menu for.

### Read-Only

- `matches` (Attributes List) (see [below for nested schema](#nestedatt--matches))
- `matches` (Attributes List) An array of all possible menu item that matches the given query string. (see [below for nested schema](#nestedatt--matches))

<a id="nestedatt--matches"></a>
### Nested Schema for `matches`

Read-Only:

- `code` (String)
- `name` (String)
- `price_cents` (Number)
- `code` (String) The dominos code for the item.
- `name` (String) The name of the item.
- `price_cents` (Number) The price in cents of the item.


10 changes: 5 additions & 5 deletions docs/data-sources/store.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "dominos_store Data Source - terraform-provider-dominos"
subcategory: ""
description: |-
Example data source
Provided a Dominos address, this data source returns the storeid of the closest Dominos store, and, in case it's useful to you somehow, the deliveryminutes, an integer showing the estimated minutes until your pizza will be delivered.
---

# dominos_store (Data Source)

Example data source
Provided a Dominos address, this data source returns the store_id of the closest Dominos store, and, in case it's useful to you somehow, the delivery_minutes, an integer showing the estimated minutes until your pizza will be delivered.



Expand All @@ -17,11 +17,11 @@ Example data source

### Required

- `address_url_object` (String)
- `address_url_object` (String) The required line1 & line2 for the specified address.

### Read-Only

- `delivery_minutes` (Number)
- `store_id` (Number)
- `delivery_minutes` (Number) The estimated minutes until your pizza will be delivered.
- `store_id` (Number) The ID of the store closest to the address.


0 comments on commit 1994b60

Please sign in to comment.