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

azurerm_recovery_services_protection_policy missing timezone & unable to edit once deployed #2379

Closed
fluffy-cakes opened this issue Nov 23, 2018 · 2 comments

Comments

@fluffy-cakes
Copy link

fluffy-cakes commented Nov 23, 2018

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

λ terraform -v
Terraform v0.11.10
+ provider.azurerm v1.18.0

Affected Resource(s)

  • azurerm_recovery_services_protection_policy

Terraform Configuration Files

resource "azurerm_recovery_services_protection_policy_vm" "vault-policy" {
  name                  = "Standard-Policy-PRD"
  resource_group_name   = "${azurerm_resource_group.rg-prd-chkprm-recovery.name}"
  recovery_vault_name   = "${azurerm_recovery_services_vault.vault.name}"

  backup                = {
    frequency           = "Weekly"
    weekdays            = ["Saturday"]
    time                = "01:00"
  }

  retention_weekly      = {
    count               = 5
    weekdays            = ["Saturday"]
  }

  retention_monthly     = {
    count               = 5
    weekdays            = ["Saturday"]
    weeks               = ["First"]
  }

  retention_yearly      = {
    count               = 5
    weekdays            = ["Saturday"]
    weeks               = ["First"]
    months              = ["January"]
  }
}

Debug Output

Panic Output

Expected Behavior

Deploy policy and able to be applied to other resources

Actual Behavior

Deploys but is incomplete and unable to be edited.

azurerm_recovery_services_protection_policy_vm.vault-policy: Creating...
  backup.#:                               "" => "1"
  backup.0.frequency:                     "" => "Weekly"
  backup.0.time:                          "" => "01:00"
  backup.0.weekdays.#:                    "" => "1"
  backup.0.weekdays.275429046:            "" => "Saturday"
  name:                                   "" => "Standard-Policy-PRD"
  recovery_vault_name:                    "" => "recovery-prd"
  resource_group_name:                    "" => "rg-prd-chkprm-recovery"
  retention_monthly.#:                    "" => "1"
  retention_monthly.0.count:              "" => "5"
  retention_monthly.0.weekdays.#:         "" => "1"
  retention_monthly.0.weekdays.275429046: "" => "Saturday"
  retention_monthly.0.weeks.#:            "" => "1"
  retention_monthly.0.weeks.2456940119:   "" => "First"
  retention_weekly.#:                     "" => "1"
  retention_weekly.0.count:               "" => "5"
  retention_weekly.0.weekdays.#:          "" => "1"
  retention_weekly.0.weekdays.275429046:  "" => "Saturday"
  retention_yearly.#:                     "" => "1"
  retention_yearly.0.count:               "" => "5"
  retention_yearly.0.months.#:            "" => "1"
  retention_yearly.0.months.1982134867:   "" => "January"
  retention_yearly.0.weekdays.#:          "" => "1"
  retention_yearly.0.weekdays.275429046:  "" => "Saturday"
  retention_yearly.0.weeks.#:             "" => "1"
  retention_yearly.0.weeks.2456940119:    "" => "First"
  tags.%:                                 "" => "<computed>"
azurerm_recovery_services_protection_policy_vm.vault-policy: Still creating... (10s elapsed)
azurerm_recovery_services_protection_policy_vm.vault-policy: Creation complete after 12s (ID: /subscriptions...

Looking at the policy inside the portal once created it is missing the TimeZone:
image

When trying to edit the policy to include the correct timezone, it doesn't save, instead it errors;
image

Error output from Activity Log:

Operation name
Create Protection Policy
Time stamp
Fri Nov 23 2018 11:40:17 GMT+0000 (Greenwich Mean Time)
Event initiated by
asdf@asdf.com
Error code
BMSUserErrorInvalidPolicyInput
Message
Input for create or update policy is not in proper format
 Please check format of parameters like schedule time, schedule days, retention time and retention days

If I were to recreate this by hand in the portal with the same settings, it works 100% every time.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@katbyte
Copy link
Collaborator

katbyte commented Nov 28, 2018

Hi @paulmackinnon-adv365,

This is already being tracked in #2147, as such i am going to close this issue as a duplicate.

@katbyte katbyte closed this as completed Nov 28, 2018
@ghost
Copy link

ghost commented Mar 5, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants