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

Upgrade sentinel API to 2021-09-01-preview #14983

Merged

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Jan 17, 2022

Upgrade sentinel API to 2021-09-01-preview.

Note that there is one breaking change in the azurerm_sentinel_alert_rule_scheduled resource, where the allowed enums of the entity_matching_method changed from [All, Custom, None] to [AnyAlert, Selected, AllEntities].

Related issues: #14244, #14973

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hi @magodo

Thanks for this PR.

Taking a look through as you've mentioned there's some breaking changes in this PR - what's the migration path for existing users?

Thanks!

Comment on lines 156 to 158
string(securityinsight.EntitiesMatchingMethodAll),
string(securityinsight.EntitiesMatchingMethodCustom),
string(securityinsight.EntitiesMatchingMethodNone),
string(securityinsight.MatchingMethodAnyAlert),
string(securityinsight.MatchingMethodSelected),
string(securityinsight.MatchingMethodAllEntities),
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the migration path for users/resources here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just confirmed with the service team and verified in my local: the original enums All, Custom, None corresponds to the AllEntities, Selected and AnyAlert. If the user creats the alert rule using the old API version, and do a GET using the new one, the enums are returned in their new form.

Copy link
Contributor

Choose a reason for hiding this comment

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

Reckon for any enums that dont do this could translate them and provide a warning to the user for a few versions - although if all old enums behave like this users will know to fix their configuration when their is idempotency

Copy link
Collaborator Author

@magodo magodo Jan 25, 2022

Choose a reason for hiding this comment

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

Good idea, I'll make the change.

@katbyte
Copy link
Collaborator

katbyte commented Jan 28, 2022

@magodo - we have some licensing issues:

------- Stdout: -------
=== RUN   TestAccAzureRMSentinelDataConnectorAzureAdvancedThreatProtection_basic
=== PAUSE TestAccAzureRMSentinelDataConnectorAzureAdvancedThreatProtection_basic
=== CONT  TestAccAzureRMSentinelDataConnectorAzureAdvancedThreatProtection_basic
    testcase.go:110: Step 1/2 error: Error running apply: exit status 1
        
        Error: creating Data Connector: (Name "accTestDC-220128025125641996" / Workspace Name "acctestLAW-220128025125641996" / Resource Group "acctestRG-sentinel-220128025125641996"): securityinsight.DataConnectorsClient#CreateOrUpdate: Failure responding to request: StatusCode=401 -- Original Error: autorest/azure: Service returned an error. Status=401 Code="InvalidLicense" Message="License is invalid"
        
          with azurerm_sentinel_data_connector_azure_advanced_threat_protection.test,
          on terraform_plugin_test.tf line 33, in resource "azurerm_sentinel_data_connector_azure_advanced_threat_protection" "test":
          33: resource "azurerm_sentinel_data_connector_azure_advanced_threat_protection" "test" {
        
--- FAIL: TestAccAzureRMSentinelDataConnectorAzureAdvancedThreatProtection_basic (164.98s)
FAIL

Do you know how we can resolve this in our tenant?

@magodo
Copy link
Collaborator Author

magodo commented Jan 28, 2022

@katbyte The license issue has been last for quite a while, I've ping you in the slack channel for the context of that issue. Personally, I don't have the knowledge about the license setup, since my account don't have that permission in the tenant.

@magodo
Copy link
Collaborator Author

magodo commented Mar 7, 2022

@katbyte Is there any chance that we can get this PR merged? There are a couple of sentinel related new features pending on this PR.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @magodo - LGTM 🏗️

@katbyte katbyte merged commit 292e3a9 into hashicorp:main Mar 10, 2022
@github-actions github-actions bot added this to the v2.99.0 milestone Mar 10, 2022
katbyte added a commit that referenced this pull request Mar 10, 2022
@github-actions
Copy link

This functionality has been released in v2.99.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@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 Apr 11, 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.

4 participants