Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 33 additions & 1 deletion docs/resources/apple_silicon_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,34 @@ see the [API documentation](https://www.scaleway.com/en/developers/api/apple-sil
### Basic

```terraform
resource "scaleway_apple_silicon_server" "server" {
resource scaleway_apple_silicon_server server {
name = "test-m1"
type = "M1-M"
}
```

### Enable VPC and attach private network

```terraform
resource scaleway_vpc vpc-apple-silicon {
name = "vpc-apple-silicon"
}

resource scaleway_vpc_private_network pn-apple-silicon {
name = "pn-apple-silicon"
vpc_id = scaleway_vpc.vpc-apple-silicon.id
}

resource scaleway_apple_silicon_server my-server {
name = "TestAccServerEnableVPC"
type = "M2-M"
enable_vpc = true
private_network {
id = scaleway_vpc_private_network.pn-apple-silicon.id
}
}
```

## Argument Reference

The following arguments are supported:
Expand All @@ -36,10 +58,15 @@ The following arguments are supported:
associated with.
- `enable_vpc` - (Optional, Default: false): Enables the VPC option when set to true.

- `private_network` - (Optional) The private networks to attach to the server
- `id` - The private network ID
- `ipam_ip_ids` - A list of IPAM IP IDs to attach to the server.

- `commitment_type` (Optional, Default: duration_24h): Activate commitment for this server

- `public_bandwidth` (Optional) Configure the available public bandwidth for your server in bits per second. This option may not be available for all offers.


## Attributes Reference

In addition to all arguments above, the following attributes are exported:
Expand All @@ -59,6 +86,11 @@ In addition to all arguments above, the following attributes are exported:
- `deleted_at` - The minimal date and time on which you can delete this server due to Apple licence.
- `organization_id` - The organization ID the server is associated with.
- `vpc_status` - The current status of the VPC option.
- `private_network` - The private networks to attach to the server
- `vlan` - The VLAN ID associated with the private network.
- `status` - The current status of the private network.
- `created_at` - The date and time the private network was created.
- `updated_at` - The date and time the private network was last updated.

## Import

Expand Down

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions internal/services/domain/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,3 +623,11 @@ func FlattenDSRecord(dsRecords []*domain.DSRecord) []any {

return results
}

func BuildZoneName(subdomain, domain string) string {
if subdomain == "" {
return domain
}

return fmt.Sprintf("%s.%s", subdomain, domain)
}
Loading
Loading