# Copyright (c) The OpenTofu Authors
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) 2023 HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: Feature Request
description: Suggest a new feature or other enhancement.
labels: ["enhancement", "pending-decision"]
body:
  - type: markdown
    attributes:
      value: |
        # Thank you for opening a feature request.
        
        In order to make your feature request a success, here are some simple tips to follow:
        
        1. Try to describe what you need to achieve rather than how you would like to change OpenTofu to change.
        2. Be as specific as possible. Overarching large changes to OpenTofu have a lower chance of getting accepted than specific changes.
        3. Describe how it affects your current project specifically. Try to support it with specific code and describe why the current situation is unsatisfactory.
  - type: textarea
    id: community-note
    attributes:
      label: Community note
      description: Please leave this note unchanged.
      value: |
        > [!TIP]
        > 👋 Hi there, OpenTofu community! The OpenTofu team prioritizes issues based on upvotes. Please make sure to upvote this issue and describe how it affects you in detail in the comments to show your support.
  - type: textarea
    id: tf-version
    attributes:
      label: OpenTofu Version
      description: Run `tofu version` to show the version, and paste the result below. If you're not using the latest version, please check to see if something related to your request has already been implemented in a later version.
      render: shell
      placeholder: ...output of `tofu version`...
      value:
    validations:
      required: true

  - type: textarea
    id: tf-use-case
    attributes:
      label: The problem in your OpenTofu project
      description: |
        **Please describe the problem you are trying to solve in your project.** This field should contain a description of what you are trying to achieve in your project using OpenTofu that is difficult today.
      placeholder:
      value:
    validations:
      required: true

  - type: textarea
    id: tf-attempted-solution
    attributes:
      label: Attempted Solutions
      description: |
          If you've already tried to solve the problem within OpenTofu's existing features and found a limitation that prevented you from succeeding, please describe it below in as much detail as possible.
          Ideally, this would include real configuration snippets that you tried, real OpenTofu command lines you ran, and what results you got in each case.
          Please remove any sensitive information such as passwords before sharing configuration snippets and command lines.
      placeholder:
      value:
    validations:
      required: true

  - type: textarea
    id: tf-proposal
    attributes:
      label: Proposal
      description: |
          If you have an idea for a way to address the problem via a change to OpenTofu features, please describe it below.
          In this section, it's helpful to include specific examples of how what you are suggesting might look in configuration files, or on the command line, since that allows us to understand the full picture of what you are proposing.
          If you're not sure of some details, don't worry! When we evaluate the feature request we may suggest modifications as necessary to work within the design constraints of OpenTofu Core.
      placeholder:
      value:
    validations:
      required: false

  - type: textarea
    id: tf-workarounds
    attributes:
      label: Workarounds and Alternatives
      description: |
        What workarounds and alternatives have you tried? What worked and what didn't? How would this proposal make life easier compared to these solutions?
      placeholder:
      value:
    validations:
      required: true
  - type: textarea
    id: tf-references
    attributes:
      label: References
      description: |
        Are there any other GitHub issues, whether open or closed, that are related to the problem you've described above or to the suggested solution? If so, please create a list below that mentions each of them. For example:
        ```
          - #1
        ```
      placeholder:
      value:
    validations:
      required: false

  - type: markdown
    attributes:
      value: |
        **Note:** If the submit button is disabled and you have filled out all required fields, please check that you did not forget a **Title** for the issue.
