Skip to content

Commit 9499f0a

Browse files
Xu Zhangvarakali
authored andcommitted
Added - Support for OIC Instance Creation for Healthcare Feature
1 parent 559d778 commit 9499f0a

8 files changed

+37
-15
lines changed

examples/integration/main.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ provider "oci" {
5959
resource "oci_integration_integration_instance" "test_integration_instance" {
6060
#Required
6161
compartment_id = var.compartment_id
62-
integration_instance_type = "STANDARDX"
62+
integration_instance_type = "HEALTHCARE"
6363
shape = "DEVELOPMENT"
6464
display_name = "displayName"
6565
is_byol = "false"
@@ -96,17 +96,17 @@ data "oci_integration_integration_instance" "test_integration_instance" {
9696
integration_instance_id = oci_integration_integration_instance.test_integration_instance.id
9797
}
9898

99-
resource "oci_integration_integration_instance" "test_integration_instance_idcs" {
100-
#Required
101-
compartment_id = var.compartment_id
102-
display_name = "instance4643_idcs"
103-
integration_instance_type = "STANDARDX"
104-
shape = "DEVELOPMENT"
105-
# shape = "PRODUCTION"
106-
is_byol = "false"
107-
message_packs = "10"
108-
idcs_at = var.integration_instance_idcs_access_token
109-
}
99+
# resource "oci_integration_integration_instance" "test_integration_instance_idcs" {
100+
# #Required
101+
# compartment_id = var.compartment_id
102+
# display_name = "instance4643_idcs"
103+
# integration_instance_type = "STANDARDX"
104+
# shape = "DEVELOPMENT"
105+
# # shape = "PRODUCTION"
106+
# is_byol = "false"
107+
# message_packs = "10"
108+
# idcs_at = var.integration_instance_idcs_access_token
109+
# }
110110

111111
resource "oci_integration_private_endpoint_outbound_connection" "integration_private_endpoint" {
112112
integration_instance_id = oci_integration_integration_instance.test_integration_instance.id

internal/integrationtest/integration_integration_instance_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ var (
132132
}
133133

134134
ignoreDefinedTagsDifferencesRepresentationAgain = map[string]interface{}{
135-
"ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`}},
135+
"ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`, `system_tags`}},
136136
}
137137

138138
integrationInstanceAlternateCustomEndpointsRepresentation = map[string]interface{}{
@@ -187,6 +187,9 @@ func TestIntegrationIntegrationInstanceResource_basic(t *testing.T) {
187187
nsgId := utils.GetEnvSettingWithBlankDefault("nsg_id")
188188
nsgIdStr := fmt.Sprintf("variable \"nsg_id\" { default = \"%s\" }\n", nsgId)
189189

190+
domainIdVariable := utils.GetEnvSettingWithBlankDefault("domain_id")
191+
domainIdVariableStr := fmt.Sprintf("variable \"domain_id\" { default = \"%s\" }\n", domainIdVariable)
192+
190193
resourceName := "oci_integration_integration_instance.test_integration_instance"
191194
datasourceName := "data.oci_integration_integration_instances.test_integration_instances"
192195
singularDatasourceName := "data.oci_integration_integration_instance.test_integration_instance"
@@ -200,7 +203,7 @@ func TestIntegrationIntegrationInstanceResource_basic(t *testing.T) {
200203
acctest.ResourceTest(t, testAccCheckIntegrationIntegrationInstanceDestroy, []resource.TestStep{
201204
// verify Create
202205
{
203-
Config: config + instanceTypeVariableStr + compartmentIdVariableStr + subnetIdStr + nsgIdStr + idcsAccessTokenVariableStr() + IntegrationIntegrationInstanceResourceDependencies +
206+
Config: config + instanceTypeVariableStr + compartmentIdVariableStr + domainIdVariableStr + subnetIdStr + nsgIdStr + idcsAccessTokenVariableStr() + IntegrationIntegrationInstanceResourceDependencies +
204207
acctest.GenerateResourceFromRepresentationMap("oci_integration_integration_instance", "test_integration_instance", acctest.Required, acctest.Create, integrationInstanceRepresentation) +
205208
acctest.GenerateResourceFromRepresentationMap("oci_integration_private_endpoint_outbound_connection", "integration_private_endpoint", acctest.Required, acctest.Create, integrationPrivateEndpointRepresentation),
206209
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
@@ -260,7 +263,6 @@ func TestIntegrationIntegrationInstanceResource_basic(t *testing.T) {
260263
resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"),
261264
resource.TestCheckResourceAttrSet(resourceName, "domain_id"),
262265
resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"),
263-
resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId),
264266
resource.TestCheckResourceAttr(resourceName, "consumption_model", "UCM"),
265267
resource.TestCheckResourceAttr(resourceName, "custom_endpoint.#", "0"),
266268
// resource.TestCheckResourceAttrSet(resourceName, "custom_endpoint.0.certificate_secret_id"),

internal/service/integration/integration_integration_instance_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ func (s *IntegrationIntegrationInstanceDataSourceCrud) SetData() error {
156156
s.D.Set("state_message", *s.Res.StateMessage)
157157
}
158158

159+
if s.Res.SystemTags != nil {
160+
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
161+
}
162+
159163
if s.Res.TimeCreated != nil {
160164
s.D.Set("time_created", s.Res.TimeCreated.String())
161165
}

internal/service/integration/integration_integration_instance_resource.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,11 @@ func IntegrationIntegrationInstanceResource() *schema.Resource {
364364
Type: schema.TypeString,
365365
Computed: true,
366366
},
367+
"system_tags": {
368+
Type: schema.TypeMap,
369+
Computed: true,
370+
Elem: schema.TypeString,
371+
},
367372
"time_created": {
368373
Type: schema.TypeString,
369374
Computed: true,
@@ -1006,6 +1011,10 @@ func (s *IntegrationIntegrationInstanceResourceCrud) SetData() error {
10061011
s.D.Set("state_message", *s.Res.StateMessage)
10071012
}
10081013

1014+
if s.Res.SystemTags != nil {
1015+
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
1016+
}
1017+
10091018
if s.Res.TimeCreated != nil {
10101019
s.D.Set("time_created", s.Res.TimeCreated.String())
10111020
}

internal/service/integration/integration_integration_instances_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ func (s *IntegrationIntegrationInstancesDataSourceCrud) SetData() error {
190190
integrationInstance["state_message"] = *r.StateMessage
191191
}
192192

193+
if r.SystemTags != nil {
194+
integrationInstance["system_tags"] = tfresource.SystemTagsToMap(r.SystemTags)
195+
}
196+
193197
if r.TimeCreated != nil {
194198
integrationInstance["time_created"] = r.TimeCreated.String()
195199
}

website/docs/d/integration_integration_instance.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ The following attributes are exported:
8484
* `shape` - Shape
8585
* `state` - The current state of the integration instance.
8686
* `state_message` - An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
87+
* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
8788
* `time_created` - The time the the Integration Instance was created. An RFC3339 formatted datetime string.
8889
* `time_updated` - The time the IntegrationInstance was updated. An RFC3339 formatted datetime string.
8990

website/docs/d/integration_integration_instances.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ The following attributes are exported:
9797
* `shape` - Shape
9898
* `state` - The current state of the integration instance.
9999
* `state_message` - An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
100+
* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
100101
* `time_created` - The time the the Integration Instance was created. An RFC3339 formatted datetime string.
101102
* `time_updated` - The time the IntegrationInstance was updated. An RFC3339 formatted datetime string.
102103

website/docs/r/integration_integration_instance.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ The following attributes are exported:
158158
* `shape` - Shape
159159
* `state` - The current state of the integration instance.
160160
* `state_message` - An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
161+
* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
161162
* `time_created` - The time the the Integration Instance was created. An RFC3339 formatted datetime string.
162163
* `time_updated` - The time the IntegrationInstance was updated. An RFC3339 formatted datetime string.
163164

0 commit comments

Comments
 (0)