Skip to content

Commit

Permalink
Port 12834 system blueprints in terraform (#2016)
Browse files Browse the repository at this point in the history
* api request body size limitations to the docs

* add terraform support info to users and teams blueprints

* Update docs/sso-rbac/rbac/migration.md

Co-authored-by: hadar-co <[email protected]>

* Update docs/sso-rbac/rbac/as-blueprints.md

Co-authored-by: hadar-co <[email protected]>

* fix pr comments

* fix pr comments

---------

Co-authored-by: hadar-co <[email protected]>
  • Loading branch information
itamar-smirra-port and hadar-co authored Feb 10, 2025
1 parent 4014bb9 commit 57966ea
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
24 changes: 24 additions & 0 deletions docs/sso-rbac/rbac/as-blueprints.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,30 @@ Since these teams are synced from your IdP the following actions cannot be perfo

:::

### Terraform support

Since the `User` and `Team` blueprints can only be extended, to configure them using Terraform you need use the `port_system_blueprint` resource.
These blueprints can not be created so don't forget to import them to your Terraform state.

The `port_system_blueprint` resource is supported in Terraform starting from version **2.1.8**.

For example:

```hcl showLineNumbers
resource "port_system_blueprint" "user" {
identifier = "_user"
# Only new properties that will be added to the blueprint
properties = {
string_props = {
"age" = {
type = "number"
title = "Age"
}
}
}
}
```

## User status

A user can have one of the following statuses at any given time:
Expand Down
9 changes: 8 additions & 1 deletion docs/sso-rbac/rbac/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,11 @@ Once the migration is complete, the new User and Team blueprints will be availab
Please note that running the script after completing the migration may still show resources as "affected". This is because the script looks for any team-related references, even if they have been properly migrated to use identifiers. Therefore, the script results should not be used to track migration progress or verify completion status.

If you need to verify your migration status, please review the actual changes made to your resources directly.
:::
:::

## Terraform migration
In order to properly manage the `User` and `Team` blueprints using Terraform, you need to use the `port_system_blueprint` resource (and not the `port_blueprint` resource).
This resource will extend the defined blueprint with the new specified properties and relations. This will make sure no drift will happen in the future if the base structure of the system blueprint will change.

The `port_system_blueprint` resource is supported in Terraform starting from version **2.1.8**.

0 comments on commit 57966ea

Please sign in to comment.