-
Notifications
You must be signed in to change notification settings - Fork 666
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: add ibm_event_streams_quota data source and resource #5610
Conversation
7e3dfe8
to
63683b9
Compare
63683b9
to
4b78510
Compare
LGTM |
@@ -3325,6 +3334,20 @@ func (c *Config) ClientSession() (interface{}, error) { | |||
}) | |||
} | |||
|
|||
esAdminRestV1Options := &adminrestv1.AdminrestV1Options{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check other client session creation for visibility . If visbility is private then we construct service endpoint with private does your serivce support private endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visibility doesn't apply in our case, we do not set visibility in the client session. The code interacts with an instance of the Event Streams service which the user has provisioned. The endpoint is determined by a URL exposed in the instance metadata.
if err != nil { | ||
log.Printf("[DEBUG] GetQuota failed with error: %s and response: %s\n", err, response) | ||
if response != nil && response.StatusCode == 404 { | ||
return diag.FromErr(fmt.Errorf("Quota for '%s' does not exist", entity)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you migrate to new error framework as announced in different slack channels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have migrated to the flex framework, and also updated #5621.
What has been done?
Add a data source and resource for the IBM Event Streams quotas.
The quota data model used by both data source and resource is:
resource_instance_id
: The CRN of the Event Streams service instance. (Our existing models for topics and schemas also use this to identify the service instance.) Required in data source and resource.entity
: "default", or the IAM ID of the user. Required in data source and resource.producer_byte_rate
: The producer limit, using -1 for no limit. Computed in data source, required in resource.consumer_byte_rate
: The consumer limit, using -1 for no limit. Computed in data source, required in resource.The implementations use the Event Streams SDK client for our admin-rest API.
kafka_http_url
)Community Note
Closes internal Event Streams feature request from BNPP
Output from acceptance testing: