diff --git a/go.mod b/go.mod index e4335c47..a40fa9b9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/port-labs/terraform-provider-port-labs +module github.com/port-labs/terraform-provider-port-labs/v2 go 1.18 diff --git a/internal/acctest/acctest.go b/internal/acctest/acctest.go index 34fbe359..4a22e13f 100644 --- a/internal/acctest/acctest.go +++ b/internal/acctest/acctest.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" - "github.com/port-labs/terraform-provider-port-labs/internal/consts" - "github.com/port-labs/terraform-provider-port-labs/provider" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/consts" + "github.com/port-labs/terraform-provider-port-labs/v2/provider" ) var ( diff --git a/main.go b/main.go index 5cc1dfcb..4f59f471 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,7 @@ import ( "log" "github.com/hashicorp/terraform-plugin-framework/providerserver" - "github.com/port-labs/terraform-provider-port-labs/provider" + "github.com/port-labs/terraform-provider-port-labs/v2/provider" ) func main() { diff --git a/port/action-permissions/actionPermissionToPortBody.go b/port/action-permissions/actionPermissionToPortBody.go index 00d93904..b755e84e 100644 --- a/port/action-permissions/actionPermissionToPortBody.go +++ b/port/action-permissions/actionPermissionToPortBody.go @@ -1,9 +1,9 @@ package action_permissions import ( - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func actionPermissionsToPortBody(state *PermissionsModel) (*cli.ActionPermissions, error) { diff --git a/port/action-permissions/refreshActionPermissionsToState.go b/port/action-permissions/refreshActionPermissionsToState.go index 2fa9cc47..fdca42d5 100644 --- a/port/action-permissions/refreshActionPermissionsToState.go +++ b/port/action-permissions/refreshActionPermissionsToState.go @@ -3,8 +3,8 @@ package action_permissions import ( "encoding/json" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" ) func refreshActionPermissionsState(state *ActionPermissionsModel, a *cli.ActionPermissions, actionId string) error { diff --git a/port/action-permissions/resource.go b/port/action-permissions/resource.go index ddee22aa..0ddff0b1 100644 --- a/port/action-permissions/resource.go +++ b/port/action-permissions/resource.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) var _ resource.Resource = &ActionPermissionsResource{} diff --git a/port/action-permissions/resource_test.go b/port/action-permissions/resource_test.go index 67f92f8f..f783675c 100644 --- a/port/action-permissions/resource_test.go +++ b/port/action-permissions/resource_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func testAccCreateBlueprintAndActionConfig(blueprintIdentifier string, actionIdentifier string) string { @@ -178,13 +178,13 @@ func TestAccPortActionPermissionsWithPolicy(t *testing.T) { permissions = { "execute": { "roles": [ - "Member", - ], + "Member", + ], "users": [], "teams": [], "owned_by_team": false - }, - "approve": { + }, + "approve": { "roles": [], "users": [], "teams": [], @@ -226,13 +226,13 @@ func TestAccPortActionPermissionsWithPolicy(t *testing.T) { permissions = { "execute": { "roles": [ - "Member", - ], + "Member", + ], "users": [], "teams": [], "owned_by_team": false - }, - "approve": { + }, + "approve": { "roles": [], "users": [], "teams": [] @@ -286,13 +286,13 @@ func TestAccPortActionPermissionsWithPolicyUpdate(t *testing.T) { permissions = { "execute": { "roles": [ - "Member", - ], + "Member", + ], "users": [], "teams": [], "owned_by_team": false - }, - "approve": { + }, + "approve": { "roles": [], "users": [], "teams": [], @@ -334,13 +334,13 @@ func TestAccPortActionPermissionsWithPolicyUpdate(t *testing.T) { permissions = { "execute": { "roles": [ - "Member", - ], + "Member", + ], "users": [], "teams": [], "owned_by_team": false - }, - "approve": { + }, + "approve": { "roles": [], "users": [], "teams": [], @@ -370,9 +370,9 @@ func TestAccPortActionPermissionsWithPolicyUpdate(t *testing.T) { } }, conditions: [ - "true"] + "true"] }) - } + } } }` resource.Test(t, resource.TestCase{ @@ -422,13 +422,13 @@ func TestAccPortActionPermissionsImportState(t *testing.T) { permissions = { "execute": { "roles": [ - "Member", - ], + "Member", + ], "users": [], "teams": [], "owned_by_team": false - }, - "approve": { + }, + "approve": { "roles": [], "users": [], "teams": [], diff --git a/port/action/actionStateToPortBody.go b/port/action/actionStateToPortBody.go index 5d4228ec..4754c553 100644 --- a/port/action/actionStateToPortBody.go +++ b/port/action/actionStateToPortBody.go @@ -2,9 +2,9 @@ package action import ( "context" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/consts" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "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/internal/utils" ) func actionDataSetToPortBody(dataSet *DatasetModel) *cli.Dataset { diff --git a/port/action/array.go b/port/action/array.go index d14bd323..71d4b558 100644 --- a/port/action/array.go +++ b/port/action/array.go @@ -8,9 +8,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func handleArrayItemsToBody(ctx context.Context, property *cli.ActionProperty, prop ArrayPropModel, required *[]string) error { diff --git a/port/action/boolean.go b/port/action/boolean.go index eb03609e..8664ed1d 100644 --- a/port/action/boolean.go +++ b/port/action/boolean.go @@ -3,8 +3,8 @@ package action import ( "context" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func booleanPropResourceToBody(ctx context.Context, d *SelfServiceTriggerModel, props map[string]cli.ActionProperty, required *[]string) error { diff --git a/port/action/number.go b/port/action/number.go index c361d478..09619377 100644 --- a/port/action/number.go +++ b/port/action/number.go @@ -7,9 +7,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func numberPropResourceToBody(ctx context.Context, state *SelfServiceTriggerModel, props map[string]cli.ActionProperty, required *[]string) error { diff --git a/port/action/object.go b/port/action/object.go index d9680439..4dacc028 100644 --- a/port/action/object.go +++ b/port/action/object.go @@ -4,9 +4,9 @@ import ( "context" "encoding/json" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func objectPropResourceToBody(ctx context.Context, d *SelfServiceTriggerModel, props map[string]cli.ActionProperty, required *[]string) error { diff --git a/port/action/refreshActionState.go b/port/action/refreshActionState.go index c2b50637..9afdc2d6 100644 --- a/port/action/refreshActionState.go +++ b/port/action/refreshActionState.go @@ -8,10 +8,10 @@ import ( "github.com/samber/lo" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/consts" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "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/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func writeInvocationMethodToResource(ctx context.Context, a *cli.Action, state *ActionModel) error { diff --git a/port/action/resource.go b/port/action/resource.go index da12a3c5..a65231f5 100644 --- a/port/action/resource.go +++ b/port/action/resource.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) var _ resource.Resource = &ActionResource{} diff --git a/port/action/resource_test.go b/port/action/resource_test.go index 20fd2c4e..2426229c 100644 --- a/port/action/resource_test.go +++ b/port/action/resource_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func testAccCreateBlueprintConfig(identifier string) string { @@ -76,7 +76,7 @@ func TestAccPortAction(t *testing.T) { "myStringIdentifier" = { "title" = "My String Identifier" "required" = true - + } } "number_props" = { @@ -752,7 +752,7 @@ func TestAccPortActionEnumJqQuery(t *testing.T) { enum_jq_query = "[1, 2]" } } - + } } } @@ -1212,7 +1212,7 @@ func TestAccPortActionRequiredConflictsWithRequiredJQ(t *testing.T) { self_service_trigger = { operation = "DAY-2" blueprint_identifier = port_blueprint.microservice.identifier - user_properties = { + user_properties = { "string_props" = { "equalsOne" = { "title" = "equalsOne" @@ -1313,13 +1313,13 @@ func TestAccPortActionRequiredFalseAndNull(t *testing.T) { self_service_trigger = { operation = "DAY-2" blueprint_identifier = port_blueprint.microservice.identifier - user_properties = { + user_properties = { "string_props" = { "notRequiredExist" = { "title" = "notEqualsOne" } "requiredTrue" = { - "title" = "notEqualsOne" + "title" = "notEqualsOne" "required" = true } } @@ -1684,25 +1684,25 @@ func TestAccPortActionNoUserPropertiesConditional(t *testing.T) { title = "Prop" } } : null - + number_props = port_blueprint.microservice.identifier == "notTheRealIdentifier" ? { numProp = { title = "Prop" } } : null - + boolean_props = port_blueprint.microservice.identifier == "notTheRealIdentifier" ? { boolProp = { title = "Prop" } } : null - + object_props = port_blueprint.microservice.identifier == "notTheRealIdentifier" ? { objProp = { title = "Prop" } } : null - + array_props = port_blueprint.microservice.identifier == "notTheRealIdentifier" ? { arrProp = { title = "Prop" diff --git a/port/action/schema.go b/port/action/schema.go index 4adf4d9e..8694fe94 100644 --- a/port/action/schema.go +++ b/port/action/schema.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-go/tftypes" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" "regexp" ) diff --git a/port/action/string.go b/port/action/string.go index bdca3bec..8622cc07 100644 --- a/port/action/string.go +++ b/port/action/string.go @@ -7,9 +7,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func stringPropResourceToBody(ctx context.Context, d *SelfServiceTriggerModel, props map[string]cli.ActionProperty, required *[]string) error { diff --git a/port/aggregation-properties/readStateToPortBody.go b/port/aggregation-properties/readStateToPortBody.go index 809836c9..f3b04dd4 100644 --- a/port/aggregation-properties/readStateToPortBody.go +++ b/port/aggregation-properties/readStateToPortBody.go @@ -1,8 +1,8 @@ package aggregation_properties import ( - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func aggregationPropertiesToBody(state *AggregationPropertiesModel) (*map[string]cli.BlueprintAggregationProperty, error) { diff --git a/port/aggregation-properties/refreshAggregationPropertyToState.go b/port/aggregation-properties/refreshAggregationPropertyToState.go index 4f2094e3..8de913f0 100644 --- a/port/aggregation-properties/refreshAggregationPropertyToState.go +++ b/port/aggregation-properties/refreshAggregationPropertyToState.go @@ -2,8 +2,8 @@ package aggregation_properties import ( "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func refreshAggregationPropertiesState(state *AggregationPropertiesModel, aggregationProperties map[string]cli.BlueprintAggregationProperty) error { diff --git a/port/aggregation-properties/resource.go b/port/aggregation-properties/resource.go index 8c8711b6..93a43131 100644 --- a/port/aggregation-properties/resource.go +++ b/port/aggregation-properties/resource.go @@ -4,7 +4,7 @@ import ( "context" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) var _ resource.Resource = &AggregationPropertiesResource{} diff --git a/port/aggregation-properties/resource_test.go b/port/aggregation-properties/resource_test.go index 3cb865ef..d1f91676 100644 --- a/port/aggregation-properties/resource_test.go +++ b/port/aggregation-properties/resource_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func baseBlueprintsTemplate(parentBlueprintIdentifier string, childBlueprintIdentifier string) string { @@ -57,8 +57,8 @@ func TestAccPortAggregationPropertyWithCycleRelation(t *testing.T) { title = "Count Childrens" icon = "Terraform" description = "Count Childrens" - method = { - count_entities = true + method = { + count_entities = true } } } @@ -93,9 +93,9 @@ func TestAccCreateAggregationPropertyAverageEntities(t *testing.T) { properties = { "count_entities" = { target_blueprint_identifier = port_blueprint.child_blueprint.identifier - title = "Count Childrens" - icon = "Terraform" - description = "Count Childrens" + title = "Count Childrens" + icon = "Terraform" + description = "Count Childrens" method = { average_entities = { "average_of" = "month" @@ -103,7 +103,7 @@ func TestAccCreateAggregationPropertyAverageEntities(t *testing.T) { } } } - } + } } ` @@ -113,14 +113,14 @@ func TestAccCreateAggregationPropertyAverageEntities(t *testing.T) { properties = { "count_entities" = { target_blueprint_identifier = port_blueprint.child_blueprint.identifier - title = "Count Childrens" - icon = "Terraform" - description = "Count Childrens" + title = "Count Childrens" + icon = "Terraform" + description = "Count Childrens" method = { average_entities = {} } } - } + } } ` diff --git a/port/blueprint-permissions/blueprintPermissionToPortBody.go b/port/blueprint-permissions/blueprintPermissionToPortBody.go index 2f715d8b..68a9b8cc 100644 --- a/port/blueprint-permissions/blueprintPermissionToPortBody.go +++ b/port/blueprint-permissions/blueprintPermissionToPortBody.go @@ -1,8 +1,8 @@ package blueprint_permissions import ( - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func blueprintPermissionsTFBlockToBlueprintPermissionsBlock(block BlueprintPermissionsTFBlock) cli.BlueprintPermissionsBlock { diff --git a/port/blueprint-permissions/refreshBluePrintPermissionsToState.go b/port/blueprint-permissions/refreshBluePrintPermissionsToState.go index 0b0c31f6..96931565 100644 --- a/port/blueprint-permissions/refreshBluePrintPermissionsToState.go +++ b/port/blueprint-permissions/refreshBluePrintPermissionsToState.go @@ -4,7 +4,7 @@ import ( "strings" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func goStringListToTFList(list []string) []types.String { diff --git a/port/blueprint-permissions/resource.go b/port/blueprint-permissions/resource.go index 97709900..308de5f2 100644 --- a/port/blueprint-permissions/resource.go +++ b/port/blueprint-permissions/resource.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) var _ resource.Resource = &BlueprintPermissionsResource{} diff --git a/port/blueprint-permissions/resource_test.go b/port/blueprint-permissions/resource_test.go index b1f86be7..aff07fa4 100644 --- a/port/blueprint-permissions/resource_test.go +++ b/port/blueprint-permissions/resource_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func createBlueprint(identifier string) string { diff --git a/port/blueprint/array.go b/port/blueprint/array.go index aece5dac..4b52287c 100644 --- a/port/blueprint/array.go +++ b/port/blueprint/array.go @@ -7,9 +7,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func arrayPropResourceToBody(ctx context.Context, state *BlueprintModel, props map[string]cli.BlueprintProperty, required *[]string) error { diff --git a/port/blueprint/boolean.go b/port/blueprint/boolean.go index 62cfb31a..b6000928 100644 --- a/port/blueprint/boolean.go +++ b/port/blueprint/boolean.go @@ -1,6 +1,6 @@ package blueprint -import "github.com/port-labs/terraform-provider-port-labs/internal/cli" +import "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" func booleanPropResourceToBody(state *BlueprintModel, props map[string]cli.BlueprintProperty, required *[]string) { for propIdentifier, prop := range state.Properties.BooleanProps { diff --git a/port/blueprint/number.go b/port/blueprint/number.go index e21bc57d..472c4c73 100644 --- a/port/blueprint/number.go +++ b/port/blueprint/number.go @@ -6,9 +6,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func numberPropResourceToBody(ctx context.Context, state *BlueprintModel, props map[string]cli.BlueprintProperty, required *[]string) error { diff --git a/port/blueprint/object.go b/port/blueprint/object.go index ccbeb8ce..9cbb5e35 100644 --- a/port/blueprint/object.go +++ b/port/blueprint/object.go @@ -5,7 +5,7 @@ import ( "log" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func objectPropResourceToBody(state *BlueprintModel, props map[string]cli.BlueprintProperty, required *[]string) { diff --git a/port/blueprint/readStateToPortBody.go b/port/blueprint/readStateToPortBody.go index d0d36b1f..eb28ddcf 100644 --- a/port/blueprint/readStateToPortBody.go +++ b/port/blueprint/readStateToPortBody.go @@ -2,7 +2,7 @@ package blueprint import ( "context" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func propsResourceToBody(ctx context.Context, state *BlueprintModel) (map[string]cli.BlueprintProperty, []string, error) { diff --git a/port/blueprint/resource.go b/port/blueprint/resource.go index 31ae7852..191b452a 100644 --- a/port/blueprint/resource.go +++ b/port/blueprint/resource.go @@ -7,9 +7,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-log/tflog" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/consts" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" + "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/internal/flex" "strings" "time" ) diff --git a/port/blueprint/resource_test.go b/port/blueprint/resource_test.go index 66fc4694..a10f0364 100644 --- a/port/blueprint/resource_test.go +++ b/port/blueprint/resource_test.go @@ -3,16 +3,16 @@ package blueprint_test import ( "context" "fmt" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/consts" - "github.com/port-labs/terraform-provider-port-labs/version" + "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/version" "os" "regexp" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func TestAccPortBlueprintBasic(t *testing.T) { @@ -392,7 +392,7 @@ func TestAccPortBlueprintWithRelation(t *testing.T) { relations = { "test-rel" = { title = "Test Relation" - target = port_blueprint.microservice1.identifier + target = port_blueprint.microservice1.identifier } } } diff --git a/port/blueprint/schema.go b/port/blueprint/schema.go index c9008ea8..94a13023 100644 --- a/port/blueprint/schema.go +++ b/port/blueprint/schema.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func MetadataProperties() map[string]schema.Attribute { @@ -582,7 +582,7 @@ resource "port_blueprint" "microservice" { There could be cases where a blueprint will be managed by Terraform, but entities will get created from other sources (e.g. Port UI, API or other supported integrations). In this case, when trying to delete the blueprint, Terraform will fail because it will try to delete the blueprint without deleting the entities first as they are not managed by Terraform. -To overcome this behavior, you can set the argument ` + "`force_delete_entities=true`" + `. +To overcome this behavior, you can set the argument ` + "`force_delete_entities=true`" + `. On the blueprint destroy it will trigger a migration that will delete all the entities in the blueprint and then delete the blueprint itself. ` + "```hcl" + ` diff --git a/port/blueprint/string.go b/port/blueprint/string.go index 290f7fd5..5b934f7c 100644 --- a/port/blueprint/string.go +++ b/port/blueprint/string.go @@ -6,9 +6,9 @@ import ( "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func addStringPropertiesToState(ctx context.Context, v *cli.BlueprintProperty) *StringPropModel { diff --git a/port/blueprint/updatePropertiesToState.go b/port/blueprint/updatePropertiesToState.go index 3575e0db..50a7a2e1 100644 --- a/port/blueprint/updatePropertiesToState.go +++ b/port/blueprint/updatePropertiesToState.go @@ -5,8 +5,8 @@ import ( "encoding/json" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" "github.com/samber/lo" ) diff --git a/port/entity/entityResourceToPortBody.go b/port/entity/entityResourceToPortBody.go index 38cbf738..b272cfa8 100644 --- a/port/entity/entityResourceToPortBody.go +++ b/port/entity/entityResourceToPortBody.go @@ -5,8 +5,8 @@ import ( "encoding/json" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func writeArrayResourceToBody(ctx context.Context, state *EntityModel, properties map[string]interface{}) error { diff --git a/port/entity/refreshEntityToState.go b/port/entity/refreshEntityToState.go index 01e3dcfd..d332a8aa 100644 --- a/port/entity/refreshEntityToState.go +++ b/port/entity/refreshEntityToState.go @@ -5,7 +5,7 @@ import ( "encoding/json" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func refreshArrayEntityState(ctx context.Context, state *EntityModel, arrayProperties map[string][]interface{}, blueprint *cli.Blueprint) { diff --git a/port/entity/resource.go b/port/entity/resource.go index 9e3ee089..af62a862 100644 --- a/port/entity/resource.go +++ b/port/entity/resource.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) // Ensure provider defined types fully satisfy framework interfaces diff --git a/port/entity/resource_test.go b/port/entity/resource_test.go index 0b02bab1..f5fde083 100644 --- a/port/entity/resource_test.go +++ b/port/entity/resource_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func TestAccPortEntity(t *testing.T) { @@ -245,7 +245,7 @@ func TestAccPortEntityWithRelation(t *testing.T) { "title" = "Test Relation" "target" = port_blueprint.microservice2.identifier } - } + } } resource "port_blueprint" "microservice2" { title = "TF Provider Test BP1" @@ -274,7 +274,7 @@ func TestAccPortEntityWithRelation(t *testing.T) { } } } - + resource "port_entity" "microservice2" { title = "TF Provider Test Entity1" identifier = "tf-entity-2" @@ -418,7 +418,7 @@ func TestAccPortEntityWithEmptyRelation(t *testing.T) { "title" = "Test Relation" "target" = port_blueprint.microservice2.identifier } - } + } } resource "port_blueprint" "microservice2" { title = "TF Provider Test BP1" diff --git a/port/page-permissions/pagePermissionToPortBody.go b/port/page-permissions/pagePermissionToPortBody.go index e7799f42..50c440b2 100644 --- a/port/page-permissions/pagePermissionToPortBody.go +++ b/port/page-permissions/pagePermissionToPortBody.go @@ -1,8 +1,8 @@ package page_permissions import ( - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" ) func pagePermissionsToPortBody(state *PagePermissionsModel) (*cli.PagePermissions, error) { diff --git a/port/page-permissions/refreshPagePermissionsToState.go b/port/page-permissions/refreshPagePermissionsToState.go index c26971b7..87bb0819 100644 --- a/port/page-permissions/refreshPagePermissionsToState.go +++ b/port/page-permissions/refreshPagePermissionsToState.go @@ -2,7 +2,7 @@ package page_permissions import ( "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func refreshPagePermissionsState(state *PagePermissionsModel, a *cli.PagePermissions, pageId string) error { diff --git a/port/page-permissions/resource.go b/port/page-permissions/resource.go index 0cd04ba9..39b0d53e 100644 --- a/port/page-permissions/resource.go +++ b/port/page-permissions/resource.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) var _ resource.Resource = &PagePermissionsResource{} diff --git a/port/page-permissions/resource_test.go b/port/page-permissions/resource_test.go index 3a9d96cf..275b68de 100644 --- a/port/page-permissions/resource_test.go +++ b/port/page-permissions/resource_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func createPage(identifier string) string { @@ -106,7 +106,7 @@ func TestAccPortPagePermissionsUpdateWithUsers(t *testing.T) { teamName := utils.GenID() var testAccBasePagePermissionsConfigUpdate = fmt.Sprintf(` - + resource "port_team" "team" { name = "%s" description = "Test description" diff --git a/port/page/pageToPortBody.go b/port/page/pageToPortBody.go index 8bbb0049..cda50f46 100644 --- a/port/page/pageToPortBody.go +++ b/port/page/pageToPortBody.go @@ -2,8 +2,8 @@ package page import ( "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func PageToPortBody(pm *PageModel) (*cli.Page, error) { diff --git a/port/page/refreshPageToState.go b/port/page/refreshPageToState.go index 90f8a8c2..529b1638 100644 --- a/port/page/refreshPageToState.go +++ b/port/page/refreshPageToState.go @@ -3,7 +3,7 @@ package page import ( "encoding/json" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func refreshPageToState(pm *PageModel, b *cli.Page) error { diff --git a/port/page/resource.go b/port/page/resource.go index 31da0717..305b3229 100644 --- a/port/page/resource.go +++ b/port/page/resource.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-log/tflog" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) var _ resource.Resource = &PageResource{} diff --git a/port/page/resource_test.go b/port/page/resource_test.go index 7ccc2d33..99d03b82 100644 --- a/port/page/resource_test.go +++ b/port/page/resource_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func testAccCreateBlueprintConfig(identifier string) string { diff --git a/port/scorecard/refreshScorecardState.go b/port/scorecard/refreshScorecardState.go index 710f066a..a263ce15 100644 --- a/port/scorecard/refreshScorecardState.go +++ b/port/scorecard/refreshScorecardState.go @@ -3,10 +3,10 @@ package scorecard import ( "context" "fmt" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func refreshScorecardState(ctx context.Context, state *ScorecardModel, s *cli.Scorecard, blueprintIdentifier string) { diff --git a/port/scorecard/resource.go b/port/scorecard/resource.go index f827a04a..cbad0c9b 100644 --- a/port/scorecard/resource.go +++ b/port/scorecard/resource.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) // Ensure provider defined types fully satisfy framework interfaces diff --git a/port/scorecard/resource_test.go b/port/scorecard/resource_test.go index 29465afe..8ab1657f 100644 --- a/port/scorecard/resource_test.go +++ b/port/scorecard/resource_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func testAccCreateBlueprintConfig(identifier string) string { @@ -50,7 +50,7 @@ func TestAccPortScorecardBasic(t *testing.T) { rules = [{ identifier = "hasTeam" title = "Has Team" - level = "Gold" + level = "Gold" query = { combinator = "and" conditions = [jsonencode({ @@ -62,7 +62,7 @@ func TestAccPortScorecardBasic(t *testing.T) { depends_on = [ port_blueprint.microservice - ] + ] }`, scorecardIdentifier, blueprintIdentifier) resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.TestAccPreCheck(t) }, @@ -195,7 +195,7 @@ func TestAccPortScorecardUpdate(t *testing.T) { rules = [{ identifier = "hasTeam" title = "Has Team" - level = "Gold" + level = "Gold" query = { combinator = "and" conditions = [jsonencode({ @@ -207,7 +207,7 @@ func TestAccPortScorecardUpdate(t *testing.T) { depends_on = [ port_blueprint.microservice - ] + ] }`, scorecardIdentifier, blueprintIdentifier) var testAccActionConfigUpdate = testAccCreateBlueprintConfig(blueprintIdentifier) + fmt.Sprintf(` @@ -280,7 +280,7 @@ func TestAccPortScorecardImport(t *testing.T) { rules = [{ identifier = "hasTeam" title = "Has Team" - level = "Gold" + level = "Gold" query = { combinator = "and" conditions = [jsonencode({ @@ -292,7 +292,7 @@ func TestAccPortScorecardImport(t *testing.T) { depends_on = [ port_blueprint.microservice - ] + ] }`, scorecardIdentifier, blueprintIdentifier) resource.Test(t, resource.TestCase{ @@ -336,7 +336,7 @@ func TestAccPortScorecardUpdateIdentifier(t *testing.T) { rules = [{ identifier = "hasTeam" title = "Has Team" - level = "Gold" + level = "Gold" query = { combinator = "and" conditions = [jsonencode({ @@ -348,7 +348,7 @@ func TestAccPortScorecardUpdateIdentifier(t *testing.T) { depends_on = [ port_blueprint.microservice - ] + ] }`, scorecardIdentifier, blueprintIdentifier) var testAccActionConfigUpdate = testAccCreateBlueprintConfig(blueprintIdentifier) + fmt.Sprintf(` @@ -359,7 +359,7 @@ func TestAccPortScorecardUpdateIdentifier(t *testing.T) { rules = [{ identifier = "hasTeam" title = "Has Team" - level = "Gold" + level = "Gold" query = { combinator = "and" conditions = [jsonencode({ diff --git a/port/scorecard/scorecardResourceToPortBody.go b/port/scorecard/scorecardResourceToPortBody.go index 6aeb96ee..3c78abe7 100644 --- a/port/scorecard/scorecardResourceToPortBody.go +++ b/port/scorecard/scorecardResourceToPortBody.go @@ -3,7 +3,7 @@ package scorecard import ( "context" "encoding/json" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func scorecardResourceToPortBody(ctx context.Context, state *ScorecardModel) (*cli.Scorecard, error) { diff --git a/port/team/refreshTeamState.go b/port/team/refreshTeamState.go index 772f097a..8ff5fd9e 100644 --- a/port/team/refreshTeamState.go +++ b/port/team/refreshTeamState.go @@ -4,8 +4,8 @@ import ( "context" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" ) func refreshTeamState(ctx context.Context, state *TeamModel, t *cli.Team) error { diff --git a/port/team/resource.go b/port/team/resource.go index 964fe717..b5a305b8 100644 --- a/port/team/resource.go +++ b/port/team/resource.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) // Ensure provider defined types fully satisfy framework interfaces diff --git a/port/team/resource_test.go b/port/team/resource_test.go index aa43c4e7..39dd231c 100644 --- a/port/team/resource_test.go +++ b/port/team/resource_test.go @@ -2,11 +2,11 @@ package team_test import ( "fmt" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" ) func TestAccPortTeam(t *testing.T) { diff --git a/port/team/teamResourceToPortBody.go b/port/team/teamResourceToPortBody.go index a3b63beb..d508c92a 100644 --- a/port/team/teamResourceToPortBody.go +++ b/port/team/teamResourceToPortBody.go @@ -3,7 +3,7 @@ package team import ( "context" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func TeamResourceToPortBody(ctx context.Context, state *TeamModel) (*cli.Team, error) { diff --git a/port/webhook/refreshWebhookState.go b/port/webhook/refreshWebhookState.go index 0e820471..165ee9d1 100644 --- a/port/webhook/refreshWebhookState.go +++ b/port/webhook/refreshWebhookState.go @@ -4,8 +4,8 @@ import ( "context" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/flex" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/flex" ) func refreshWebhookState(ctx context.Context, state *WebhookModel, w *cli.Webhook) error { diff --git a/port/webhook/resource.go b/port/webhook/resource.go index 6a946999..102c8bb3 100644 --- a/port/webhook/resource.go +++ b/port/webhook/resource.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) // Ensure provider defined types fully satisfy framework interfaces diff --git a/port/webhook/resource_test.go b/port/webhook/resource_test.go index a8dc2e06..222bf2ea 100644 --- a/port/webhook/resource_test.go +++ b/port/webhook/resource_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/port-labs/terraform-provider-port-labs/internal/acctest" - "github.com/port-labs/terraform-provider-port-labs/internal/utils" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/acctest" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/utils" ) func testAccCreateBlueprintConfig(identifier string) string { @@ -111,7 +111,7 @@ func TestAccPortWebhook(t *testing.T) { } depends_on = [ port_blueprint.microservice - ] + ] }`, webhookIdentifier, identifier) resource.Test(t, resource.TestCase{ @@ -195,7 +195,7 @@ func TestAccPortWebhookImport(t *testing.T) { } depends_on = [ port_blueprint.microservice - ] + ] }`, webhookIdentifier, identifier) resource.Test(t, resource.TestCase{ diff --git a/port/webhook/webhookResourceToPortBody.go b/port/webhook/webhookResourceToPortBody.go index ab0f0e4e..f614b8be 100644 --- a/port/webhook/webhookResourceToPortBody.go +++ b/port/webhook/webhookResourceToPortBody.go @@ -3,7 +3,7 @@ package webhook import ( "context" - "github.com/port-labs/terraform-provider-port-labs/internal/cli" + "github.com/port-labs/terraform-provider-port-labs/v2/internal/cli" ) func webhookResourceToPortBody(ctx context.Context, state *WebhookModel) (*cli.Webhook, error) { diff --git a/provider/provider.go b/provider/provider.go index d7065449..bf418229 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -6,20 +6,20 @@ import ( "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/internal/cli" - "github.com/port-labs/terraform-provider-port-labs/internal/consts" - "github.com/port-labs/terraform-provider-port-labs/port/action" - "github.com/port-labs/terraform-provider-port-labs/port/action-permissions" - "github.com/port-labs/terraform-provider-port-labs/port/aggregation-properties" - "github.com/port-labs/terraform-provider-port-labs/port/blueprint" - "github.com/port-labs/terraform-provider-port-labs/port/blueprint-permissions" - "github.com/port-labs/terraform-provider-port-labs/port/entity" - "github.com/port-labs/terraform-provider-port-labs/port/page" - "github.com/port-labs/terraform-provider-port-labs/port/page-permissions" - "github.com/port-labs/terraform-provider-port-labs/port/scorecard" - "github.com/port-labs/terraform-provider-port-labs/port/team" - "github.com/port-labs/terraform-provider-port-labs/port/webhook" - "github.com/port-labs/terraform-provider-port-labs/version" + "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" + "github.com/port-labs/terraform-provider-port-labs/v2/port/blueprint" + "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/page" + "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/team" + "github.com/port-labs/terraform-provider-port-labs/v2/port/webhook" + "github.com/port-labs/terraform-provider-port-labs/v2/version" "os" )