Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(MQ on Cloud): Add ams channels config support to keystore resource #5411

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

shuaibbapputty
Copy link
Contributor

@shuaibbapputty shuaibbapputty commented Jun 6, 2024

Add ams channels config support to keystore resource

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Changes

  • add ams channel configuration for keystore certificates
  • update registry docs specific to mqcloud plan details
  • update whole module with latest terraform template changes
  • use latest mqcloud go sdk
  • add unit test for util files

Output from acceptance testing:

$ make testacc TEST=./ibm/service/mqcloud/... 
 
=== RUN   TestLoadWaitForQmStatusEnvVar
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_True
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_False
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Not_Set
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_Random_String
--- PASS: TestLoadWaitForQmStatusEnvVar (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_True (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_False (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Not_Set (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_Random_String (0.00s)
=== RUN   TestIsVersionDowngrade
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.2.2
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.2.4
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.3.0
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.2.3
=== RUN   TestIsVersionDowngrade/_to_1.0.0
=== RUN   TestIsVersionDowngrade/1.0.0_to_
=== RUN   TestIsVersionDowngrade/abc.def.ghi_to_1.2.3
--- PASS: TestIsVersionDowngrade (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.2.2 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.2.4 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.3.0 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.2.3 (0.00s)
    --- PASS: TestIsVersionDowngrade/_to_1.0.0 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.0.0_to_ (0.00s)
    --- PASS: TestIsVersionDowngrade/abc.def.ghi_to_1.2.3 (0.00s)
=== RUN   TestHandlePlanCheck
=== RUN   TestHandlePlanCheck/reserved-deployment
=== RUN   TestHandlePlanCheck/Basic_Plan
--- PASS: TestHandlePlanCheck (0.00s)
    --- PASS: TestHandlePlanCheck/reserved-deployment (0.00s)
    --- PASS: TestHandlePlanCheck/Basic_Plan (0.00s)
=== RUN   Test_checkSIPlan
=== RUN   Test_checkSIPlan/Cache_Hit:_Reserved_Deployment_Plan
=== RUN   Test_checkSIPlan/Cache_Hit:_Default_Plan
=== RUN   Test_checkSIPlan/Reserved_Deployment_Plan_Wildcard
=== RUN   Test_checkSIPlan/Reserved_Deployment_Plan
=== RUN   Test_checkSIPlan/Default_Plan
=== RUN   Test_checkSIPlan/fetchServicePlanFunc_Error:_Invalid_id
--- PASS: Test_checkSIPlan (0.00s)
    --- PASS: Test_checkSIPlan/Cache_Hit:_Reserved_Deployment_Plan (0.00s)
    --- PASS: Test_checkSIPlan/Cache_Hit:_Default_Plan (0.00s)
    --- PASS: Test_checkSIPlan/Reserved_Deployment_Plan_Wildcard (0.00s)
    --- PASS: Test_checkSIPlan/Reserved_Deployment_Plan (0.00s)
    --- PASS: Test_checkSIPlan/Default_Plan (0.00s)
    --- PASS: Test_checkSIPlan/fetchServicePlanFunc_Error:_Invalid_id (0.00s)
=== RUN   TestAccIbmMqcloudApplicationDataSourceBasic
=== PAUSE TestAccIbmMqcloudApplicationDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudApplicationApplicationDetailsToMap
--- PASS: TestDataSourceIbmMqcloudApplicationApplicationDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudKeystoreCertificateDataSourceBasic
=== PAUSE TestAccIbmMqcloudKeystoreCertificateDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateKeyStoreCertificateDetailsToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateKeyStoreCertificateDetailsToMap (0.00s)
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap (0.00s)
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap (0.00s)
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateChannelDetailsToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateChannelDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic
=== PAUSE TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic
=== RUN   TestAccIbmMqcloudQueueManagerStatusDataSourceBasic
=== PAUSE TestAccIbmMqcloudQueueManagerStatusDataSourceBasic
=== RUN   TestAccIbmMqcloudQueueManagerDataSourceBasic
=== PAUSE TestAccIbmMqcloudQueueManagerDataSourceBasic
=== RUN   TestAccIbmMqcloudQueueManagerDataSourceAllArgs
=== PAUSE TestAccIbmMqcloudQueueManagerDataSourceAllArgs
=== RUN   TestDataSourceIbmMqcloudQueueManagerQueueManagerDetailsToMap
--- PASS: TestDataSourceIbmMqcloudQueueManagerQueueManagerDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudTruststoreCertificateDataSourceBasic
=== PAUSE TestAccIbmMqcloudTruststoreCertificateDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudTruststoreCertificateTrustStoreCertificateDetailsToMap
--- PASS: TestDataSourceIbmMqcloudTruststoreCertificateTrustStoreCertificateDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudUserDataSourceBasic
=== PAUSE TestAccIbmMqcloudUserDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudUserUserDetailsToMap
--- PASS: TestDataSourceIbmMqcloudUserUserDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudApplicationBasic
=== PAUSE TestAccIbmMqcloudApplicationBasic
=== RUN   TestAccIbmMqcloudKeystoreCertificateBasic
=== PAUSE TestAccIbmMqcloudKeystoreCertificateBasic
=== RUN   TestResourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap
--- PASS: TestResourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap (0.00s)
=== RUN   TestResourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap
--- PASS: TestResourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap (0.00s)
=== RUN   TestResourceIbmMqcloudKeystoreCertificateChannelDetailsToMap
--- PASS: TestResourceIbmMqcloudKeystoreCertificateChannelDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudQueueManagerBasic
=== PAUSE TestAccIbmMqcloudQueueManagerBasic
=== RUN   TestAccIbmMqcloudQueueManagerAllArgs
=== PAUSE TestAccIbmMqcloudQueueManagerAllArgs
=== RUN   TestAccIbmMqcloudTruststoreCertificateBasic
=== PAUSE TestAccIbmMqcloudTruststoreCertificateBasic
=== RUN   TestAccIbmMqcloudUserBasic
=== PAUSE TestAccIbmMqcloudUserBasic
=== CONT  TestAccIbmMqcloudApplicationDataSourceBasic
=== CONT  TestAccIbmMqcloudUserDataSourceBasic
=== CONT  TestAccIbmMqcloudQueueManagerAllArgs
=== CONT  TestAccIbmMqcloudQueueManagerBasic
--- PASS: TestAccIbmMqcloudUserDataSourceBasic (38.96s)
=== CONT  TestAccIbmMqcloudUserBasic
--- PASS: TestAccIbmMqcloudApplicationDataSourceBasic (47.18s)
=== CONT  TestAccIbmMqcloudKeystoreCertificateBasic
--- PASS: TestAccIbmMqcloudUserBasic (26.40s)
=== CONT  TestAccIbmMqcloudQueueManagerDataSourceBasic
--- PASS: TestAccIbmMqcloudKeystoreCertificateBasic (33.46s)
=== CONT  TestAccIbmMqcloudApplicationBasic
--- PASS: TestAccIbmMqcloudApplicationBasic (34.09s)
=== CONT  TestAccIbmMqcloudTruststoreCertificateDataSourceBasic
--- PASS: TestAccIbmMqcloudTruststoreCertificateDataSourceBasic (31.77s)
=== CONT  TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic
--- PASS: TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic (21.32s)
=== CONT  TestAccIbmMqcloudQueueManagerDataSourceAllArgs
--- PASS: TestAccIbmMqcloudQueueManagerBasic (433.71s)
=== CONT  TestAccIbmMqcloudKeystoreCertificateDataSourceBasic
--- PASS: TestAccIbmMqcloudKeystoreCertificateDataSourceBasic (34.86s)
=== CONT  TestAccIbmMqcloudTruststoreCertificateBasic
--- PASS: TestAccIbmMqcloudTruststoreCertificateBasic (35.86s)
=== CONT  TestAccIbmMqcloudQueueManagerStatusDataSourceBasic
--- PASS: TestAccIbmMqcloudQueueManagerStatusDataSourceBasic (18.82s)
--- PASS: TestAccIbmMqcloudQueueManagerDataSourceBasic (495.54s)
--- PASS: TestAccIbmMqcloudQueueManagerAllArgs (627.78s)
--- PASS: TestAccIbmMqcloudQueueManagerDataSourceAllArgs (569.04s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud 741.426s
...

pat: update docs and base configurations

pat: utils change
@shuaibbapputty shuaibbapputty marked this pull request as ready for review June 6, 2024 13:38
@shuaibbapputty
Copy link
Contributor Author

Changed the config property inside keystore certificate to optional value with some tweaking in the resource Read operation (see latest commit)

Ran Acceptance test once again.

$ make testacc TEST=./ibm/service/mqcloud/... 
 
=== RUN   TestLoadWaitForQmStatusEnvVar
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_True
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_False
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Not_Set
=== RUN   TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_Random_String
--- PASS: TestLoadWaitForQmStatusEnvVar (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_True (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_False (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Not_Set (0.00s)
    --- PASS: TestLoadWaitForQmStatusEnvVar/EnvVar_Set_To_Random_String (0.00s)
=== RUN   TestIsVersionDowngrade
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.2.2
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.2.4
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.3.0
=== RUN   TestIsVersionDowngrade/1.2.3_to_1.2.3
=== RUN   TestIsVersionDowngrade/_to_1.0.0
=== RUN   TestIsVersionDowngrade/1.0.0_to_
=== RUN   TestIsVersionDowngrade/abc.def.ghi_to_1.2.3
--- PASS: TestIsVersionDowngrade (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.2.2 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.2.4 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.3.0 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.2.3_to_1.2.3 (0.00s)
    --- PASS: TestIsVersionDowngrade/_to_1.0.0 (0.00s)
    --- PASS: TestIsVersionDowngrade/1.0.0_to_ (0.00s)
    --- PASS: TestIsVersionDowngrade/abc.def.ghi_to_1.2.3 (0.00s)
=== RUN   TestHandlePlanCheck
=== RUN   TestHandlePlanCheck/reserved-deployment
=== RUN   TestHandlePlanCheck/Basic_Plan
--- PASS: TestHandlePlanCheck (0.00s)
    --- PASS: TestHandlePlanCheck/reserved-deployment (0.00s)
    --- PASS: TestHandlePlanCheck/Basic_Plan (0.00s)
=== RUN   Test_checkSIPlan
=== RUN   Test_checkSIPlan/Cache_Hit:_Reserved_Deployment_Plan
=== RUN   Test_checkSIPlan/Cache_Hit:_Default_Plan
=== RUN   Test_checkSIPlan/Reserved_Deployment_Plan_Wildcard
=== RUN   Test_checkSIPlan/Reserved_Deployment_Plan
=== RUN   Test_checkSIPlan/Default_Plan
=== RUN   Test_checkSIPlan/fetchServicePlanFunc_Error:_Invalid_id
--- PASS: Test_checkSIPlan (0.00s)
    --- PASS: Test_checkSIPlan/Cache_Hit:_Reserved_Deployment_Plan (0.00s)
    --- PASS: Test_checkSIPlan/Cache_Hit:_Default_Plan (0.00s)
    --- PASS: Test_checkSIPlan/Reserved_Deployment_Plan_Wildcard (0.00s)
    --- PASS: Test_checkSIPlan/Reserved_Deployment_Plan (0.00s)
    --- PASS: Test_checkSIPlan/Default_Plan (0.00s)
    --- PASS: Test_checkSIPlan/fetchServicePlanFunc_Error:_Invalid_id (0.00s)
=== RUN   TestAccIbmMqcloudApplicationDataSourceBasic
=== PAUSE TestAccIbmMqcloudApplicationDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudApplicationApplicationDetailsToMap
--- PASS: TestDataSourceIbmMqcloudApplicationApplicationDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudKeystoreCertificateDataSourceBasic
=== PAUSE TestAccIbmMqcloudKeystoreCertificateDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateKeyStoreCertificateDetailsToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateKeyStoreCertificateDetailsToMap (0.00s)
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap (0.00s)
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap (0.00s)
=== RUN   TestDataSourceIbmMqcloudKeystoreCertificateChannelDetailsToMap
--- PASS: TestDataSourceIbmMqcloudKeystoreCertificateChannelDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic
=== PAUSE TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic
=== RUN   TestAccIbmMqcloudQueueManagerStatusDataSourceBasic
=== PAUSE TestAccIbmMqcloudQueueManagerStatusDataSourceBasic
=== RUN   TestAccIbmMqcloudQueueManagerDataSourceBasic
=== PAUSE TestAccIbmMqcloudQueueManagerDataSourceBasic
=== RUN   TestAccIbmMqcloudQueueManagerDataSourceAllArgs
=== PAUSE TestAccIbmMqcloudQueueManagerDataSourceAllArgs
=== RUN   TestDataSourceIbmMqcloudQueueManagerQueueManagerDetailsToMap
--- PASS: TestDataSourceIbmMqcloudQueueManagerQueueManagerDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudTruststoreCertificateDataSourceBasic
=== PAUSE TestAccIbmMqcloudTruststoreCertificateDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudTruststoreCertificateTrustStoreCertificateDetailsToMap
--- PASS: TestDataSourceIbmMqcloudTruststoreCertificateTrustStoreCertificateDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudUserDataSourceBasic
=== PAUSE TestAccIbmMqcloudUserDataSourceBasic
=== RUN   TestDataSourceIbmMqcloudUserUserDetailsToMap
--- PASS: TestDataSourceIbmMqcloudUserUserDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudApplicationBasic
=== PAUSE TestAccIbmMqcloudApplicationBasic
=== RUN   TestAccIbmMqcloudKeystoreCertificateBasic
=== PAUSE TestAccIbmMqcloudKeystoreCertificateBasic
=== RUN   TestResourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap
--- PASS: TestResourceIbmMqcloudKeystoreCertificateCertificateConfigurationToMap (0.00s)
=== RUN   TestResourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap
--- PASS: TestResourceIbmMqcloudKeystoreCertificateChannelsDetailsToMap (0.00s)
=== RUN   TestResourceIbmMqcloudKeystoreCertificateChannelDetailsToMap
--- PASS: TestResourceIbmMqcloudKeystoreCertificateChannelDetailsToMap (0.00s)
=== RUN   TestAccIbmMqcloudQueueManagerBasic
=== PAUSE TestAccIbmMqcloudQueueManagerBasic
=== RUN   TestAccIbmMqcloudQueueManagerAllArgs
=== PAUSE TestAccIbmMqcloudQueueManagerAllArgs
=== RUN   TestAccIbmMqcloudTruststoreCertificateBasic
=== PAUSE TestAccIbmMqcloudTruststoreCertificateBasic
=== RUN   TestAccIbmMqcloudUserBasic
=== PAUSE TestAccIbmMqcloudUserBasic
=== CONT  TestAccIbmMqcloudApplicationDataSourceBasic
=== CONT  TestAccIbmMqcloudUserDataSourceBasic
=== CONT  TestAccIbmMqcloudQueueManagerDataSourceBasic
=== CONT  TestAccIbmMqcloudQueueManagerAllArgs
--- PASS: TestAccIbmMqcloudApplicationDataSourceBasic (38.57s)
=== CONT  TestAccIbmMqcloudUserBasic
--- PASS: TestAccIbmMqcloudUserDataSourceBasic (40.45s)
=== CONT  TestAccIbmMqcloudTruststoreCertificateBasic
--- PASS: TestAccIbmMqcloudUserBasic (34.02s)
=== CONT  TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic
--- PASS: TestAccIbmMqcloudTruststoreCertificateBasic (40.85s)
=== CONT  TestAccIbmMqcloudQueueManagerStatusDataSourceBasic
--- PASS: TestAccIbmMqcloudQueueManagerOptionsDataSourceBasic (26.00s)
=== CONT  TestAccIbmMqcloudKeystoreCertificateBasic
--- PASS: TestAccIbmMqcloudQueueManagerStatusDataSourceBasic (24.77s)
=== CONT  TestAccIbmMqcloudQueueManagerBasic
--- PASS: TestAccIbmMqcloudKeystoreCertificateBasic (59.29s)
=== CONT  TestAccIbmMqcloudTruststoreCertificateDataSourceBasic
--- PASS: TestAccIbmMqcloudTruststoreCertificateDataSourceBasic (44.75s)
=== CONT  TestAccIbmMqcloudKeystoreCertificateDataSourceBasic
--- PASS: TestAccIbmMqcloudKeystoreCertificateDataSourceBasic (50.92s)
=== CONT  TestAccIbmMqcloudApplicationBasic
--- PASS: TestAccIbmMqcloudApplicationBasic (58.68s)
=== CONT  TestAccIbmMqcloudQueueManagerDataSourceAllArgs
--- PASS: TestAccIbmMqcloudQueueManagerDataSourceBasic (385.99s)
--- PASS: TestAccIbmMqcloudQueueManagerBasic (394.88s)
--- PASS: TestAccIbmMqcloudQueueManagerDataSourceAllArgs (396.37s)
--- PASS: TestAccIbmMqcloudQueueManagerAllArgs (879.01s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/mqcloud 880.523s

@hkantare hkantare merged commit 6dd26fd into IBM-Cloud:master Jun 12, 2024
1 check passed
@shuaibbapputty shuaibbapputty deleted the mqcloud-add-ams-to-keystore branch June 13, 2024 04:51
benbuchanan pushed a commit to benbuchanan/terraform-provider-ibm that referenced this pull request Jun 18, 2024
…ce (IBM-Cloud#5411)

* feat(MQ on Cloud): add ams channels config support to keystore resource

pat: update docs and base configurations

pat: utils change

* fix(MQ on Cloud): make ams config optional in keystore resource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants