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

[CBR rule] IAM GET API failure causing issue with CBR rule creation #4971

Closed
Ak-sky opened this issue Dec 6, 2023 · 0 comments · Fixed by #5246
Closed

[CBR rule] IAM GET API failure causing issue with CBR rule creation #4971

Ak-sky opened this issue Dec 6, 2023 · 0 comments · Fixed by #5246
Labels
service/CBR Issues related to Context Based Restrictions

Comments

@Ak-sky
Copy link

Ak-sky commented Dec 6, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

Affected Resource(s)

  • ibm_cbr_zone
  • ibm_cbr_rule

Terraform Configuration Files

CBR created for example for a Event Notification

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please share a link to the ZIP file.

Debug Output

TestRunCompleteExample 2023-11-28T06:13:43Z logger.go:66: module.event_notification.module.cbr_rule[0].ibm_cbr_rule.cbr_rule: Creating...
TestRunCompleteExample 2023-11-28T06:13:43Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_status_reporter"]: Creation complete after 7s [id=crn:v1:bluemix:public:event-notifications:us-south:a/abac0df06b644a9cabc6e44f55b3880e:71d50167-d0c3-4b7b-93e0-26813d026064:resource-key:67e4e87c-8dc1-40c7-98d4-5fbde22b25be]
TestRunCompleteExample 2023-11-28T06:13:44Z logger.go:66: module.event_notification.ibm_en_integration.en_kms_integration[0]: Creation complete after 2s [id=71d50167-d0c3-4b7b-93e0-26813d026064/13b5942b-b29e-4bee-a113-b76a786bf68d]
TestRunCompleteExample 2023-11-28T06:13:45Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_event_notifications_publisher"]: Creation complete after 8s [id=crn:v1:bluemix:public:event-notifications:us-south:a/abac0df06b644a9cabc6e44f55b3880e:71d50167-d0c3-4b7b-93e0-26813d026064:resource-key:9213adf1-10da-4a3d-8755-ba67080b7a68]
TestRunCompleteExample 2023-11-28T06:13:45Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_writer"]: Creation complete after 5s [id=crn:v1:bluemix:public:event-notifications:us-south:a/abac0df06b644a9cabc6e44f55b3880e:71d50167-d0c3-4b7b-93e0-26813d026064:resource-key:cb3c22cd-a650-4322-9116-2ef7ca039e83]
TestRunCompleteExample 2023-11-28T06:13:45Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_manager"]: Creation complete after 9s [id=crn:v1:bluemix:public:event-notifications:us-south:a/abac0df06b644a9cabc6e44f55b3880e:71d50167-d0c3-4b7b-93e0-26813d026064:resource-key:d9fa9bf8-f387-4be5-941a-8fde3d704222]
TestRunCompleteExample 2023-11-28T06:13:46Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_event_source_manager"]: Still creating... [10s elapsed]
TestRunCompleteExample 2023-11-28T06:13:46Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_custom_email_status_reporter"]: Still creating... [10s elapsed]
TestRunCompleteExample 2023-11-28T06:13:48Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_custom_email_status_reporter"]: Creation complete after 12s [id=crn:v1:bluemix:public:event-notifications:us-south:a/abac0df06b644a9cabc6e44f55b3880e:71d50167-d0c3-4b7b-93e0-26813d026064:resource-key:ec6ed11d-6f9e-4bc8-ac4b-f0d4edba51b5]
TestRunCompleteExample 2023-11-28T06:13:50Z logger.go:66: module.event_notification.ibm_resource_key.service_credentials["en_event_source_manager"]: Creation complete after 13s [id=crn:v1:bluemix:public:event-notifications:us-south:a/abac0df06b644a9cabc6e44f55b3880e:71d50167-d0c3-4b7b-93e0-26813d026064:resource-key:55bbeaff-ba06-4ea9-b97c-2a56f75f69b1]
TestRunCompleteExample 2023-11-28T06:13:51Z logger.go:66: module.event_notification.time_sleep.wait_for_authorization_policy: Still creating... [10s elapsed]
TestRunCompleteExample 2023-11-28T06:13:51Z logger.go:66: ibm_is_subnet.testacc_subnet: Still creating... [10s elapsed]
TestRunCompleteExample 2023-11-28T06:13:55Z logger.go:66: ibm_is_subnet.testacc_subnet: Creation complete after 14s [id=0717-06736443-3975-4ef2-8c5a-8c7062336eb2]
TestRunCompleteExample 2023-11-28T06:14:01Z logger.go:66: module.event_notification.time_sleep.wait_for_authorization_policy: Still creating... [20s elapsed]
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: module.event_notification.time_sleep.wait_for_authorization_policy: Still creating... [30s elapsed]
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: module.event_notification.time_sleep.wait_for_authorization_policy: Creation complete after 30s [id=2023-11-28T06:14:11Z]
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: ╷
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: │ Error: CreateRuleWithContext failed The network zone '9cc6953333f87740301f98a1017dd929' is not found.
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: │ {
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: │     "StatusCode": 404,
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: │     "Headers": {
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: │         "Akamai-Grn": [
TestRunCompleteExample 2023-11-28T06:14:11Z logger.go:66: │             "0.88f8cd17.1701152023.35d34cab"

Above TF apply log indicates that the CBR zone (zone id: 9cc6953333f87740301f98a1017dd929) was created but when the CBR rule was being created using this zone id it failed with zone is not found.

Trace Log

Attached Trace log shows failure of this GET API- GET https://iam.cloud.ibm.com/v2/roles?account_id=abac0df06b644a9cabc6e44f55b3880e&service_name=event-notifications, resulting in resource not found even though the zone was created, leading to the failure of the test example.

 : timestamp=2023-11-28T06:13:43.267Z
2023-11-28T06:13:43.267Z [INFO]  provider.terraform-provider-ibm_v1.59.1: 2023/11/28 06:13:43 [DEBUG] GET https://iam.cloud.ibm.com/v2/roles?account_id=abac0df06b644a9cabc6e44f55b3880e&service_name=event-notifications: timestamp=2023-11-28T06:13:43.267Z
2023-11-28T06:13:43.371Z [INFO]  provider.terraform-provider-ibm_v1.59.1: 2023/11/28 06:13:43 [Debug] Response:
HTTP/1.1 404 Not Found 

Expected Behavior

The CBR rule should be created.

Actual Behavior

CBR rule fails to create.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added the service/CBR Issues related to Context Based Restrictions label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/CBR Issues related to Context Based Restrictions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant