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

SUMO-227092: Support terraform for azure event hub log source #590

Closed
wants to merge 4 commits into from

Conversation

yyyttthan99
Copy link
Contributor

@yyyttthan99 yyyttthan99 commented Nov 8, 2023

PR description:
Added a new resource sumologic_azure_event_hub_log_source in terraform for the new azure source.

Tests performed:

  1. Manual test by creating a main.tf and using the dev build provider
  • Create
Screenshot 2023-11-08 at 11 43 59 AM
  • Update
Screenshot 2023-11-09 at 10 30 56 AM
  • Delete
Screenshot 2023-11-09 at 10 35 25 AM Screenshot 2023-11-09 at 10 35 34 AM

NOTE: There is a TODO item in azure_event_hub_log_source.html.markdown. We should add a page for Azure Event Hub Log Source under the section https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/ . Then we need to update this doc once we have that page.

@yyyttthan99 yyyttthan99 requested review from yuting-liu and samjsong and removed request for dagould November 8, 2023 21:36
@yyyttthan99 yyyttthan99 added the collection Item is related to data collection aspect of Sumo Logic. label Nov 8, 2023
website/docs/r/polling_source.html.markdown Outdated Show resolved Hide resolved
website/docs/r/azure_event_hub_log_source.html.markdown Outdated Show resolved Hide resolved
website/docs/r/azure_event_hub_log_source.html.markdown Outdated Show resolved Hide resolved
website/docs/r/azure_event_hub_log_source.html.markdown Outdated Show resolved Hide resolved
@@ -1,4 +1,6 @@
## 2.27.1 (Unreleased)
FEATURES:
* **New Resource:** sumologic_azure_event_hub_log_source (GH-590)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to indicate that this feature is in Beta?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we usually added description of XXX is in beta in markdown file: website/docs/r/azure_event_hub_log_source.html.markdown

@@ -1,4 +1,6 @@
## 2.27.1 (Unreleased)
FEATURES:
* **New Resource:** sumologic_azure_event_hub_log_source (GH-590)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we usually added description of XXX is in beta in markdown file: website/docs/r/azure_event_hub_log_source.html.markdown

website/docs/r/azure_event_hub_log_source.html.markdown Outdated Show resolved Hide resolved
+ `region` - (Optional) The value can be either "Commercial" for azure or "US Gov" for azure gov. Default is for azure.

[1]: https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources/JSON_Parameters_for_Hosted_Sources
[2]: https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/XXX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a real azure event hub doc page?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have it yet, so I listed it as a TODO item in the description. I'm not sure if we should merge this PR first and then update the link or if we shouldn't include the dummy link at all.

@yuting-liu
Copy link
Contributor

  1. From your description, it seems that those tests are skipped. From the PR check, I saw azure related tests failed:
=== RUN   TestAccSumologicAzureEventHubLogSource_create
    testing.go:705: Step 0 error: errors during apply:
        
        Error: ***
          "status" : 400,
          "id" : "GEZI2-MB312-16K2J",
          "code" : "collectors.validation.fields.missing",
          "message" : "Missing required field: 'resources'"
        ***
        
          on /tmp/tf-test2087671[52](https://github.com/SumoLogic/terraform-provider-sumologic/actions/runs/6804291111/job/18502615457?pr=590#step:5:53)2/main.tf line 7:
          (source code not available)
        
        
--- FAIL: TestAccSumologicAzureEventHubLogSource_create (1.92s)
=== RUN   TestAccSumologicAzureEventHubLogSource_update
    testing.go:705: Step 0 error: errors during apply:
        
        Error: ***
          "status" : 400,
          "id" : "3W1GP-E7KUO-RQUPL",
          "code" : "collectors.validation.fields.missing",
          "message" : "Missing required field: 'resources'"
        ***
        
          on /tmp/tf-test38261[54](https://github.com/SumoLogic/terraform-provider-sumologic/actions/runs/6804291111/job/18502615457?pr=590#step:5:55)101/main.tf line 7:
          (source code not available)
        
        
--- FAIL: TestAccSumologicAzureEventHubLogSource_update (1.94s)
  1. Besides, did you try running locally built terraform to see if you can perform azure source CRUD operations via terraform? Steps: https://github.com/Sanyaku/codelabs/blob/master/backend/pages/SumoLogicTerraformProvider.md#running-locally-built-terraform-provider

@@ -2,7 +2,7 @@
layout: "sumologic"
page_title: "SumoLogic: sumologic_polling_source"
description: |-
Provides a Sumologic Polling source. This source is used to import data from various AWS products.
Provides a Sumologic Polling source. This source is used to import data from various AWS and Azure products.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to edit this as this source is deprecated already.

+ `consumer_group` - (Required) The consumer group of the event hub.
+ `region` - (Optional) The region of the event hub. The value can be either `Commercial` for Azure, or `US Gov` for Azure Government. Defaults to `Commercial`.

[1]: https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/XXX
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove the link as this will be a broken link until a helpdoc page is added.

@yyyttthan99
Copy link
Contributor Author

plox test

@yyyttthan99
Copy link
Contributor Author

plox test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collection Item is related to data collection aspect of Sumo Logic.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants