Skip to content

Commit

Permalink
Update the docs with new edgeDeployment options (#146)
Browse files Browse the repository at this point in the history
* Docs update

* Add examples for edge deployment that show activation to 100 percent of traffic handled

* Add new options for Edge Deployment to main.tf as well

* Terraform fmting :-)

* Few more details

---------

Co-authored-by: Vladimir Vuksan <[email protected]>
  • Loading branch information
vvuksan-fastly and vvuksan authored Mar 24, 2023
1 parent 0288f6a commit 9754dfe
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
11 changes: 9 additions & 2 deletions docs/resources/edge_deployment_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ description: |-

```terraform
resource "sigsci_edge_deployment_service" "my-service" {
site_short_name = "manual_test"
fastly_sid = "test_sid"
site_short_name = "manual_test"
fastly_sid = "test_sid"
activate_version = true
percent_enabled = 100
}
```

Expand All @@ -27,6 +29,11 @@ resource "sigsci_edge_deployment_service" "my-service" {
- `fastly_sid` (String) Fastly service ID
- `site_short_name` (String) Site short name

### Optional

- `activate_version` (Boolean) activate Fastly service version after clone. Possible values are true or false. Defaults to true.
- `percent_enabled` (Number) percentage of traffic to send to NGWAF@Edge. Possible values are integers values 0 to 100. Defaults to 0.

### Read-Only

- `id` (String) The ID of this resource.
Expand Down
6 changes: 4 additions & 2 deletions examples/resources/sigsci_edge_deployment_service/resource.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
resource "sigsci_edge_deployment_service" "my-service" {
site_short_name = "manual_test"
fastly_sid = "test_sid"
site_short_name = "manual_test"
fastly_sid = "test_sid"
activate_version = true
percent_enabled = 100
}
6 changes: 4 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ resource "sigsci_edge_deployment" "edge" {
}

resource "sigsci_edge_deployment_service" "edge" {
site_short_name = sigsci_site.my-site.short_name
fastly_sid = "[Fastly service id]"
site_short_name = sigsci_site.my-site.short_name
fastly_sid = "[Fastly service id]"
activate_version = true
percent_enabled = 100
}
4 changes: 2 additions & 2 deletions provider/resource_edge_deployment_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ func resourceEdgeDeploymentService() *schema.Resource {

"activate_version": {
Type: schema.TypeBool,
Description: "activate Fastly service version after clone. Possible values are true or false",
Description: "activate Fastly service version after clone. Possible values are true or false. Defaults to true.",
Optional: true,
Default: true,
},

"percent_enabled": {
Type: schema.TypeInt,
Description: "percentage of traffic to send to NGWAF@Edge. Possible values are integers values 0 to 100",
Description: "percentage of traffic to send to NGWAF@Edge. Possible values are integers values 0 to 100. Defaults to 0.",
Optional: true,
Default: 0,
},
Expand Down

0 comments on commit 9754dfe

Please sign in to comment.