Skip to content

Provider attributes api_key and account_id should be optional #2486

Open
@balonik

Description

@balonik

Provider attributes api_key and account_id should be as optional, because they can be set using environment variables. Having them as required is causing false positives for linters, in my case terraform-ls.

Actual Behavior

A provider definition like:

provider "newrelic" {
  account_id = var.new_relic_account_id
}

will cause error/warning:

Required attribute "api_key" not specified: An attribute named "api_key" is required here

Expected Behavior

No error/warning by linter.

Versions

Terraform version: 1.6.0
Provider version: 3.27.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions