Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e0c3ba8
bump sdk go
yfodil Jun 27, 2024
591e9f0
add resources
yfodil Jun 27, 2024
ee6870b
add docs
yfodil Jun 27, 2024
511aff4
Merge branch 'master' into feat/edge-services
yfodil Jun 27, 2024
b38489b
lint
yfodil Jun 27, 2024
598b48f
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil Jun 27, 2024
26b0516
goimports
yfodil Jun 27, 2024
c24fe03
fix tests
yfodil Jun 27, 2024
d093a5e
fix
yfodil Jun 27, 2024
7377188
update test
yfodil Jun 27, 2024
f641080
Merge branch 'master' into feat/edge-services
remyleone Jun 27, 2024
9b82a0c
rename functions
yfodil Jun 28, 2024
d4a01eb
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil Jun 28, 2024
0612631
Merge branch 'master' into feat/edge-services
remyleone Jul 1, 2024
426accc
Merge branch 'master' into feat/edge-services
remyleone Jul 2, 2024
46830ba
Merge branch 'master' into feat/edge-services
yfodil Oct 10, 2024
4a597f4
refacto
yfodil Oct 15, 2024
ae1f7a0
fix
yfodil Oct 15, 2024
f359529
Merge branch 'master' into feat/edge-services
yfodil Mar 6, 2025
6446d5a
bump sdk go
yfodil Mar 6, 2025
bacc9e6
update resources to v1beta1
yfodil Mar 6, 2025
1e14484
update doc
yfodil Mar 6, 2025
8c5121a
Merge branch 'master' into feat/edge-services
yfodil Mar 6, 2025
4445d72
gofumpt
yfodil Mar 6, 2025
a5cf688
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil Mar 6, 2025
a831c64
lint
yfodil Mar 6, 2025
8b08f58
Merge branch 'master' into feat/edge-services
yfodil Mar 6, 2025
72d1948
lint
yfodil Mar 7, 2025
d572595
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil Mar 7, 2025
5e26532
fix tfproviderdocs lint
yfodil Mar 7, 2025
75e5283
fix lb origin
yfodil Mar 7, 2025
0018d49
check non-nil HeadStage
yfodil Mar 10, 2025
45e4125
Merge branch 'master' into feat/edge-services
remyleone Mar 12, 2025
5c596a2
update descriptions
yfodil Mar 12, 2025
07601a1
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions docs/resources/edge_services_backend_stage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
subcategory: "Edge Services"
page_title: "Scaleway: scaleway_edge_services_backend_stage"
---

# Resource: scaleway_edge_services_backend_stage

Creates and manages Scaleway Edge Services Backend Stages.

## Example Usage

### Basic

```terraform
resource "scaleway_object_bucket" "main" {
name = "my-bucket-name"
tags = {
foo = "bar"
}
}

resource "scaleway_edge_services_backend_stage" "main" {
s3_backend_config {
bucket_name = scaleway_object_bucket.main.name
bucket_region = "fr-par"
}
}
```

### Custom Certificate

```terraform
```

## Argument Reference

- `s3_backend_config` - (Required) The Scaleway Object Storage origin bucket (S3) linked to the backend stage.
- `bucket_name` - The name of the Bucket.
- `bucket_region` - The region of the Bucket.
- `is_website` - Defines whether the bucket website feature is enabled.
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the backend stage is associated with.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

- `id` - The ID of the backend stage (UUID format).
- `created_at` - The date and time of the creation of the backend stage.
- `updated_at` - The date and time of the last update of the backend stage.
- `pipeline_id` - The pipeline ID the backend stage belongs to.

## Import

Backend stages can be imported using the `{id}`, e.g.

```bash
$ terraform import scaleway_edge_services_backend_stage.basic 11111111-1111-1111-1111-111111111111
```
59 changes: 59 additions & 0 deletions docs/resources/edge_services_cache_stage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
subcategory: "Edge Services"
page_title: "Scaleway: scaleway_edge_services_cache_stage"
---

# Resource: scaleway_edge_services_cache_stage

Creates and manages Scaleway Edge Services Cache Stages.

## Example Usage

### Basic

```terraform
resource "scaleway_edge_services_cache_stage" "main" {
backend_stage_id = scaleway_edge_services_backend_stage.main.id
}
```

### Purge request

```terraform
resource "scaleway_edge_services_cache_stage" "main" {
backend_stage_id = scaleway_edge_services_backend_stage.main.id

purge {
pipeline_id = scaleway_edge_services_pipeline.main.id
all = true
}
}
```

## Argument Reference

- `backend_stage_id` - (Optional) The backend stage ID the cache stage will be linked to.
- `fallback_ttl` - (Optional) The Time To Live (TTL) in seconds. Defines how long content is cached.
- `refresh_cache` - (Optional) Trigger a refresh of the cache by changing this field's value.
- `purge_requests` - (Optional) The Scaleway Object Storage origin bucket (S3) linked to the backend stage.
- `pipeline_id` - The pipeline ID in which the purge request will be created.
- `assets` - The list of asserts to purge.
- `all` - Defines whether to purge all content.
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cache stage is associated with.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

- `id` - The ID of the cache stage (UUID format).
- `created_at` - The date and time of the creation of the cache stage.
- `updated_at` - The date and time of the last update of the cache stage.
- `pipeline_id` - The pipeline ID the cache stage belongs to.

## Import

Cache stages can be imported using the `{id}`, e.g.

```bash
$ terraform import scaleway_edge_services_cache_stage.basic 11111111-1111-1111-1111-111111111111
```
44 changes: 44 additions & 0 deletions docs/resources/edge_services_dns_stage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
subcategory: "Edge Services"
page_title: "Scaleway: scaleway_edge_services_dns_stage"
---

# Resource: scaleway_edge_services_dns_stage

Creates and manages Scaleway Edge Services DNS Stages.

## Example Usage

### Basic

```terraform
resource "scaleway_edge_services_dns_stage" "main" {
fqdns = ["subdomain.example.com"]
}
```

## Argument Reference

- `backend_stage_id` - (Optional) The backend stage ID the DNS stage will be linked to.
- `tls_stage_id` - (Optional) The TLS stage ID the DNS stage will be linked to.
- `cache_stage_id` - (Optional) The cache stage ID the DNS stage will be linked to.
- `fqdns` - (Optional) Fully Qualified Domain Name (in the format subdomain.example.com) to attach to the stage.
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the DNS stage is associated with.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

- `id` - The ID of the DNS stage (UUID format).
- `type` - The type of the stage.
- `created_at` - The date and time of the creation of the DNS stage.
- `updated_at` - The date and time of the last update of the DNS stage.
- `pipeline_id` - The pipeline ID the DNS stage belongs to.

## Import

DNS stages can be imported using the `{id}`, e.g.

```bash
$ terraform import scaleway_edge_services_dns_stage.basic 11111111-1111-1111-1111-111111111111
```
73 changes: 73 additions & 0 deletions docs/resources/edge_services_pipeline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
subcategory: "Edge Services"
page_title: "Scaleway: scaleway_edge_services_pipeline"
---

# Resource: scaleway_edge_services_pipeline

Creates and manages Scaleway Edge Services Pipelines.

## Example Usage

### Basic

```terraform
resource "scaleway_edge_services_pipeline" "main" {
name = "pipeline-name"
description = "pipeline description"
}
```

### Complete pipeline

```terraform
resource "scaleway_edge_services_backend_stage" "main" {
s3_backend_config {
bucket_name = "my-bucket-name"
bucket_region = "fr-par"
}
}

resource "scaleway_edge_services_tls_stage" "main" {
cache_stage_id = scaleway_edge_services_cache_stage.main.id
managed_certificate = true
}

resource "scaleway_edge_services_dns_stage" "main" {
tls_stage_id = scaleway_edge_services_tls_stage.main.id
fqdns = ["subdomain.example.com"]
}

resource "scaleway_edge_services_pipeline" "main" {
name = "my-edge_services-pipeline"
dns_stage_id = scaleway_edge_services_dns_stage.main.id
}

resource "scaleway_edge_services_cache_stage" "main" {
backend_stage_id = scaleway_edge_services_backend_stage.main.id
}
```

## Argument Reference

- `name` - (Optional) The name of the pipeline.
- `description` - (Optional) The description of the pipeline.
- `dns_stage_id` - (Optional) The DNS stage ID the pipeline will be attached to.
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the pipeline is associated with.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

- `id` - The ID of the pipeline (UUID format).
- `created_at` - The date and time of the creation of the pipeline.
- `updated_at` - The date and time of the last update of the pipeline.
- `status` - The status of user pipeline.

## Import

Pipelines can be imported using the `{id}`, e.g.

```bash
$ terraform import scaleway_edge_services_pipeline.basic 11111111-1111-1111-1111-111111111111
```
57 changes: 57 additions & 0 deletions docs/resources/edge_services_tls_stage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
subcategory: "Edge Services"
page_title: "Scaleway: scaleway_edge_services_tls_stage"
---

# Resource: scaleway_edge_services_tls_stage

Creates and manages Scaleway Edge Services TLS Stages.

## Example Usage

### Managed

```terraform
resource "scaleway_edge_services_tls_stage" "main" {
managed_certificate = true
}
```

### With a certificate stored in Scaleway Secret Manager

```terraform
resource "scaleway_edge_services_tls_stage" "main" {
secrets {
secret_id = "11111111-1111-1111-1111-111111111111"
region = "fr-par"
}
}
```

## Argument Reference

- `backend_stage_id` - (Optional) The backend stage ID the TLS stage will be linked to.
- `cache_stage_id` - (Optional) The cache stage ID the TLS stage will be linked to.
- `managed_certificate` - (Optional) Set to true when Scaleway generates and manages a Let's Encrypt certificate for the TLS stage/custom endpoint.
- `secrets` - (Optional) The TLS secrets.
- `bucket_name` - The ID of the secret.
- `region` - The region of the secret.
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the TLS stage is associated with.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

- `id` - The ID of the TLS stage (UUID format).
- `certificate_expires_at` - The expiration date of the certificate.
- `created_at` - The date and time of the creation of the TLS stage.
- `updated_at` - The date and time of the last update of the TLS stage.
- `pipeline_id` - The pipeline ID the TLS stage belongs to.

## Import

TLS stages can be imported using the `{id}`, e.g.

```bash
$ terraform import scaleway_edge_services_tls_stage.basic 11111111-1111-1111-1111-111111111111
```
6 changes: 6 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/container"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/documentdb"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/domain"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/edgeservices"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/flexibleip"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/function"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iam"
Expand Down Expand Up @@ -142,6 +143,11 @@ func Provider(config *Config) plugin.ProviderFunc {
"scaleway_documentdb_user": documentdb.ResourceUser(),
"scaleway_domain_record": domain.ResourceRecord(),
"scaleway_domain_zone": domain.ResourceZone(),
"scaleway_edge_services_backend_stage": edgeservices.ResourceEdgeServicesBackendStage(),
"scaleway_edge_services_cache_stage": edgeservices.ResourceEdgeServicesCacheStage(),
"scaleway_edge_services_dns_stage": edgeservices.ResourceEdgeServicesDNSStage(),
"scaleway_edge_services_pipeline": edgeservices.ResourceEdgeServicesPipeline(),
"scaleway_edge_services_tls_stage": edgeservices.ResourceEdgeServicesTLSStage(),
"scaleway_flexible_ip": flexibleip.ResourceIP(),
"scaleway_flexible_ip_mac_address": flexibleip.ResourceMACAddress(),
"scaleway_function": function.ResourceFunction(),
Expand Down
Loading