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

Bug report-Undeclared Variable Warning with maintenance_configuration and maintenance_assignment_virtual_machine #1986

Open
1 task done
mohammbeg opened this issue May 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mohammbeg
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

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

Version of the module you are using

5.7.7

Rover Version

na

Terraform Version

v1.7.4 on windows_amd6

AzureRM Provider Version

3.75.0

Affected Resource(s)/Data Source(s)

maintenance_configuration , maintenance_assignment_virtual_machine

Terraform Configuration Files

maintenance_configuration = {
  mc_sch = {
    name = "maintenance-configuration"
    region = "Southeast Asia"
    resource_group = main-rg    
    scope = "InGuestPatch"
    in_guest_user_patch_mode = "User"
    window = {
      start_date_time = "2024-05-12 00:00"  // Adjust this date to a Saturday
      duration        = "02:00"
      time_zone       = "Romance Standard Time"
      recur_every     = "1Week"
    }    
    install_patches = {
      linux = {
        classifications_to_include = ["Critical", "Security"]
      }
      reboot = "IfRequired"
    }
  }
}

maintenance_assignment_virtual_machine = {
  sch_mc = {
    region                        = "Southeast Asia"
    maintenance_configuration_key = "mc_sch"
    virtual_machine = {
      key = "main-vm2"
    }
  }
}

Expected Behaviour

The provided example does not work

Actual Behaviour

Warning: Value for undeclared variable

│ The root module does not declare a variable named "maintenance_assignment_virtual_machine" but a value was found in file
│ "C:\Users\configuration.tfvars". If you meant to use this value, add a "variable" block to the
│ configuration.

│ To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all configurations in your organization. To reduce the verbosity of
│ these warnings, use the -compact-warnings option.


│ Warning: Value for undeclared variable

│ The root module does not declare a variable named "maintenance_configuration" but a value was found in file
│ "C:\Users\configuration.tfvars". If you meant to use this value, add a "variable" block to the
│ configuration.

│ To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all configurations in your organization. To reduce the verbosity of
│ these warnings, use the -compact-warnings option.

Steps to Reproduce

No response

Important Factoids

na

References

No response

@mohammbeg mohammbeg added the bug Something isn't working label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant