-
Notifications
You must be signed in to change notification settings - Fork 132
feat(edge_services): add resources #2637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e0c3ba8
bump sdk go
yfodil 591e9f0
add resources
yfodil ee6870b
add docs
yfodil 511aff4
Merge branch 'master' into feat/edge-services
yfodil b38489b
lint
yfodil 598b48f
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil 26b0516
goimports
yfodil c24fe03
fix tests
yfodil d093a5e
fix
yfodil 7377188
update test
yfodil f641080
Merge branch 'master' into feat/edge-services
remyleone 9b82a0c
rename functions
yfodil d4a01eb
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil 0612631
Merge branch 'master' into feat/edge-services
remyleone 426accc
Merge branch 'master' into feat/edge-services
remyleone 46830ba
Merge branch 'master' into feat/edge-services
yfodil 4a597f4
refacto
yfodil ae1f7a0
fix
yfodil f359529
Merge branch 'master' into feat/edge-services
yfodil 6446d5a
bump sdk go
yfodil bacc9e6
update resources to v1beta1
yfodil 1e14484
update doc
yfodil 8c5121a
Merge branch 'master' into feat/edge-services
yfodil 4445d72
gofumpt
yfodil a5cf688
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil a831c64
lint
yfodil 8b08f58
Merge branch 'master' into feat/edge-services
yfodil 72d1948
lint
yfodil d572595
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil 5e26532
fix tfproviderdocs lint
yfodil 75e5283
fix lb origin
yfodil 0018d49
check non-nil HeadStage
yfodil 45e4125
Merge branch 'master' into feat/edge-services
remyleone 5c596a2
update descriptions
yfodil 07601a1
Merge branch 'feat/edge-services' of github.com:yfodil/terraform-prov…
yfodil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ jobs: | |
- cockpit | ||
- container | ||
- domain | ||
- edgeservices | ||
- flexibleip | ||
- function | ||
- iam | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
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 | ||
|
||
### With object backend | ||
|
||
```terraform | ||
resource "scaleway_object_bucket" "main" { | ||
name = "my-bucket-name" | ||
tags = { | ||
foo = "bar" | ||
} | ||
} | ||
|
||
resource "scaleway_edge_services_pipeline" "main" { | ||
name = "my-pipeline" | ||
} | ||
|
||
resource "scaleway_edge_services_backend_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
s3_backend_config { | ||
bucket_name = scaleway_object_bucket.main.name | ||
bucket_region = "fr-par" | ||
} | ||
} | ||
``` | ||
|
||
### With LB backend | ||
|
||
```terraform | ||
resource "scaleway_lb" "main" { | ||
ip_ids = [scaleway_lb_ip.main.id] | ||
zone = "fr-par-1" | ||
type = "LB-S" | ||
} | ||
|
||
resource "scaleway_lb_frontend" "main" { | ||
lb_id = scaleway_lb.main.id | ||
backend_id = scaleway_lb_backend.main.id | ||
name = "frontend01" | ||
inbound_port = "443" | ||
certificate_ids = [ | ||
scaleway_lb_certificate.cert01.id, | ||
] | ||
} | ||
|
||
resource "scaleway_edge_services_pipeline" "main" { | ||
name = "my-pipeline" | ||
} | ||
|
||
resource "scaleway_edge_services_backend_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
lb_backend_config { | ||
lb_config { | ||
id = scaleway_lb.main.id | ||
frontend_id = scaleway_lb_frontend.id | ||
is_ssl = true | ||
zone = "fr-par-1" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
- `pipeline_id` - (Required) The ID of the pipeline. | ||
- `s3_backend_config` - (Optional) 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. | ||
- `lb_backend_config` - (Optional) The Scaleway Load Balancer linked to the backend stage. | ||
- `lb_config` - The Load Balancer config. | ||
- `id` - The ID of the Load Balancer. | ||
- `frontend_id` - The ID of the frontend. | ||
- `is_ssl` - Defines whether the Load Balancer's frontend handles SSL connections. | ||
- `domain_name` - The Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer. | ||
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) of the Load Balancer. | ||
- `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. | ||
|
||
## 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 | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
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" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
backend_stage_id = scaleway_edge_services_backend_stage.main.id | ||
} | ||
``` | ||
|
||
### Purge request | ||
|
||
```terraform | ||
resource "scaleway_edge_services_cache_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
backend_stage_id = scaleway_edge_services_backend_stage.main.id | ||
|
||
purge { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
all = true | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
- `pipeline_id` - (Required) The ID of the pipeline. | ||
- `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. | ||
|
||
## 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 | ||
yfodil marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
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" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
fqdns = ["subdomain.example.com"] | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
- `pipeline_id` - (Required) The ID of the pipeline. | ||
- `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. | ||
|
||
## 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 | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
subcategory: "Edge Services" | ||
page_title: "Scaleway: scaleway_edge_services_head_stage" | ||
--- | ||
|
||
# Resource: scaleway_edge_services_head_stage | ||
|
||
Sets the Scaleway Edge Services head stage of your pipeline. | ||
|
||
## Example Usage | ||
|
||
### Basic | ||
|
||
```terraform | ||
resource "scaleway_edge_services_pipeline" "main" { | ||
name = "my-edge_services-pipeline" | ||
description = "pipeline description" | ||
} | ||
|
||
resource "scaleway_edge_services_dns_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
tls_stage_id = scaleway_edge_services_tls_stage.main.id | ||
fqdns = ["subdomain.example.com"] | ||
} | ||
|
||
resource "scaleway_edge_services_head_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
head_stage_id = scaleway_edge_services_dns_stage.main.id | ||
} | ||
|
||
``` | ||
|
||
## Argument Reference | ||
|
||
- `pipeline_id` - (Required) The ID of the pipeline. | ||
- `head_stage_id` - (Required) The ID of head stage of the pipeline. | ||
|
||
## Attributes Reference | ||
|
||
No additional attributes are exported. | ||
|
||
## Import | ||
|
||
Head stages can be imported using the `{id}`, e.g. | ||
|
||
```bash | ||
$ terraform import scaleway_edge_services_head_stage.main 11111111-1111-1111-1111-111111111111 | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
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_pipeline" "main" { | ||
name = "pipeline-name" | ||
description = "pipeline description" | ||
} | ||
|
||
resource "scaleway_edge_services_backend_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
s3_backend_config { | ||
bucket_name = "my-bucket-name" | ||
bucket_region = "fr-par" | ||
} | ||
} | ||
|
||
resource "scaleway_edge_services_tls_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
cache_stage_id = scaleway_edge_services_cache_stage.main.id | ||
managed_certificate = true | ||
} | ||
|
||
resource "scaleway_edge_services_dns_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
tls_stage_id = scaleway_edge_services_tls_stage.main.id | ||
fqdns = ["subdomain.example.com"] | ||
} | ||
|
||
resource "scaleway_edge_services_head_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
head_stage_id = scaleway_edge_services_dns_stage.main.id | ||
} | ||
|
||
resource "scaleway_edge_services_cache_stage" "main" { | ||
pipeline_id = scaleway_edge_services_pipeline.main.id | ||
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. | ||
- `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 | ||
yfodil marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
subcategory: "Edge Services" | ||
page_title: "Scaleway: scaleway_edge_services_plan" | ||
--- | ||
|
||
# Resource: scaleway_edge_services_plan | ||
|
||
Creates and manages Scaleway Edge Services plans. | ||
|
||
## Example Usage | ||
|
||
### Basic | ||
|
||
```terraform | ||
resource "scaleway_edge_services_plan" "main" { | ||
name = "starter" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
- `name` - (Optional) The name of the plan. | ||
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the plan is associated with. | ||
|
||
## Attributes Reference | ||
|
||
No additional attributes are exported. | ||
|
||
## Import | ||
|
||
Plans can be imported using `{project_id}/{plan_name}`, e.g. | ||
|
||
```bash | ||
$ terraform import scaleway_edge_services_plan.main 11111111-1111-1111-1111-111111111111/starter | ||
``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.