-
Notifications
You must be signed in to change notification settings - Fork 133
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 11 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 |
|---|---|---|
| @@ -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 | ||
| ``` | ||
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,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 | ||
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,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 | ||
| ``` |
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,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 | ||
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,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 | ||
| ``` |
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
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.