Skip to content

Commit 0f4ad1d

Browse files
authored
feat(MQSaaS): Add ability to update user and app names (IBM-Cloud#6397)
Signed-off-by: Jess McCreery <[email protected]>
1 parent 74546df commit 0f4ad1d

File tree

54 files changed

+435
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+435
-644
lines changed

examples/ibm-mqcloud/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Examples for MQaaS
1+
# Examples for MQ SaaS
22

3-
These examples illustrate how to use the resources and data sources associated with MQaaS.
3+
These examples illustrate how to use the resources and data sources associated with MQ SaaS.
44

55
The following resources are supported:
66
* ibm_mqcloud_queue_manager
@@ -33,7 +33,7 @@ $ terraform apply
3333

3434
Run `terraform destroy` when you don't need these resources.
3535

36-
## MQaaS resources
36+
## MQ SaaS resources
3737

3838
### Resource: ibm_mqcloud_queue_manager
3939

@@ -53,7 +53,7 @@ resource "ibm_mqcloud_queue_manager" "mqcloud_queue_manager_instance" {
5353
| Name | Description | Type | Required |
5454
|------|-------------|------|---------|
5555
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
56-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
56+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
5757
| name | A queue manager name conforming to MQ restrictions. | `string` | true |
5858
| display_name | A displayable name for the queue manager - limited only in length. | `string` | false |
5959
| location | The locations in which the queue manager could be deployed. | `string` | true |
@@ -89,7 +89,7 @@ resource "ibm_mqcloud_application" "mqcloud_application_instance" {
8989
| Name | Description | Type | Required |
9090
|------|-------------|------|---------|
9191
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
92-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
92+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
9393
| name | The name of the application - conforming to MQ rules. | `string` | true |
9494

9595
#### Outputs
@@ -115,7 +115,7 @@ resource "ibm_mqcloud_user" "mqcloud_user_instance" {
115115
| Name | Description | Type | Required |
116116
|------|-------------|------|---------|
117117
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
118-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
118+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
119119
| name | The shortname of the user that will be used as the IBM MQ administrator in interactions with a queue manager for this service instance. | `string` | true |
120120
| email | The email of the user. | `string` | true |
121121

@@ -150,7 +150,7 @@ resource "ibm_mqcloud_keystore_certificate" "mqcloud_keystore_certificate_instan
150150
| Name | Description | Type | Required |
151151
|------|-------------|------|---------|
152152
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
153-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
153+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
154154
| queue_manager_id | The id of the queue manager to retrieve its full details. | `string` | true |
155155
| label | The label to use for the certificate to be uploaded. | `string` | true |
156156
| certificate_file | The filename and path of the certificate to be uploaded. | `base64-encoded string` | true |
@@ -190,7 +190,7 @@ resource "ibm_mqcloud_truststore_certificate" "mqcloud_truststore_certificate_in
190190
| Name | Description | Type | Required |
191191
|------|-------------|------|---------|
192192
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
193-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
193+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
194194
| queue_manager_id | The id of the queue manager to retrieve its full details. | `string` | true |
195195
| label | The label to use for the certificate to be uploaded. | `string` | true |
196196
| certificate_file | The filename and path of the certificate to be uploaded. | `base64-encoded string` | true |
@@ -227,7 +227,7 @@ resource "ibm_mqcloud_virtual_private_endpoint_gateway" "mqcloud_virtual_private
227227
| Name | Description | Type | Required |
228228
|------|-------------|------|---------|
229229
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
230-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
230+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
231231
| trusted_profile | The CRN of the trusted profile to assume for this request. | `string` | false |
232232
| name | The name of the virtual private endpoint gateway, created by the user. | `string` | true |
233233
| target_crn | The CRN of the reserved capacity service instance the user is trying to connect to. | `string` | true |
@@ -240,7 +240,7 @@ resource "ibm_mqcloud_virtual_private_endpoint_gateway" "mqcloud_virtual_private
240240
| status | The lifecycle state of this virtual privage endpoint. |
241241
| virtual_private_endpoint_gateway_guid | The ID of the virtual private endpoint gateway which was allocated on creation. |
242242

243-
## MQaaS data sources
243+
## MQ SaaS data sources
244244

245245
### Data source: ibm_mqcloud_queue_manager_options
246246

@@ -254,7 +254,7 @@ data "ibm_mqcloud_queue_manager_options" "mqcloud_queue_manager_options_instance
254254

255255
| Name | Description | Type | Required |
256256
|------|-------------|------|---------|
257-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
257+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
258258

259259
#### Outputs
260260

@@ -278,7 +278,7 @@ data "ibm_mqcloud_queue_manager" "mqcloud_queue_manager_instance" {
278278

279279
| Name | Description | Type | Required |
280280
|------|-------------|------|---------|
281-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
281+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
282282
| name | A queue manager name conforming to MQ restrictions. | `string` | false |
283283

284284
#### Outputs
@@ -300,7 +300,7 @@ data "ibm_mqcloud_queue_manager_status" "mqcloud_queue_manager_status_instance"
300300

301301
| Name | Description | Type | Required |
302302
|------|-------------|------|---------|
303-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
303+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
304304
| queue_manager_id | The id of the queue manager to retrieve its full details. | `string` | true |
305305

306306
#### Outputs
@@ -322,7 +322,7 @@ data "ibm_mqcloud_application" "mqcloud_application_instance" {
322322

323323
| Name | Description | Type | Required |
324324
|------|-------------|------|---------|
325-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
325+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
326326
| name | The name of the application - conforming to MQ rules. | `string` | false |
327327

328328
#### Outputs
@@ -344,7 +344,7 @@ data "ibm_mqcloud_user" "mqcloud_user_instance" {
344344

345345
| Name | Description | Type | Required |
346346
|------|-------------|------|---------|
347-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
347+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
348348
| name | The shortname of the user that will be used as the IBM MQ administrator in interactions with a queue manager for this service instance. | `string` | false |
349349

350350
#### Outputs
@@ -367,7 +367,7 @@ data "ibm_mqcloud_truststore_certificate" "mqcloud_truststore_certificate_instan
367367

368368
| Name | Description | Type | Required |
369369
|------|-------------|------|---------|
370-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
370+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
371371
| queue_manager_id | The id of the queue manager to retrieve its full details. | `string` | true |
372372
| label | Certificate label in queue manager store. | `string` | false |
373373

@@ -392,7 +392,7 @@ data "ibm_mqcloud_keystore_certificate" "mqcloud_keystore_certificate_instance"
392392

393393
| Name | Description | Type | Required |
394394
|------|-------------|------|---------|
395-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
395+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
396396
| queue_manager_id | The id of the queue manager to retrieve its full details. | `string` | true |
397397
| label | Certificate label in queue manager store. | `string` | false |
398398

@@ -417,7 +417,7 @@ data "ibm_mqcloud_virtual_private_endpoint_gateways" "mqcloud_virtual_private_en
417417

418418
| Name | Description | Type | Required |
419419
|------|-------------|------|---------|
420-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
420+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
421421
| trusted_profile | The CRN of the trusted profile to assume for this request. | `string` | false |
422422
| name | The name of the virtual private endpoint gateway, created by the user. | `string` | false |
423423

@@ -441,7 +441,7 @@ data "ibm_mqcloud_virtual_private_endpoint_gateway" "mqcloud_virtual_private_end
441441

442442
| Name | Description | Type | Required |
443443
|------|-------------|------|---------|
444-
| service_instance_guid | The GUID that uniquely identifies the MQaaS service instance. | `string` | true |
444+
| service_instance_guid | The GUID that uniquely identifies the MQ SaaS service instance. | `string` | true |
445445
| virtual_private_endpoint_gateway_guid | The id of the virtual private endpoint gateway. | `string` | true |
446446
| trusted_profile | The CRN of the trusted profile to assume for this request. | `string` | false |
447447

examples/ibm-mqcloud/main.tf

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ provider "ibm" {
55
// Provision mqcloud_queue_manager resource instance
66
resource "ibm_mqcloud_queue_manager" "mqcloud_queue_manager_instance" {
77
service_instance_guid = var.mqcloud_queue_manager_service_instance_guid
8-
name = var.mqcloud_queue_manager_name
9-
display_name = var.mqcloud_queue_manager_display_name
10-
location = var.mqcloud_queue_manager_location
11-
size = var.mqcloud_queue_manager_size
12-
version = var.mqcloud_queue_manager_version
8+
name = var.mqcloud_queue_manager_name
9+
display_name = var.mqcloud_queue_manager_display_name
10+
location = var.mqcloud_queue_manager_location
11+
size = var.mqcloud_queue_manager_size
12+
version = var.mqcloud_queue_manager_version
1313
}
1414

1515
// Provision mqcloud_application resource instance
1616
resource "ibm_mqcloud_application" "mqcloud_application_instance" {
1717
service_instance_guid = var.mqcloud_application_service_instance_guid
18-
name = var.mqcloud_application_name
18+
name = var.mqcloud_application_name
1919
}
2020

2121
// Provision mqcloud_user resource instance
2222
resource "ibm_mqcloud_user" "mqcloud_user_instance" {
2323
service_instance_guid = var.mqcloud_user_service_instance_guid
24-
name = var.mqcloud_user_name
25-
email = var.mqcloud_user_email
24+
name = var.mqcloud_user_name
25+
email = var.mqcloud_user_email
2626
}
2727

2828
// Provision mqcloud_keystore_certificate resource instance
@@ -32,8 +32,6 @@ resource "ibm_mqcloud_keystore_certificate" "mqcloud_keystore_certificate_instan
3232
label = var.mqcloud_keystore_certificate_label
3333
certificate_file = var.mqcloud_keystore_certificate_certificate_file
3434

35-
certificate_file = var.mqcloud_keystore_certificate_certificate_file
36-
3735
config {
3836
ams {
3937
channels {
@@ -46,9 +44,9 @@ resource "ibm_mqcloud_keystore_certificate" "mqcloud_keystore_certificate_instan
4644
// Provision mqcloud_truststore_certificate resource instance
4745
resource "ibm_mqcloud_truststore_certificate" "mqcloud_truststore_certificate_instance" {
4846
service_instance_guid = var.mqcloud_truststore_certificate_service_instance_guid
49-
queue_manager_id = var.mqcloud_truststore_certificate_queue_manager_id
50-
label = var.mqcloud_truststore_certificate_label
51-
certificate_file = var.mqcloud_truststore_certificate_certificate_file
47+
queue_manager_id = var.mqcloud_truststore_certificate_queue_manager_id
48+
label = var.mqcloud_truststore_certificate_label
49+
certificate_file = var.mqcloud_truststore_certificate_certificate_file
5250
}
5351

5452
// Provision mqcloud_virtual_private_endpoint_gateway resource instance

examples/ibm-mqcloud/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ variable "mqcloud_keystore_certificate_certificate_file" {
8585
type = string
8686
default = "SGVsbG8gd29ybGQ="
8787
}
88+
variable "mqcloud_keystore_certificate_config_ams_channel_name" {
89+
description = "A channel's information that is configured with this certificate."
90+
type = string
91+
default = "CLOUD.APP.SVRCONN"
92+
}
8893

8994
variable "mqcloud_keystore_certificate_config_ams_channel_name" {
9095
description = "A channel's information that is configured with this certificate."

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/IBM/keyprotect-go-client v0.15.1
2727
github.com/IBM/logs-go-sdk v0.4.0
2828
github.com/IBM/logs-router-go-sdk v1.0.8
29-
github.com/IBM/mqcloud-go-sdk v0.2.0
29+
github.com/IBM/mqcloud-go-sdk v0.3.0
3030
github.com/IBM/networking-go-sdk v0.51.9
3131
github.com/IBM/platform-services-go-sdk v0.84.4
3232
github.com/IBM/project-go-sdk v0.3.5
@@ -60,7 +60,7 @@ require (
6060
github.com/rook/rook/pkg/apis v0.0.0-20250619203122-80563e28b685
6161
github.com/softlayer/softlayer-go v1.0.3
6262
github.com/stretchr/testify v1.10.0
63-
golang.org/x/crypto v0.38.0
63+
golang.org/x/crypto v0.40.0
6464
gopkg.in/yaml.v3 v3.0.1
6565
gotest.tools v2.2.0+incompatible
6666
k8s.io/api v0.33.2
@@ -201,15 +201,15 @@ require (
201201
go.uber.org/automaxprocs v1.6.0 // indirect
202202
go.uber.org/ratelimit v0.2.0 // indirect
203203
go.uber.org/zap v1.27.0 // indirect
204-
golang.org/x/mod v0.21.0 // indirect
205-
golang.org/x/net v0.40.0 // indirect
204+
golang.org/x/mod v0.25.0 // indirect
205+
golang.org/x/net v0.42.0 // indirect
206206
golang.org/x/oauth2 v0.27.0 // indirect
207-
golang.org/x/sync v0.14.0 // indirect
207+
golang.org/x/sync v0.16.0 // indirect
208208
golang.org/x/sys v0.34.0 // indirect
209-
golang.org/x/term v0.32.0 // indirect
210-
golang.org/x/text v0.25.0 // indirect
209+
golang.org/x/term v0.33.0 // indirect
210+
golang.org/x/text v0.27.0 // indirect
211211
golang.org/x/time v0.9.0 // indirect
212-
golang.org/x/tools v0.26.0 // indirect
212+
golang.org/x/tools v0.34.0 // indirect
213213
google.golang.org/appengine v1.6.8 // indirect
214214
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
215215
google.golang.org/grpc v1.67.1 // indirect

0 commit comments

Comments
 (0)