|
| 1 | +--- |
| 2 | +subcategory: "Edge Services" |
| 3 | +page_title: "Scaleway: scaleway_edge_services_backend_stage" |
| 4 | +--- |
| 5 | + |
| 6 | +# Resource: scaleway_edge_services_backend_stage |
| 7 | + |
| 8 | +Creates and manages Scaleway Edge Services Backend Stages. |
| 9 | + |
| 10 | +## Example Usage |
| 11 | + |
| 12 | +### With object backend |
| 13 | + |
| 14 | +```terraform |
| 15 | +resource "scaleway_object_bucket" "main" { |
| 16 | + name = "my-bucket-name" |
| 17 | + tags = { |
| 18 | + foo = "bar" |
| 19 | + } |
| 20 | +} |
| 21 | +
|
| 22 | +resource "scaleway_edge_services_pipeline" "main" { |
| 23 | + name = "my-pipeline" |
| 24 | +} |
| 25 | +
|
| 26 | +resource "scaleway_edge_services_backend_stage" "main" { |
| 27 | + pipeline_id = scaleway_edge_services_pipeline.main.id |
| 28 | + s3_backend_config { |
| 29 | + bucket_name = scaleway_object_bucket.main.name |
| 30 | + bucket_region = "fr-par" |
| 31 | + } |
| 32 | +} |
| 33 | +``` |
| 34 | + |
| 35 | +### With LB backend |
| 36 | + |
| 37 | +```terraform |
| 38 | +resource "scaleway_lb" "main" { |
| 39 | + ip_ids = [scaleway_lb_ip.main.id] |
| 40 | + zone = "fr-par-1" |
| 41 | + type = "LB-S" |
| 42 | +} |
| 43 | +
|
| 44 | +resource "scaleway_lb_frontend" "main" { |
| 45 | + lb_id = scaleway_lb.main.id |
| 46 | + backend_id = scaleway_lb_backend.main.id |
| 47 | + name = "frontend01" |
| 48 | + inbound_port = "443" |
| 49 | + certificate_ids = [ |
| 50 | + scaleway_lb_certificate.cert01.id, |
| 51 | + ] |
| 52 | +} |
| 53 | +
|
| 54 | +resource "scaleway_edge_services_pipeline" "main" { |
| 55 | + name = "my-pipeline" |
| 56 | +} |
| 57 | +
|
| 58 | +resource "scaleway_edge_services_backend_stage" "main" { |
| 59 | + pipeline_id = scaleway_edge_services_pipeline.main.id |
| 60 | + lb_backend_config { |
| 61 | + lb_config { |
| 62 | + id = scaleway_lb.main.id |
| 63 | + frontend_id = scaleway_lb_frontend.id |
| 64 | + is_ssl = true |
| 65 | + zone = "fr-par-1" |
| 66 | + } |
| 67 | + } |
| 68 | +} |
| 69 | +``` |
| 70 | + |
| 71 | +## Argument Reference |
| 72 | + |
| 73 | +- `pipeline_id` - (Required) The ID of the pipeline. |
| 74 | +- `s3_backend_config` - (Optional) The Scaleway Object Storage origin bucket (S3) linked to the backend stage. |
| 75 | + - `bucket_name` - The name of the Bucket. |
| 76 | + - `bucket_region` - The region of the Bucket. |
| 77 | + - `is_website` - Defines whether the bucket website feature is enabled. |
| 78 | +- `lb_backend_config` - (Optional) The Scaleway Load Balancer linked to the backend stage. |
| 79 | + - `lb_config` - The Load Balancer config. |
| 80 | + - `id` - The ID of the Load Balancer. |
| 81 | + - `frontend_id` - The ID of the frontend. |
| 82 | + - `is_ssl` - Defines whether the Load Balancer's frontend handles SSL connections. |
| 83 | + - `domain_name` - The Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer. |
| 84 | + - `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) of the Load Balancer. |
| 85 | +- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the backend stage is associated with. |
| 86 | + |
| 87 | +## Attributes Reference |
| 88 | + |
| 89 | +In addition to all arguments above, the following attributes are exported: |
| 90 | + |
| 91 | +- `id` - The ID of the backend stage (UUID format). |
| 92 | +- `created_at` - The date and time of the creation of the backend stage. |
| 93 | +- `updated_at` - The date and time of the last update of the backend stage. |
| 94 | + |
| 95 | +## Import |
| 96 | + |
| 97 | +Backend stages can be imported using the `{id}`, e.g. |
| 98 | + |
| 99 | +```bash |
| 100 | +$ terraform import scaleway_edge_services_backend_stage.basic 11111111-1111-1111-1111-111111111111 |
| 101 | +``` |
0 commit comments