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

Support a couple of new sentinel data connectors #18795

Closed
wants to merge 7 commits into from

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Oct 17, 2022

Implements a couple of sentinel new data connectors:

  • sentinel_data_connector_office_irm
  • sentinel_data_connector_office_power_bi
  • sentinel_data_connector_office_365_project
  • sentinel_data_connector_dynamics_365
  • sentinel_data_connector_iot
  • azurerm_sentinel_data_connector_microsoft_threat_protection

Relating to #18195.

Test

💢  TF_ACC=1 go test -v -timeout=20h ./internal/services/sentinel -run='TestAccAzureRMSentinelDataConnectorOfficeIRM_'
=== RUN   TestAccAzureRMSentinelDataConnectorOfficeIRM_basic
=== PAUSE TestAccAzureRMSentinelDataConnectorOfficeIRM_basic
=== RUN   TestAccAzureRMSentinelDataConnectorOfficeIRM_complete
=== PAUSE TestAccAzureRMSentinelDataConnectorOfficeIRM_complete
=== RUN   TestAccAzureRMSentinelDataConnectorOfficeIRM_requiresImport
=== PAUSE TestAccAzureRMSentinelDataConnectorOfficeIRM_requiresImport
=== CONT  TestAccAzureRMSentinelDataConnectorOfficeIRM_basic
=== CONT  TestAccAzureRMSentinelDataConnectorOfficeIRM_requiresImport
=== CONT  TestAccAzureRMSentinelDataConnectorOfficeIRM_complete
--- PASS: TestAccAzureRMSentinelDataConnectorOfficeIRM_basic (148.61s)
--- PASS: TestAccAzureRMSentinelDataConnectorOfficeIRM_complete (149.21s)
--- PASS: TestAccAzureRMSentinelDataConnectorOfficeIRM_requiresImport (161.17s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/sentinel      161.185s

💤  TF_ACC=1 go test -v -timeout=20h ./internal/services/sentinel -run='TestAccAzureRMSentinelDataConnectorOfficePowerBI_'
=== RUN   TestAccAzureRMSentinelDataConnectorOfficePowerBI_basic
=== PAUSE TestAccAzureRMSentinelDataConnectorOfficePowerBI_basic
=== RUN   TestAccAzureRMSentinelDataConnectorOfficePowerBI_complete
=== PAUSE TestAccAzureRMSentinelDataConnectorOfficePowerBI_complete
=== RUN   TestAccAzureRMSentinelDataConnectorOfficePowerBI_requiresImport
=== PAUSE TestAccAzureRMSentinelDataConnectorOfficePowerBI_requiresImport
=== CONT  TestAccAzureRMSentinelDataConnectorOfficePowerBI_basic
=== CONT  TestAccAzureRMSentinelDataConnectorOfficePowerBI_requiresImport
=== CONT  TestAccAzureRMSentinelDataConnectorOfficePowerBI_complete
--- PASS: TestAccAzureRMSentinelDataConnectorOfficePowerBI_complete (150.42s)
--- PASS: TestAccAzureRMSentinelDataConnectorOfficePowerBI_basic (150.42s)
--- PASS: TestAccAzureRMSentinelDataConnectorOfficePowerBI_requiresImport (151.96s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/sentinel      151.977s

@magodo magodo changed the title New resource: sentinel_data_connector_office_irm New resource: sentinel_data_connector_office_irm, sentinel_data_connector_office_power_bi Oct 17, 2022
@magodo magodo changed the title New resource: sentinel_data_connector_office_irm, sentinel_data_connector_office_power_bi Support a couple of sentinel data connector new resources Oct 18, 2022
@magodo magodo changed the title Support a couple of sentinel data connector new resources Support a couple of new sentinel data connectors Oct 18, 2022
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Hey @magodo, thanks for this PR.

This looks fine, but seeing as these would need to be rewritten as typed resources at some point for Pandora and these resources are practically identical (aside from the Kind/Type) this would lend itself well to being rewritten now and defining a "base resource" which the different connectors pass their Kind to. costmanagement has an example of what I mean.

Thanks!


type SentinelDataConnectorDynamics365Resource struct{}

func TestAccAzureRMSentinelDataConnectorDynamics365_basic(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Could we remove AzureRM from all the test names

Suggested change
func TestAccAzureRMSentinelDataConnectorDynamics365_basic(t *testing.T) {
func TestAccSentinelDataConnectorDynamics365_basic(t *testing.T) {

@magodo
Copy link
Collaborator Author

magodo commented Oct 19, 2022

@stephybun Thank you for the comment, I'll do the migration and split each resource into their own PR. I'll close this PR for now.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants