Skip to content

Commit

Permalink
merge main and disable automations and upsert entity
Browse files Browse the repository at this point in the history
  • Loading branch information
talsabagport committed Apr 30, 2024
2 parents 9ab053d + a8b7815 commit 8d21b9a
Show file tree
Hide file tree
Showing 56 changed files with 4,283 additions and 1,092 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
8 changes: 4 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5.0.0
uses: crazy-max/ghaction-import-gpg@v6.1.0
with:
# These secrets will need to be configured for the repository:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.9.1
uses: goreleaser/goreleaser-action@v5.0.0
with:
version: latest
args: release --rm-dist
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,35 @@ jobs:
name: lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.48.0
- uses: hashicorp/setup-terraform@v2
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.2.6
terraform_wrapper: false
- name: Setup tools
run: make setup

acctest:
concurrency:
group: acctest
runs-on: ubuntu-20.04
strategy:
matrix:
go: ['1.18', '1.19']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.env
local/
__debug_bin*
terraform-provider-port-labs
terraform-provider-port-labs
.idea
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ setup:
cd tools && go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

acctest:
TF_ACC=1 PORT_CLIENT_ID=$(PORT_CLIENT_ID) PORT_CLIENT_SECRET=$(PORT_CLIENT_SECRET) go test ./...
TF_ACC=1 PORT_CLIENT_ID=$(PORT_CLIENT_ID) PORT_CLIENT_SECRET=$(PORT_CLIENT_SECRET) go test -p 1 ./...

gen-docs:
tfplugindocs
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<img align="right" src="https://user-images.githubusercontent.com/8277210/183290078-f38cdfd2-e5da-4562-82e6-f274d0330825.svg#gh-dark-mode-only" width="100" height="74" /> <img align="right" width="100" height="74" src="https://user-images.githubusercontent.com/8277210/183290025-d7b24277-dfb4-4ce1-bece-7fe0ecd5efd4.svg#gh-light-mode-only" />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://port-graphical-assets.s3.eu-west-1.amazonaws.com/Logo+Typo+%2B+Logo+Symbol+-+white.png">
<source media="(prefers-color-scheme: light)" srcset="https://port-graphical-assets.s3.eu-west-1.amazonaws.com/Logo+Typo+%2B+Logo+Symbol.svg">
<img align="right" height="54" src="https://port-graphical-assets.s3.eu-west-1.amazonaws.com/Logo+Typo+%2B+Logo+Symbol.svg">
</picture>

# Port Terraform Provider

Expand Down
177 changes: 46 additions & 131 deletions docs/resources/port_action.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ description: |-
myStringIdentifier = {
title = "My String Identifier"
required = true
format = "entity"
blueprint = port_blueprint.parent.identifier
dataset = {
combinator = "and"
rules = [{
property = "$title"
operator = "contains"
value = {
jq_query = "\"specificValue\""
}
}]
}
}
}
number_props = {
Expand Down Expand Up @@ -46,7 +58,16 @@ description: |-
title = "My Array Identifier"
required = true
string_items = {
format = "email"
format = "entity"
blueprint = port_blueprint.parent.identifier
dataset = jsonencode({
combinator = "and"
rules = [{
property = "$title"
operator = "contains"
value = "specificValue"
}]
})
}
}
}
Expand Down Expand Up @@ -101,6 +122,18 @@ resource "port_action" "create_microservice" {
myStringIdentifier = {
title = "My String Identifier"
required = true
format = "entity"
blueprint = port_blueprint.parent.identifier
dataset = {
combinator = "and"
rules = [{
property = "$title"
operator = "contains"
value = {
jq_query = "\"specificValue\""
}
}]
}
}
}
number_props = {
Expand Down Expand Up @@ -128,7 +161,16 @@ resource "port_action" "create_microservice" {
title = "My Array Identifier"
required = true
string_items = {
format = "email"
format = "entity"
blueprint = port_blueprint.parent.identifier
dataset = jsonencode({
combinator = "and"
rules = [{
property = "$title"
operator = "contains"
value = "specificValue"
}]
})
}
}
}
Expand Down Expand Up @@ -363,7 +405,6 @@ Optional:
Optional:

- `boolean_items` (Attributes) The items of the array property (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--array_props--boolean_items))
- `dataset` (Attributes) The dataset of the property (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--array_props--dataset))
- `default_jq_query` (String) The default jq query of the array property
- `depends_on` (List of String) The properties that this property depends on
- `description` (String) The description of the property
Expand All @@ -386,37 +427,6 @@ Optional:
- `default` (List of Boolean) The default of the items


<a id="nestedatt--self_service_trigger--user_properties--array_props--dataset"></a>
### Nested Schema for `self_service_trigger.user_properties.array_props.visible_jq_query`

Required:

- `combinator` (String) The combinator of the dataset
- `rules` (Attributes List) The rules of the dataset (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--array_props--visible_jq_query--rules))

<a id="nestedatt--self_service_trigger--user_properties--array_props--visible_jq_query--rules"></a>
### Nested Schema for `self_service_trigger.user_properties.array_props.visible_jq_query.rules`

Required:

- `operator` (String) The operator of the rule
- `value` (Object) The value of the rule (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--array_props--visible_jq_query--rules--value))

Optional:

- `blueprint` (String) The blueprint identifier of the rule
- `property` (String) The property identifier of the rule

<a id="nestedatt--self_service_trigger--user_properties--array_props--visible_jq_query--rules--value"></a>
### Nested Schema for `self_service_trigger.user_properties.array_props.visible_jq_query.rules.property`

Optional:

- `jq_query` (String)




<a id="nestedatt--self_service_trigger--user_properties--array_props--number_items"></a>
### Nested Schema for `self_service_trigger.user_properties.array_props.visible_jq_query`

Expand All @@ -441,6 +451,7 @@ Optional:
Optional:

- `blueprint` (String) The blueprint identifier the property relates to
- `dataset` (String) The dataset of an the entity-format items
- `default` (List of String) The default of the items
- `enum` (List of String) The enum of the items
- `enum_jq_query` (String) The enum jq query of the string items
Expand All @@ -453,7 +464,6 @@ Optional:

Optional:

- `dataset` (Attributes) The dataset of the property (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--boolean_props--dataset))
- `default` (Boolean) The default of the boolean property
- `default_jq_query` (String) The default jq query of the boolean property
- `depends_on` (List of String) The properties that this property depends on
Expand All @@ -464,44 +474,12 @@ Optional:
- `visible` (Boolean) The visibility of the boolean property
- `visible_jq_query` (String) The visibility condition jq query of the boolean property

<a id="nestedatt--self_service_trigger--user_properties--boolean_props--dataset"></a>
### Nested Schema for `self_service_trigger.user_properties.boolean_props.visible_jq_query`

Required:

- `combinator` (String) The combinator of the dataset
- `rules` (Attributes List) The rules of the dataset (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--boolean_props--visible_jq_query--rules))

<a id="nestedatt--self_service_trigger--user_properties--boolean_props--visible_jq_query--rules"></a>
### Nested Schema for `self_service_trigger.user_properties.boolean_props.visible_jq_query.rules`

Required:

- `operator` (String) The operator of the rule
- `value` (Object) The value of the rule (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--boolean_props--visible_jq_query--rules--value))

Optional:

- `blueprint` (String) The blueprint identifier of the rule
- `property` (String) The property identifier of the rule

<a id="nestedatt--self_service_trigger--user_properties--boolean_props--visible_jq_query--rules--value"></a>
### Nested Schema for `self_service_trigger.user_properties.boolean_props.visible_jq_query.rules.property`

Optional:

- `jq_query` (String)





<a id="nestedatt--self_service_trigger--user_properties--number_props"></a>
### Nested Schema for `self_service_trigger.user_properties.number_props`

Optional:

- `dataset` (Attributes) The dataset of the property (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--number_props--dataset))
- `default` (Number) The default of the number property
- `default_jq_query` (String) The default jq query of the number property
- `depends_on` (List of String) The properties that this property depends on
Expand All @@ -516,44 +494,12 @@ Optional:
- `visible` (Boolean) The visibility of the number property
- `visible_jq_query` (String) The visibility condition jq query of the number property

<a id="nestedatt--self_service_trigger--user_properties--number_props--dataset"></a>
### Nested Schema for `self_service_trigger.user_properties.number_props.visible_jq_query`

Required:

- `combinator` (String) The combinator of the dataset
- `rules` (Attributes List) The rules of the dataset (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--number_props--visible_jq_query--rules))

<a id="nestedatt--self_service_trigger--user_properties--number_props--visible_jq_query--rules"></a>
### Nested Schema for `self_service_trigger.user_properties.number_props.visible_jq_query.rules`

Required:

- `operator` (String) The operator of the rule
- `value` (Object) The value of the rule (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--number_props--visible_jq_query--rules--value))

Optional:

- `blueprint` (String) The blueprint identifier of the rule
- `property` (String) The property identifier of the rule

<a id="nestedatt--self_service_trigger--user_properties--number_props--visible_jq_query--rules--value"></a>
### Nested Schema for `self_service_trigger.user_properties.number_props.visible_jq_query.rules.property`

Optional:

- `jq_query` (String)





<a id="nestedatt--self_service_trigger--user_properties--object_props"></a>
### Nested Schema for `self_service_trigger.user_properties.object_props`

Optional:

- `dataset` (Attributes) The dataset of the property (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--object_props--dataset))
- `default` (String) The default of the object property
- `default_jq_query` (String) The default jq query of the object property
- `depends_on` (List of String) The properties that this property depends on
Expand All @@ -565,45 +511,14 @@ Optional:
- `visible` (Boolean) The visibility of the object property
- `visible_jq_query` (String) The visibility condition jq query of the object property

<a id="nestedatt--self_service_trigger--user_properties--object_props--dataset"></a>
### Nested Schema for `self_service_trigger.user_properties.object_props.visible_jq_query`

Required:

- `combinator` (String) The combinator of the dataset
- `rules` (Attributes List) The rules of the dataset (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--object_props--visible_jq_query--rules))

<a id="nestedatt--self_service_trigger--user_properties--object_props--visible_jq_query--rules"></a>
### Nested Schema for `self_service_trigger.user_properties.object_props.visible_jq_query.rules`

Required:

- `operator` (String) The operator of the rule
- `value` (Object) The value of the rule (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--object_props--visible_jq_query--rules--value))

Optional:

- `blueprint` (String) The blueprint identifier of the rule
- `property` (String) The property identifier of the rule

<a id="nestedatt--self_service_trigger--user_properties--object_props--visible_jq_query--rules--value"></a>
### Nested Schema for `self_service_trigger.user_properties.object_props.visible_jq_query.rules.property`

Optional:

- `jq_query` (String)





<a id="nestedatt--self_service_trigger--user_properties--string_props"></a>
### Nested Schema for `self_service_trigger.user_properties.string_props`

Optional:

- `blueprint` (String) The blueprint identifier the string property relates to
- `dataset` (Attributes) The dataset of the property (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--string_props--dataset))
- `dataset` (Attributes) The dataset of an the entity-format property (see [below for nested schema](#nestedatt--self_service_trigger--user_properties--string_props--dataset))
- `default` (String) The default of the string property
- `default_jq_query` (String) The default jq query of the string property
- `depends_on` (List of String) The properties that this property depends on
Expand Down
Loading

0 comments on commit 8d21b9a

Please sign in to comment.