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

automation_runbook - add support of draft and log_activity_trace properties #17961

Merged
merged 7 commits into from
Oct 12, 2022

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Aug 11, 2022

support create runbook by draft

--- PASS: TestAccAutomationRunbook_PSWorkflow (173.00s)
--- PASS: TestAccAutomationRunbook_WithDraft (163.71s)
--- PASS: TestAccAutomationRunbook_requiresImport (118.19s)
--- PASS: TestAccAutomationRunbook_PSWorkflowWithHash (169.84s)
--- PASS: TestAccAutomationRunbook_PSWithContent (161.35s)
--- PASS: TestAccAutomationRunbook_PSWorkflowWithoutUri (162.39s)
--- PASS: TestAccAutomationRunbook_withJobSchedule (432.89s)
PASS

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 some test failures

------- Stdout: -------
=== RUN   TestAccAutomationRunbook_withJobSchedule
=== PAUSE TestAccAutomationRunbook_withJobSchedule
=== CONT  TestAccAutomationRunbook_withJobSchedule
    testcase.go:110: Step 5/8 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # azurerm_automation_runbook.test will be updated in-place
          ~ resource "azurerm_automation_runbook" "test" {
                id                       = "/subscriptions/*******/resourceGroups/acctestRG-220915024726597108/providers/Microsoft.Automation/automationAccounts/acctest-220915024726597108/runbooks/Get-AzureVMTutorial"
              ~ job_schedule             = [
                  - {
                      - job_schedule_id = "03f3f55f-6277-4df9-abb1-d22a6fd3f672"
                      - parameters      = {}
                      - run_on          = ""
                      - schedule_name   = "acctestAS-220915024726597108"
                    },
                    # (1 unchanged element hidden)
                ]
                name                     = "Get-AzureVMTutorial"
                tags                     = {}
                # (9 unchanged attributes hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccAutomationRunbook_withJobSchedule (257.73s)
FAIL

@wuxu92
Copy link
Contributor Author

wuxu92 commented Sep 16, 2022

  1. revert the hash function updated in this pr. there is a pr for it automation_runbook - fix job_scheudle property's hash function #17991
  2. according to azurerm_automation_runbook - allow invalid publish_content_links #7824 the uri of publish content link can be empty, so I remove the validation added myself before

now all tests passed
image

@wuxu92
Copy link
Contributor Author

wuxu92 commented Oct 9, 2022

@katbyte add validation for uri property. please have a look at it again ❤️

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.

LGTM 🎩

@katbyte katbyte merged commit 3b19cb2 into hashicorp:main Oct 12, 2022
@github-actions github-actions bot added this to the v3.27.0 milestone Oct 12, 2022
katbyte added a commit that referenced this pull request Oct 12, 2022
@github-actions
Copy link

This functionality has been released in v3.27.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!

@farwind
Copy link

farwind commented Oct 21, 2022

there is documentation bug in regards to this released functionality :
"parameter: (Optional) A list of parameter block as define below." but the expected argument is parameters instead of documentation mentioned parameter
link to documentation here

@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 21, 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.

None yet

3 participants