Skip to content

Commit aca8ad9

Browse files
Andrea Peggionrashik-bhasin
authored andcommitted
Bug Fix - Support for Service Manager Proxy API
1 parent 90d5f3e commit aca8ad9

File tree

5 files changed

+92
-25
lines changed

5 files changed

+92
-25
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
variable "compartment_id" {}
10+
11+
variable "service_environment_display_name" {
12+
default = "displayName"
13+
}
14+
15+
variable "service_environment_service_environment_type" {
16+
default = "serviceEnvironmentType"
17+
}
18+
variable "service_environment_id" {
19+
default = "123456"
20+
}
21+
22+
23+
provider "oci" {
24+
tenancy_ocid = var.tenancy_ocid
25+
user_ocid = var.user_ocid
26+
fingerprint = var.fingerprint
27+
private_key_path = var.private_key_path
28+
region = var.region
29+
}
30+
31+
data "oci_service_manager_proxy_service_environments" "test_service_environments" {
32+
#Required
33+
compartment_id = var.compartment_id
34+
35+
#Optional
36+
display_name = var.service_environment_display_name
37+
service_environment_id = var.service_environment_id
38+
service_environment_type = var.service_environment_service_environment_type
39+
}
40+
41+

oci/service_manager_proxy_service_environment_data_source.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ func ServiceManagerProxyServiceEnvironmentDataSource() *schema.Resource {
6666
// Optional
6767

6868
// Computed
69+
"description": {
70+
Type: schema.TypeString,
71+
Computed: true,
72+
},
6973
"environment_type": {
7074
Type: schema.TypeString,
7175
Computed: true,
@@ -186,6 +190,10 @@ func ServiceDefinitionToMap(obj *oci_service_manager_proxy.ServiceDefinition) ma
186190
func ServiceEnvironmentEndPointOverviewToMap(obj oci_service_manager_proxy.ServiceEnvironmentEndPointOverview) map[string]interface{} {
187191
result := map[string]interface{}{}
188192

193+
if obj.Description != nil {
194+
result["description"] = string(*obj.Description)
195+
}
196+
189197
result["environment_type"] = string(obj.EnvironmentType)
190198

191199
if obj.Url != nil {

oci/service_manager_proxy_service_environments_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ func ServiceManagerProxyServiceEnvironmentsDataSource() *schema.Resource {
9999
// Optional
100100

101101
// Computed
102+
"description": {
103+
Type: schema.TypeString,
104+
Computed: true,
105+
},
102106
"environment_type": {
103107
Type: schema.TypeString,
104108
Computed: true,

website/docs/d/service_manager_proxy_service_environment.html.markdown

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ description: |-
1010
# Data Source: oci_service_manager_proxy_service_environment
1111
This data source provides details about a specific Service Environment resource in Oracle Cloud Infrastructure Service Manager Proxy service.
1212

13-
Gets details of the service environment specified by the serviceEnvironmentId.
13+
Get the detailed information for a specific service environment.
14+
1415

1516
## Example Usage
1617

@@ -26,24 +27,31 @@ data "oci_service_manager_proxy_service_environment" "test_service_environment"
2627

2728
The following arguments are supported:
2829

29-
* `compartment_id` - (Required) The unique identifier for the compartment.
30-
* `service_environment_id` - (Required) The Id associated with the service environment.
30+
* `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment.
31+
* `service_environment_id` - (Required) The unique identifier associated with the service environment.
32+
33+
**Note:** Not an [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
3134

3235

3336
## Attributes Reference
3437

3538
The following attributes are exported:
3639

37-
* `compartment_id` - Compartment Id associated with the service.
40+
* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment.
3841
* `console_url` - The URL for the console.
3942
* `id` - Unqiue identifier for the entitlement related to the environment.
40-
* `service_definition` - Model for details associated with service
41-
* `display_name` - Display name of the service.
42-
* `short_display_name` - Short display name of the service.
43-
* `type` - The service definition type.
43+
44+
**Note:** Not an [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
45+
* `service_definition` - Details for a service definition.
46+
* `display_name` - Display name of the service. For example, "Oracle Retail Order Management Cloud Service".
47+
* `short_display_name` - Short display name of the service. For example, "Retail Order Management".
48+
* `type` - The service definition type. For example, a service definition type "RGBUOROMS" would be for the service "Oracle Retail Order Management Cloud Service".
4449
* `service_environment_endpoints` - Array of service environment end points.
45-
* `environment_type` - Service Environemnt EndPoint type.
46-
* `url` - Service Environemnt Instance EndPoint url.
50+
* `description` - Description of the environment link
51+
* `environment_type` - Service environment endpoint type.
52+
* `url` - Service environment instance URL.
4753
* `status` - Status of the entitlement registration for the service.
48-
* `subscription_id` - The subscription Id corresponding to the service environment Id.
54+
* `subscription_id` - The unique subscription ID associated with the service environment ID.
55+
56+
**Note:** Not an [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
4957

website/docs/d/service_manager_proxy_service_environments.html.markdown

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ description: |-
1010
# Data Source: oci_service_manager_proxy_service_environments
1111
This data source provides the list of Service Environments in Oracle Cloud Infrastructure Service Manager Proxy service.
1212

13-
List details of environments which the service is authorized to view.
14-
This includes the service instance endpoints and service definition
15-
details.
13+
List the details of Software as a Service (SaaS) environments provisioned by Service Manager.
14+
Information includes the service instance endpoints and service definition details.
1615

1716

1817
## Example Usage
@@ -33,10 +32,12 @@ data "oci_service_manager_proxy_service_environments" "test_service_environments
3332

3433
The following arguments are supported:
3534

36-
* `compartment_id` - (Required) The unique identifier for the compartment.
35+
* `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment.
3736
* `display_name` - (Optional) The display name of the resource.
38-
* `service_environment_id` - (Optional) The Id associated with the service environment.
39-
* `service_environment_type` - (Optional) The service definition type of the environment.
37+
* `service_environment_id` - (Optional) The unique identifier associated with the service environment.
38+
39+
**Note:** Not an [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
40+
* `service_environment_type` - (Optional) The environment's service definition type. For example, "RGBUOROMS" is the service definition type for "Oracle Retail Order Management Cloud Service".
4041

4142

4243
## Attributes Reference
@@ -49,16 +50,21 @@ The following attributes are exported:
4950

5051
The following attributes are exported:
5152

52-
* `compartment_id` - Compartment Id associated with the service.
53+
* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment.
5354
* `console_url` - The URL for the console.
5455
* `id` - Unqiue identifier for the entitlement related to the environment.
55-
* `service_definition` - Model for details associated with service
56-
* `display_name` - Display name of the service.
57-
* `short_display_name` - Short display name of the service.
58-
* `type` - The service definition type.
56+
57+
**Note:** Not an [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
58+
* `service_definition` - Details for a service definition.
59+
* `display_name` - Display name of the service. For example, "Oracle Retail Order Management Cloud Service".
60+
* `short_display_name` - Short display name of the service. For example, "Retail Order Management".
61+
* `type` - The service definition type. For example, a service definition type "RGBUOROMS" would be for the service "Oracle Retail Order Management Cloud Service".
5962
* `service_environment_endpoints` - Array of service environment end points.
60-
* `environment_type` - Service Environemnt EndPoint type.
61-
* `url` - Service Environemnt Instance EndPoint url.
63+
* `description` - Description of the environment link
64+
* `environment_type` - Service environment endpoint type.
65+
* `url` - Service environment instance URL.
6266
* `status` - Status of the entitlement registration for the service.
63-
* `subscription_id` - The subscription Id corresponding to the service environment Id.
67+
* `subscription_id` - The unique subscription ID associated with the service environment ID.
68+
69+
**Note:** Not an [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
6470

0 commit comments

Comments
 (0)