Skip to content

Commit

Permalink
PORT-12830-try fix ref
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanPort committed Feb 4, 2025
1 parent 80c0181 commit 74ed29e
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 5 deletions.
100 changes: 100 additions & 0 deletions docs/resources/port_folder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "port_folder Resource - terraform-provider-port-labs"
subcategory: ""
description: |-
Folder resource
A full list of the available folder types and their identifiers can be found here https://docs.getport.io/customize-pages-dashboards-and-plugins/folder/catalog-folder.
~> WARNING
The folder resource is currently in beta and is subject to change in future versions.
Use it by setting the Environment Variable PORT_BETA_FEATURES_ENABLED=true.
If this Environment Variable isn't specified, you won't be able to use the resource.
Example Usage
Basic Folder
```hcl
resource "portfolder" "examplefolder" {
sidebaridentifier = "examplesidebar"
folderidentifier = "examplefolder"
title = "Example Folder"
description = "This is an example folder"
}
```
Folder with Parent
Create a folder inside another folder.
```hcl
resource "portfolder" "childfolder" {
sidebaridentifier = "examplesidebar"
folderidentifier = "childfolder"
parent = portfolder.examplefolder.folder_identifier
title = "Child Folder"
description = "This is a child folder"
}
```
---

# port_folder (Resource)

# Folder resource

A full list of the available folder types and their identifiers can be found [here](https://docs.getport.io/customize-pages-dashboards-and-plugins/folder/catalog-folder).

~> **WARNING**
The folder resource is currently in beta and is subject to change in future versions.
Use it by setting the Environment Variable `PORT_BETA_FEATURES_ENABLED=true`.
If this Environment Variable isn't specified, you won't be able to use the resource.

## Example Usage

### Basic Folder

```hcl
resource "port_folder" "example_folder" {
sidebar_identifier = "example_sidebar"
folder_identifier = "example_folder"
title = "Example Folder"
description = "This is an example folder"
}
```

### Folder with Parent

Create a folder inside another folder.

```hcl
resource "port_folder" "child_folder" {
sidebar_identifier = "example_sidebar"
folder_identifier = "child_folder"
parent = port_folder.example_folder.folder_identifier
title = "Child Folder"
description = "This is a child folder"
}
```



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

### Required

- `folder_identifier` (String) The Identifier of the folder
- `sidebar_identifier` (String) The Identifier of the sidebar

### Optional

- `after` (String) The identifier of the folder after which the folder should be placed
- `description` (String) The folder description
- `parent` (String) The identifier of the parent folder
- `title` (String) The title of the folder

### Read-Only

- `created_at` (String) The creation date of the folder
- `created_by` (String) The creator of the folder
- `id` (String) The ID of this resource.
- `updated_at` (String) The last update date of the folder
- `updated_by` (String) The last updater of the folder
13 changes: 8 additions & 5 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@ package provider

import (
"context"
"os"

"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/port-labs/terraform-provider-port-labs/v2/internal/cli"
"github.com/port-labs/terraform-provider-port-labs/v2/internal/consts"
"github.com/port-labs/terraform-provider-port-labs/v2/port/action"
"github.com/port-labs/terraform-provider-port-labs/v2/port/action-permissions"
"github.com/port-labs/terraform-provider-port-labs/v2/port/aggregation-properties"
action_permissions "github.com/port-labs/terraform-provider-port-labs/v2/port/action-permissions"
aggregation_properties "github.com/port-labs/terraform-provider-port-labs/v2/port/aggregation-properties"
"github.com/port-labs/terraform-provider-port-labs/v2/port/blueprint"
"github.com/port-labs/terraform-provider-port-labs/v2/port/blueprint-permissions"
blueprint_permissions "github.com/port-labs/terraform-provider-port-labs/v2/port/blueprint-permissions"
"github.com/port-labs/terraform-provider-port-labs/v2/port/entity"
"github.com/port-labs/terraform-provider-port-labs/v2/port/folder"
"github.com/port-labs/terraform-provider-port-labs/v2/port/integration"
"github.com/port-labs/terraform-provider-port-labs/v2/port/page"
"github.com/port-labs/terraform-provider-port-labs/v2/port/page-permissions"
page_permissions "github.com/port-labs/terraform-provider-port-labs/v2/port/page-permissions"
"github.com/port-labs/terraform-provider-port-labs/v2/port/scorecard"
"github.com/port-labs/terraform-provider-port-labs/v2/port/search"
"github.com/port-labs/terraform-provider-port-labs/v2/port/team"
"github.com/port-labs/terraform-provider-port-labs/v2/port/webhook"
"github.com/port-labs/terraform-provider-port-labs/v2/version"
"os"
)

var (
Expand Down Expand Up @@ -143,6 +145,7 @@ func (p *PortLabsProvider) Resources(ctx context.Context) []func() resource.Reso
team.NewTeamResource,
page.NewPageResource,
page_permissions.NewPagePermissionsResource,
folder.NewFolderResource,
}
}

Expand Down

0 comments on commit 74ed29e

Please sign in to comment.