Skip to content
Merged
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
61 changes: 61 additions & 0 deletions docs/data-sources/edgecloud_instances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_edgecloud_instances Data Source - stackit"
subcategory: ""
description: |-
Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_edgecloud_instances (Data Source)

Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.

~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
# returns all Edge Cloud instances created in the given project which are inside the provider default_region
data "stackit_edgecloud_instances" "plan_id" {
project_id = var.project_id
}

# returns all Edge Cloud instances created in the given project in the given region
data "stackit_edgecloud_instances" "plan_id" {
project_id = var.project_id
region = var.region
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `project_id` (String) STACKIT project ID to which the Edge Cloud instances are associated.

### Optional

- `region` (String) The resource region. If not defined, the provider region is used.

### Read-Only

- `id` (String) Terraform's internal data source ID, structured as `project_id`,`region`.
- `instances` (Attributes List) A list of Edge Cloud instances. (see [below for nested schema](#nestedatt--instances))

<a id="nestedatt--instances"></a>
### Nested Schema for `instances`

Read-Only:

- `created` (String) The date and time the instance was created.
- `description` (String) Description of the instance.
- `display_name` (String) The display name of the instance.
- `frontend_url` (String) Frontend URL for the Edge Cloud instance.
- `instance_id` (String) The ID of the instance.
- `plan_id` (String) The plan ID for the instance.
- `region` (String) The region where the instance is located.
- `status` (String) The status of the instance.
46 changes: 46 additions & 0 deletions docs/data-sources/edgecloud_plans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_edgecloud_plans Data Source - stackit"
subcategory: ""
description: |-
Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_edgecloud_plans (Data Source)

Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.

~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
data "stackit_edgecloud_plans" "this" {
project_id = var.project_id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `project_id` (String) STACKIT project ID the Plans belongs to.

### Read-Only

- `id` (String) Terraform's internal data source ID, `project_id` is used here.
- `plans` (Attributes List) A list of Edge Cloud Plans. (see [below for nested schema](#nestedatt--plans))

<a id="nestedatt--plans"></a>
### Nested Schema for `plans`

Read-Only:

- `description` (String) Description of the plan.
- `id` (String) The ID of the plan.
- `max_edge_hosts` (Number) Maximum number of Edge Cloud hosts that can be used.
- `name` (String) The name of the plan.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Note: AWS specific checks must be skipped as they do not work on STACKIT. For de
- `credentials_path` (String) Path of JSON from where the credentials are read. Takes precedence over the env var `STACKIT_CREDENTIALS_PATH`. Default value is `~/.stackit/credentials.json`.
- `default_region` (String) Region will be used as the default location for regional services. Not all services require a region, some are global
- `dns_custom_endpoint` (String) Custom endpoint for the DNS service
- `edgecloud_custom_endpoint` (String) Custom endpoint for the Edge Cloud service
- `enable_beta_resources` (Boolean) Enable beta resources. Default is false.
- `experiments` (List of String) Enables experiments. These are unstable features without official support. More information can be found in the README. Available Experiments: iam, routing-tables, network
- `git_custom_endpoint` (String) Custom endpoint for the Git service
Expand Down
63 changes: 63 additions & 0 deletions docs/resources/edgecloud_instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_edgecloud_instance Resource - stackit"
subcategory: ""
description: |-
Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_edgecloud_instance (Resource)

Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
locals {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
display_name = "edge"
plan_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
description = "cats live on the edge"
region = "eu01"
}

resource "stackit_edgecloud_instance" "this" {
project_id = local.project_id
display_name = local.display_name
plan_id = local.plan_id
description = local.description
}

# Only use the import statement, if you want to import an existing Edge Cloud instance resource
import {
to = stackit_edgecloud_instance.this
id = "${local.project_id},${local.region},INSTANCE_ID"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `display_name` (String) Display name shown for the Edge Cloud instance. Has to be a valid hostname, with a length between 4 and 8 characters.
- `plan_id` (String) STACKIT Edge Plan ID for the Edge Cloud instance, has to be the UUID of an existing plan.
- `project_id` (String) STACKIT project ID to which the Edge Cloud instance is associated.

### Optional

- `description` (String) Description for your STACKIT Edge Cloud instance. Max length is 256 characters
- `region` (String) STACKIT region to use for the instance, providers default_region will be used if unset.

### Read-Only

- `created` (String) The date and time the creation of the instance was triggered.
- `frontend_url` (String) Frontend URL for the Edge Cloud instance.
- `id` (String) Terraform's internal resource ID, structured as "`project_id`,`region`,`instance_id`".
- `instance_id` (String) <displayName>-<projectIDHash>
- `status` (String) instance status
63 changes: 63 additions & 0 deletions docs/resources/edgecloud_kubeconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_edgecloud_kubeconfig Resource - stackit"
subcategory: ""
description: |-
Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_edgecloud_kubeconfig (Resource)

Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
# the instance resource only exists here to illustrate the usage of it's attribute
resource "stackit_edgecloud_instance" "this" {
project_id = local.project_id
display_name = "example"
plan_id = var.plan_id
description = "some_description"
}

resource "stackit_edgecloud_kubeconfig" "by_name" {
project_id = var.project_id
instance_name = stackit_edgecloud_instance.this.display_name
expiration = 3600 # seconds
}

resource "stackit_edgecloud_kubeconfig" "by_id" {
project_id = var.project_id
instance_id = stackit_edgecloud_instance.this.instance_id
expiration = 3600 # seconds
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `project_id` (String) STACKIT project ID to which the Edge Cloud instance is associated.

### Optional

- `expiration` (Number) Expiration time of the kubeconfig, in seconds. Minimum is 600, Maximum is 15552000. Defaults to `3600`
- `instance_id` (String) ID of the Edge Cloud instance.
- `instance_name` (String) Name of the Edge Cloud instance.
- `recreate_before` (Number) Number of seconds before expiration to trigger recreation of the kubeconfig at.
- `region` (String) The resource region. If not defined, the provider region is used.

### Read-Only

- `creation_time` (String) Date-time when the kubeconfig was created
- `expires_at` (String) Timestamp when the kubeconfig expires
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_name` or `instance_id`,`kubeconfig_id`".
- `kubeconfig` (String, Sensitive) Raw kubeconfig.
- `kubeconfig_id` (String) Internally generated UUID to identify a kubeconfig resource in Terraform, since the Edge Cloud API doesn't return a kubeconfig identifier
63 changes: 63 additions & 0 deletions docs/resources/edgecloud_token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_edgecloud_token Resource - stackit"
subcategory: ""
description: |-
Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_edgecloud_token (Resource)

Edge Cloud is in private Beta and not generally available.
You can contact support if you are interested in trying it out.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
# the instance resource only exists here to illustrate the usage of it's attribute
resource "stackit_edgecloud_instance" "this" {
project_id = local.project_id
display_name = "example"
plan_id = var.plan_id
description = "some_description"
}

resource "stackit_edgecloud_token" "by_name" {
project_id = var.project_id
instance_name = stackit_edgecloud_instance.this.display_name
expiration = 3600 # seconds
}

resource "stackit_edgecloud_token" "by_id" {
project_id = var.project_id
instance_id = stackit_edgecloud_instance.this.instance_id
expiration = 3600 # seconds
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `project_id` (String) STACKIT project ID to which the Edge Cloud instance is associated.

### Optional

- `expiration` (Number) Expiration time of the token, in seconds. Minimum is 600, Maximum is 15552000. Defaults to `3600`
- `instance_id` (String) ID of the Edge Cloud instance.
- `instance_name` (String) Name of the Edge Cloud instance.
- `recreate_before` (Number) Number of seconds before expiration to trigger recreation of the token at.
- `region` (String) The resource region. If not defined, the provider region is used.

### Read-Only

- `creation_time` (String) Date-time when the token was created
- `expires_at` (String) Timestamp when the token expires
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_name` or `instance_id`,`token_id`".
- `token` (String, Sensitive) Raw token.
- `token_id` (String) Internally generated UUID to identify a token resource in Terraform, since the Edge Cloud API doesnt return a token identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# returns all Edge Cloud instances created in the given project which are inside the provider default_region
data "stackit_edgecloud_instances" "plan_id" {
project_id = var.project_id
}

# returns all Edge Cloud instances created in the given project in the given region
data "stackit_edgecloud_instances" "plan_id" {
project_id = var.project_id
region = var.region
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "stackit_edgecloud_plans" "this" {
project_id = var.project_id
}
20 changes: 20 additions & 0 deletions examples/resources/stackit_edgecloud_instance/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
locals {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
display_name = "edge"
plan_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
description = "cats live on the edge"
region = "eu01"
}

resource "stackit_edgecloud_instance" "this" {
project_id = local.project_id
display_name = local.display_name
plan_id = local.plan_id
description = local.description
}

# Only use the import statement, if you want to import an existing Edge Cloud instance resource
import {
to = stackit_edgecloud_instance.this
id = "${local.project_id},${local.region},INSTANCE_ID"
}
19 changes: 19 additions & 0 deletions examples/resources/stackit_edgecloud_kubeconfig/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# the instance resource only exists here to illustrate the usage of it's attribute
resource "stackit_edgecloud_instance" "this" {
project_id = local.project_id
display_name = "example"
plan_id = var.plan_id
description = "some_description"
}

resource "stackit_edgecloud_kubeconfig" "by_name" {
project_id = var.project_id
instance_name = stackit_edgecloud_instance.this.display_name
expiration = 3600 # seconds
}

resource "stackit_edgecloud_kubeconfig" "by_id" {
project_id = var.project_id
instance_id = stackit_edgecloud_instance.this.instance_id
expiration = 3600 # seconds
}
19 changes: 19 additions & 0 deletions examples/resources/stackit_edgecloud_token/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# the instance resource only exists here to illustrate the usage of it's attribute
resource "stackit_edgecloud_instance" "this" {
project_id = local.project_id
display_name = "example"
plan_id = var.plan_id
description = "some_description"
}

resource "stackit_edgecloud_token" "by_name" {
project_id = var.project_id
instance_name = stackit_edgecloud_instance.this.display_name
expiration = 3600 # seconds
}

resource "stackit_edgecloud_token" "by_id" {
project_id = var.project_id
instance_id = stackit_edgecloud_instance.this.instance_id
expiration = 3600 # seconds
}
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
github.com/stackitcloud/stackit-sdk-go/core v0.20.1
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.9.1
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.3
github.com/stackitcloud/stackit-sdk-go/services/edge v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/git v0.10.1
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.3.0
github.com/stackitcloud/stackit-sdk-go/services/iaasalpha v0.1.23-alpha
Expand Down
Loading
Loading