Skip to content

Commit

Permalink
Upgrade terraform-provider-port-labs to v1.8.1 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankilevitch authored Jan 11, 2024
1 parent f99dc37 commit 488a706
Show file tree
Hide file tree
Showing 19 changed files with 2,285 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/port-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/port-labs/pulumi-port/sdk v1.0.0
github.com/pulumi/pulumi/sdk/v3 v3.99.0
github.com/pulumi/pulumi/sdk/v3 v3.100.0
)

replace github.com/port-labs/pulumi-port/sdk => ../../sdk
Expand Down
1 change: 1 addition & 0 deletions examples/port-go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw=
github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k=
github.com/pulumi/pulumi/sdk/v3 v3.99.0 h1:vsFoEEdweYg3Hm6/Jlj1sE2cLtauzoqAdVbLMcC7Cw8=
github.com/pulumi/pulumi/sdk/v3 v3.99.0/go.mod h1:wFM/6iAMlidgLDSF9QU+p3P+B+vg/xloFyVeZrVwA1w=
github.com/pulumi/pulumi/sdk/v3 v3.100.0/go.mod h1:SB8P0BEGBRaONBxwoTjUFhGPLU5P3+MHF6/tGitlHOM=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
Expand Down
20 changes: 20 additions & 0 deletions provider/cmd/pulumi-resource-port/bridge-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"resources": {
"port:index/action:Action": "port_action",
"port:index/actionPermissions:ActionPermissions": "port_action_permissions",
"port:index/aggregationProperty:AggregationProperty": "port_aggregation_property",
"port:index/blueprint:Blueprint": "port_blueprint",
"port:index/entity:Entity": "port_entity",
"port:index/scorecard:Scorecard": "port_scorecard",
Expand Down Expand Up @@ -100,6 +101,20 @@
"port:index/ActionUserPropertiesStringPropsDatasetRuleValue:ActionUserPropertiesStringPropsDatasetRuleValue": {
"jqQuery": "jq_query"
},
"port:index/AggregationPropertyMethod:AggregationPropertyMethod": {
"aggregateByProperty": "aggregate_by_property",
"averageByProperty": "average_by_property",
"averageEntities": "average_entities",
"countEntities": "count_entities"
},
"port:index/AggregationPropertyMethodAverageByProperty:AggregationPropertyMethodAverageByProperty": {
"averageOf": "average_of",
"measureTimeBy": "measure_time_by"
},
"port:index/AggregationPropertyMethodAverageEntities:AggregationPropertyMethodAverageEntities": {
"averageOf": "average_of",
"measureTimeBy": "measure_time_by"
},
"port:index/BlueprintProperties:BlueprintProperties": {
"arrayProps": "array_props",
"booleanProps": "boolean_props",
Expand Down Expand Up @@ -186,6 +201,11 @@
"actionIdentifier": "action_identifier",
"blueprintIdentifier": "blueprint_identifier"
},
"port:index/aggregationProperty:AggregationProperty": {
"aggregationIdentifier": "aggregation_identifier",
"blueprintIdentifier": "blueprint_identifier",
"targetBlueprintIdentifier": "target_blueprint_identifier"
},
"port:index/blueprint:Blueprint": {
"calculationProperties": "calculation_properties",
"createdAt": "created_at",
Expand Down
190 changes: 190 additions & 0 deletions provider/cmd/pulumi-resource-port/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,76 @@
"url"
]
},
"port:index/AggregationPropertyMethod:AggregationPropertyMethod": {
"properties": {
"aggregateByProperty": {
"$ref": "#/types/port:index/AggregationPropertyMethodAggregateByProperty:AggregationPropertyMethodAggregateByProperty"
},
"averageByProperty": {
"$ref": "#/types/port:index/AggregationPropertyMethodAverageByProperty:AggregationPropertyMethodAverageByProperty"
},
"averageEntities": {
"$ref": "#/types/port:index/AggregationPropertyMethodAverageEntities:AggregationPropertyMethodAverageEntities"
},
"countEntities": {
"type": "boolean"
}
},
"type": "object"
},
"port:index/AggregationPropertyMethodAggregateByProperty:AggregationPropertyMethodAggregateByProperty": {
"properties": {
"func": {
"type": "string"
},
"property": {
"type": "string"
}
},
"type": "object",
"required": [
"func",
"property"
]
},
"port:index/AggregationPropertyMethodAverageByProperty:AggregationPropertyMethodAverageByProperty": {
"properties": {
"averageOf": {
"type": "string"
},
"measureTimeBy": {
"type": "string"
},
"property": {
"type": "string"
}
},
"type": "object",
"required": [
"averageOf",
"measureTimeBy",
"property"
]
},
"port:index/AggregationPropertyMethodAverageEntities:AggregationPropertyMethodAverageEntities": {
"properties": {
"averageOf": {
"type": "string"
},
"measureTimeBy": {
"type": "string"
}
},
"type": "object",
"language": {
"nodejs": {
"requiredOutputs": [
"averageOf",
"measureTimeBy"
]
}
}
},
"port:index/BlueprintCalculationProperties:BlueprintCalculationProperties": {
"properties": {
"calculation": {
Expand Down Expand Up @@ -1846,6 +1916,126 @@
"type": "object"
}
},
"port:index/aggregationProperty:AggregationProperty": {
"properties": {
"aggregationIdentifier": {
"type": "string",
"description": "The identifier of the aggregation property in the blueprint\n"
},
"blueprintIdentifier": {
"type": "string",
"description": "The identifier of the blueprint the aggregation property will be added to\n"
},
"description": {
"type": "string",
"description": "The description of the aggregation property\n"
},
"icon": {
"type": "string",
"description": "The icon of the aggregation property\n"
},
"method": {
"$ref": "#/types/port:index/AggregationPropertyMethod:AggregationPropertyMethod",
"description": "The aggregation method to perform on the target blueprint, one of count_entities, average_entities, average_by_property,\naggregate_by_property\n"
},
"query": {
"type": "string",
"description": "Query to filter the target entities\n"
},
"targetBlueprintIdentifier": {
"type": "string",
"description": "The identifier of the blueprint to perform the aggregation on\n"
},
"title": {
"type": "string",
"description": "The title of the aggregation property\n"
}
},
"required": [
"aggregationIdentifier",
"blueprintIdentifier",
"method",
"targetBlueprintIdentifier"
],
"inputProperties": {
"aggregationIdentifier": {
"type": "string",
"description": "The identifier of the aggregation property in the blueprint\n"
},
"blueprintIdentifier": {
"type": "string",
"description": "The identifier of the blueprint the aggregation property will be added to\n"
},
"description": {
"type": "string",
"description": "The description of the aggregation property\n"
},
"icon": {
"type": "string",
"description": "The icon of the aggregation property\n"
},
"method": {
"$ref": "#/types/port:index/AggregationPropertyMethod:AggregationPropertyMethod",
"description": "The aggregation method to perform on the target blueprint, one of count_entities, average_entities, average_by_property,\naggregate_by_property\n"
},
"query": {
"type": "string",
"description": "Query to filter the target entities\n"
},
"targetBlueprintIdentifier": {
"type": "string",
"description": "The identifier of the blueprint to perform the aggregation on\n"
},
"title": {
"type": "string",
"description": "The title of the aggregation property\n"
}
},
"requiredInputs": [
"aggregationIdentifier",
"blueprintIdentifier",
"method",
"targetBlueprintIdentifier"
],
"stateInputs": {
"description": "Input properties used for looking up and filtering AggregationProperty resources.\n",
"properties": {
"aggregationIdentifier": {
"type": "string",
"description": "The identifier of the aggregation property in the blueprint\n"
},
"blueprintIdentifier": {
"type": "string",
"description": "The identifier of the blueprint the aggregation property will be added to\n"
},
"description": {
"type": "string",
"description": "The description of the aggregation property\n"
},
"icon": {
"type": "string",
"description": "The icon of the aggregation property\n"
},
"method": {
"$ref": "#/types/port:index/AggregationPropertyMethod:AggregationPropertyMethod",
"description": "The aggregation method to perform on the target blueprint, one of count_entities, average_entities, average_by_property,\naggregate_by_property\n"
},
"query": {
"type": "string",
"description": "Query to filter the target entities\n"
},
"targetBlueprintIdentifier": {
"type": "string",
"description": "The identifier of the blueprint to perform the aggregation on\n"
},
"title": {
"type": "string",
"description": "The title of the aggregation property\n"
}
},
"type": "object"
}
},
"port:index/blueprint:Blueprint": {
"properties": {
"calculationProperties": {
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20230912190043-e6d96b3b8f7e

require (
github.com/port-labs/terraform-provider-port-labs v1.8.0
github.com/port-labs/terraform-provider-port-labs v1.8.1
github.com/pulumi/pulumi-terraform-bridge/pf v0.23.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.70.0
github.com/pulumi/pulumi/sdk/v3 v3.100.0
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1582,8 +1582,8 @@ github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk=
github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/port-labs/terraform-provider-port-labs v1.8.0 h1:yeOWW7E6MQN8rpfcFC+x959DimVDO/dTObLj0nyL2fI=
github.com/port-labs/terraform-provider-port-labs v1.8.0/go.mod h1:pLn48/X30XZIrW3gvUM1rkVjAZkO7ZFjegc0x4hFdtc=
github.com/port-labs/terraform-provider-port-labs v1.8.1 h1:3ABEx/aE8Rqcak8jOlewW4mPldELmvVwnb9a6P7FGSA=
github.com/port-labs/terraform-provider-port-labs v1.8.1/go.mod h1:pLn48/X30XZIrW3gvUM1rkVjAZkO7ZFjegc0x4hFdtc=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo=
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
Expand Down
12 changes: 4 additions & 8 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
portVersion "github.com/port-labs/terraform-provider-port-labs/version"
pf "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
tfbridgetokens "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
"github.com/pulumi/pulumi/sdk/v3/go/common/tokens"
)

Expand Down Expand Up @@ -104,19 +105,11 @@ func Provider() tfbridge.ProviderInfo {
// "tags": {Type: tfbridge.MakeType(mainPkg, "Tags")},
// },
// },
"port_action": {Tok: portResource(mainMod, "Action")},
"port_blueprint": {Tok: portResource(mainMod, "Blueprint")},
"port_entity": {Tok: portResource(mainMod, "Entity")},
"port_webhook": {Tok: portResource(mainMod, "Webhook")},
"port_scorecard": {Tok: portResource(mainMod, "Scorecard")},
"port_team": {Tok: portResource(mainMod, "Team")},
"port_action_permissions": {Tok: portResource(mainMod, "ActionPermissions")},
},
DataSources: map[string]*tfbridge.DataSourceInfo{
// Map each resource in the Terraform provider to a Pulumi function. An example
// is below.
// "aws_ami": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getAmi")},

},
JavaScript: &tfbridge.JavaScriptInfo{
PackageName: "@port-labs/port",
Expand Down Expand Up @@ -156,5 +149,8 @@ func Provider() tfbridge.ProviderInfo {
},
},
}
info.MustComputeTokens(tfbridgetokens.SingleModule("port_", mainMod,
tfbridgetokens.MakeStandard(mainPkg)))

return info
}
Loading

0 comments on commit 488a706

Please sign in to comment.