Skip to content

Commit b38489b

Browse files
committed
lint
1 parent ee6870b commit b38489b

File tree

4 files changed

+7
-34
lines changed

4 files changed

+7
-34
lines changed

docs/resources/edge_services_cache_stage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ resource "scaleway_edge_services_cache_stage" "main" {
3636
- `fallback_ttl` - (Optional) The Time To Live (TTL) in seconds. Defines how long content is cached.
3737
- `refresh_cache` - (Optional) Trigger a refresh of the cache by changing this field's value.
3838
- `purge_requests` - (Optional) The Scaleway Object Storage origin bucket (S3) linked to the backend stage.
39-
- `pipeline_id` - The pipeline ID in which the purge request will be created.
40-
- `assets` - The list of asserts to purge.
41-
- `all` - Defines whether to purge all content.
39+
- `pipeline_id` - The pipeline ID in which the purge request will be created.
40+
- `assets` - The list of asserts to purge.
41+
- `all` - Defines whether to purge all content.
4242
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cache stage is associated with.
4343

4444
## Attributes Reference

docs/resources/edge_services_tls_stage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resource "scaleway_edge_services_tls_stage" "main" {
1717
}
1818
```
1919

20-
### With a certificate stored in Scaleway Secret Manager.
20+
### With a certificate stored in Scaleway Secret Manager
2121

2222
```terraform
2323
resource "scaleway_edge_services_tls_stage" "main" {

internal/services/edgeservices/edge_services_dns_stage.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,15 @@ func ResourceEdgeServicesDNSStageRead(ctx context.Context, d *schema.ResourceDat
123123
oldFQDNsSet[fqdn.(string)] = true
124124
}
125125

126-
// Create a new slice to store the updated FQDNs
127126
newFQDNs := make([]string, 0)
128-
129-
// Add all FQDNs from the API response
127+
// add all FQDNs from the API response
130128
for _, fqdn := range dnsStage.Fqdns {
131129
if oldFQDNsSet[fqdn] || len(oldFQDNs) == 0 {
132130
// Keep FQDNs that were in the old state or if there were no old FQDNs
133131
newFQDNs = append(newFQDNs, fqdn)
134132
}
135133
}
136-
137-
// Add any FQDNs from the old state that aren't in the API response
134+
// add any FQDNs from the old state that aren't in the API response
138135
for _, oldFQDN := range oldFQDNs {
139136
found := false
140137
for _, newFQDN := range newFQDNs {
@@ -147,11 +144,10 @@ func ResourceEdgeServicesDNSStageRead(ctx context.Context, d *schema.ResourceDat
147144
newFQDNs = append(newFQDNs, oldFQDN.(string))
148145
}
149146
}
150-
151-
// Set the updated FQDNs in the state
152147
if err := d.Set("fqdns", newFQDNs); err != nil {
153148
return diag.FromErr(err)
154149
}
150+
155151
return nil
156152
}
157153

internal/services/edgeservices/types.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,29 +48,6 @@ func expandEdgeServicesPurge(raw interface{}) []*edge_services.PurgeRequest {
4848
return purgeRequests
4949
}
5050

51-
/*func flattenEdgeServicesPurge(purgeRequests []*edge_services.PurgeRequest) interface{} {
52-
if len(purgeRequests) == 0 || purgeRequests == nil {
53-
return nil
54-
}
55-
56-
prI := []map[string]interface{}(nil)
57-
for _, pr := range purgeRequests {
58-
prMap := map[string]interface{}{
59-
"id": pr.ID,
60-
"pipeline_id": pr.PipelineID,
61-
"status": pr.Status.String(),
62-
"all": types.FlattenBoolPtr(pr.All),
63-
"created_at": types.FlattenTime(pr.CreatedAt),
64-
"updated_at": types.FlattenTime(pr.UpdatedAt),
65-
}
66-
if pr.Assets != nil {
67-
prMap["assets"] = types.FlattenSliceString(*pr.Assets)
68-
}
69-
prI = append(prI, prMap)
70-
}
71-
return prI
72-
}*/
73-
7451
func expandEdgeServicesTLSSecrets(raw interface{}, region scw.Region) []*edge_services.TLSSecret {
7552
secrets := []*edge_services.TLSSecret(nil)
7653
rawSecrets := raw.([]interface{})

0 commit comments

Comments
 (0)