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

New Resource: azurerm_automation_software_update_configuration #17902

Merged
merged 10 commits into from
Sep 22, 2022

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Aug 5, 2022

add support for azurerm_automation_software_update_configuration

--- PASS: TestAccSoftwareUpdateConfiguration_basic (174.92s)
--- PASS: TestAccSoftwareUpdateConfiguration_update (312.09s)
PASS

@wuxu92 wuxu92 changed the title New Resource azurerm_automation_software_update_configuration New Resource: azurerm_automation_software_update_configuration Aug 15, 2022
@wuxu92 wuxu92 force-pushed the v/accountSoftUpConf branch from e299d74 to 0e37d21 Compare September 2, 2022 05:50
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.

Have some test failures:

------- Stdout: -------
=== RUN   TestAccSoftwareUpdateConfiguration_update
=== PAUSE TestAccSoftwareUpdateConfiguration_update
=== CONT  TestAccSoftwareUpdateConfiguration_update
    testcase.go:110: Step 1/4 error: Error running apply: exit status 1
        
        Error: creating Software Update Configuration: (Name "acctest-suc-220908181914774434" / Automation Account Name "acctest-220908181914774434" / Resource Group "acctestRG-auto-220908181914774434"): automation.SoftwareUpdateConfigurationsClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Error - chosen Azure Automation does not have a Log Analytics workspace linked for operation to succeed. To know which regions are supported for linking, see our documentation at: https://aka.ms/Automation-Region-Mapping"
        
          with azurerm_automation_software_update_configuration.test,
          on terraform_plugin_test.tf line 42, in resource "azurerm_automation_software_update_configuration" "test":
          42: resource "azurerm_automation_software_update_configuration" "test" {
        
        creating Software Update Configuration: (Name
        "acctest-suc-220908181914774434" / Automation Account Name
        "acctest-220908181914774434" / Resource Group
        "acctestRG-auto-220908181914774434"):
        automation.SoftwareUpdateConfigurationsClient#Create: Failure responding to
        request: StatusCode=400 -- Original Error: autorest/azure: Service returned
        an error. Status=400 Code="BadRequest" Message="Error - chosen Azure
        Automation does not have a Log Analytics workspace linked for operation to
        succeed. To know which regions are supported for linking, see our
        documentation at: https://aka.ms/Automation-Region-Mapping"
--- FAIL: TestAccSoftwareUpdateConfiguration_update (123.43s)
FAIL

@wuxu92
Copy link
Contributor Author

wuxu92 commented Sep 13, 2022

tests passed

image

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.

we have a flakey test here:

 Error: creating Software Update Configuration: (Name "acctest-suc-220913160651661230" / Automation Account Name "acctest-220913160651661230" / Resource Group "acctestRG-auto-220913160651661230"): automation.SoftwareUpdateConfigurationsClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Error - chosen Azure Automation does not have a Log Analytics workspace linked for operation to succeed. To know which regions are supported for linking, see our documentation at: https://aka.ms/Automation-Region-Mapping"

this might be eventually consistancy issue with LA?

@wuxu92
Copy link
Contributor Author

wuxu92 commented Sep 15, 2022

The newest commit id is 43d387559f4df8c8e0abd3782adb21ed9969d4a8 which tests passed, and the commit id of failed test is a1aa73a7228320435065af934afd69827c4c42cb which is a bit confusing i did not push such a commit. so @katbyte could you please rerun this test with commit id 43d387559f4df8c8e0abd3782adb21ed9969d4a8?

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.

Still have test failures:

------- Stdout: -------
=== RUN   TestAccSoftwareUpdateConfiguration_update
=== PAUSE TestAccSoftwareUpdateConfiguration_update
=== CONT  TestAccSoftwareUpdateConfiguration_update
    testcase.go:110: Step 1/4 error: Error running apply: exit status 1
        
        Error: creating Software Update Configuration: (Name "acctest-suc-220920161519073441" / Automation Account Name "acctest-220920161519073441" / Resource Group "acctestRG-auto-220920161519073441"): automation.SoftwareUpdateConfigurationsClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Error - chosen Azure Automation does not have a Log Analytics workspace linked for operation to succeed. To know which regions are supported for linking, see our documentation at: https://aka.ms/Automation-Region-Mapping"
        
          with azurerm_automation_software_update_configuration.test,
          on terraform_plugin_test.tf line 36, in resource "azurerm_automation_software_update_configuration" "test":
          36: resource "azurerm_automation_software_update_configuration" "test" {
        
        creating Software Update Configuration: (Name
        "acctest-suc-220920161519073441" / Automation Account Name
        "acctest-220920161519073441" / Resource Group
        "acctestRG-auto-220920161519073441"):
        automation.SoftwareUpdateConfigurationsClient#Create: Failure responding to
        request: StatusCode=400 -- Original Error: autorest/azure: Service returned
        an error. Status=400 Code="BadRequest" Message="Error - chosen Azure
        Automation does not have a Log Analytics workspace linked for operation to
        succeed. To know which regions are supported for linking, see our
        documentation at: https://aka.ms/Automation-Region-Mapping"
--- FAIL: TestAccSoftwareUpdateConfiguration_update (98.30s)
FAIL

@wuxu92
Copy link
Contributor Author

wuxu92 commented Sep 22, 2022

sorry, it was my mistake. the root cause of test failure is the region map of automation's linked log analytics workspace is mismatched. because TeamCity use east us to create log analytics workspace and automation/softwareconfigurationupdate which EastUS is mapping to EastUS2 as screenshot blow. so I choose westus (in code) for tests of this resource.

image

https://learn.microsoft.com/en-us/azure/automation/how-to/region-mappings

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.

Tests pass now @wuxu92 ! thanks LGTM ⚙️

@katbyte katbyte merged commit 85899b4 into hashicorp:main Sep 22, 2022
@github-actions github-actions bot added this to the v3.24.0 milestone Sep 22, 2022
katbyte added a commit that referenced this pull request Sep 22, 2022
@github-actions
Copy link

This functionality has been released in v3.24.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 Oct 25, 2022
@wuxu92 wuxu92 deleted the v/accountSoftUpConf branch April 3, 2023 02:19
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