Skip to content

Commit 58a9c49

Browse files
committed
fmt changes and registration
1 parent 7f88cdd commit 58a9c49

8 files changed

+20
-8
lines changed

internal/integrationtest/data_labeling_service_dataset_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func TestDataLabelingServiceDatasetResource_basic(t *testing.T) {
107107
config := acctest.ProviderTestConfig()
108108

109109
compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid")
110-
compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id" +
110+
compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id"+
111111
"\" { default = \"%s\" }\n", compartmentId)
112112

113113
compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_Update", compartmentId)

internal/integrationtest/visual_builder_vb_instance_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ package integrationtest
66
import (
77
"context"
88
"fmt"
9-
"github.com/terraform-providers/terraform-provider-oci/internal/resourcediscovery"
10-
"github.com/terraform-providers/terraform-provider-oci/internal/tfresource"
119
"strconv"
1210
"testing"
1311
"time"
1412

13+
"github.com/terraform-providers/terraform-provider-oci/internal/resourcediscovery"
14+
"github.com/terraform-providers/terraform-provider-oci/internal/tfresource"
15+
1516
"github.com/terraform-providers/terraform-provider-oci/internal/acctest"
1617
tf_client "github.com/terraform-providers/terraform-provider-oci/internal/client"
1718
"github.com/terraform-providers/terraform-provider-oci/internal/utils"
@@ -58,7 +59,7 @@ var (
5859
// Not supported yet
5960
// "alternate_custom_endpoints": RepresentationGroup{Optional, vbInstanceAlternateCustomEndpointsRepresentation},
6061
"consumption_model": acctest.Representation{RepType: acctest.Optional, Create: `UCM`},
61-
"custom_endpoint": acctest.RepresentationGroup{acctest.Optional, vbInstanceCustomEndpointRepresentation},
62+
"custom_endpoint": acctest.RepresentationGroup{RepType: acctest.Optional, Group: vbInstanceCustomEndpointRepresentation},
6263
"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
6364
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}},
6465
"idcs_open_id": acctest.Representation{RepType: acctest.Required, Create: `${var.idcs_access_token}`},

internal/provider/register_datasource.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ import (
7171
tf_streaming "github.com/terraform-providers/terraform-provider-oci/internal/service/streaming"
7272
tf_usage_proxy "github.com/terraform-providers/terraform-provider-oci/internal/service/usage_proxy"
7373
tf_vault "github.com/terraform-providers/terraform-provider-oci/internal/service/vault"
74+
tf_visual_builder "github.com/terraform-providers/terraform-provider-oci/internal/service/visual_builder"
7475
tf_vulnerability_scanning "github.com/terraform-providers/terraform-provider-oci/internal/service/vulnerability_scanning"
7576
tf_waas "github.com/terraform-providers/terraform-provider-oci/internal/service/waas"
7677
tf_waf "github.com/terraform-providers/terraform-provider-oci/internal/service/waf"
@@ -1038,4 +1039,6 @@ func init() {
10381039
RegisterDatasource("oci_bastion_session", tf_bastion.BastionSessionDataSource())
10391040
RegisterDatasource("oci_bastion_sessions", tf_bastion.BastionSessionsDataSource())
10401041

1042+
//visual builder
1043+
RegisterResource("oci_visual_builder_vb_instance", tf_visual_builder.VisualBuilderVbInstanceDataSource())
10411044
}

internal/provider/register_resource.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ import (
6868
tf_service_catalog "github.com/terraform-providers/terraform-provider-oci/internal/service/service_catalog"
6969
tf_streaming "github.com/terraform-providers/terraform-provider-oci/internal/service/streaming"
7070
tf_usage_proxy "github.com/terraform-providers/terraform-provider-oci/internal/service/usage_proxy"
71+
tf_visual_builder "github.com/terraform-providers/terraform-provider-oci/internal/service/visual_builder"
7172
tf_vulnerability_scanning "github.com/terraform-providers/terraform-provider-oci/internal/service/vulnerability_scanning"
7273
tf_waas "github.com/terraform-providers/terraform-provider-oci/internal/service/waas"
7374
tf_waf "github.com/terraform-providers/terraform-provider-oci/internal/service/waf"
@@ -552,4 +553,6 @@ func init() {
552553
RegisterResource("oci_bastion_bastion", tf_bastion.BastionBastionResource())
553554
RegisterResource("oci_bastion_session", tf_bastion.BastionSessionResource())
554555

556+
// visual builder
557+
RegisterResource("oci_visual_builder_vb_instance", tf_visual_builder.VisualBuilderVbInstanceResource())
555558
}

internal/service/visual_builder/visual_builder_vb_instance_applications_data_source.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package visual_builder
22

33
import (
44
"context"
5+
56
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
7+
68
"github.com/terraform-providers/terraform-provider-oci/internal/client"
79
"github.com/terraform-providers/terraform-provider-oci/internal/tfresource"
810
"github.com/terraform-providers/terraform-provider-oci/internal/utils"

internal/service/visual_builder/visual_builder_vb_instance_data_source.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package visual_builder
55

66
import (
77
"context"
8+
89
"github.com/terraform-providers/terraform-provider-oci/internal/client"
910
"github.com/terraform-providers/terraform-provider-oci/internal/tfresource"
1011

internal/service/visual_builder/visual_builder_vb_instance_resource.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ package visual_builder
66
import (
77
"context"
88
"fmt"
9+
"strings"
10+
"time"
11+
912
"github.com/terraform-providers/terraform-provider-oci/internal/client"
1013
"github.com/terraform-providers/terraform-provider-oci/internal/tfresource"
1114
"github.com/terraform-providers/terraform-provider-oci/internal/utils"
12-
"strings"
13-
"time"
1415

1516
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
1617
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
@@ -601,7 +602,7 @@ func (s *VisualBuilderVbInstanceResourceCrud) SetData() error {
601602
}
602603

603604
if s.Res.SystemTags != nil {
604-
s.D.Set("system_tags", systemTagsToMap(s.Res.SystemTags))
605+
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
605606
}
606607

607608
if s.Res.TimeCreated != nil {
@@ -717,7 +718,7 @@ func VbInstanceSummaryToMap(obj oci_visual_builder.VbInstanceSummary) map[string
717718
}
718719

719720
if obj.SystemTags != nil {
720-
result["system_tags"] = systemTagsToMap(obj.SystemTags)
721+
result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags)
721722
}
722723

723724
if obj.TimeCreated != nil {

internal/service/visual_builder/visual_builder_vb_instances_data_source.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package visual_builder
55

66
import (
77
"context"
8+
89
"github.com/terraform-providers/terraform-provider-oci/internal/client"
910
"github.com/terraform-providers/terraform-provider-oci/internal/tfresource"
1011

0 commit comments

Comments
 (0)