terraform-linters / tflint-ruleset-azurerm

TFLint ruleset for terraform-provider-azurerm
Mozilla Public License 2.0
116 stars 24 forks source link

tflint --deep reports error stating missing aws config for azure terraform config #49

Closed ameyaagashe closed 7 months ago

ameyaagashe commented 4 years ago

Hi,

I have the below terraform config

cat main.tf

# Configure the Azure provider
provider "azurerm" {
  version = "=2.20.0"
  subscription_id = var.subscriptionID
   features {}
  }

#create resource group
resource "azurerm_resource_group" "tf-rg" {
    name                   = var.rg_name
    location               = var.location
}

cat variables.tf

variable "subscriptionID" {
    type = string
    description = "Variable for our resource group"
    default = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

variable "location" {
    type = string
    description = "location of  resource group"
    default = "Australia Southeast"
}

variable "rg_name" {
    type = string
    description = "name of resource group"
    default = "Prod02"
}

However, when I run tflint --deep, I get the error like below:

Failed to initialize a runner. An error occurred:

Error: no valid credential sources for found.

Please see
for more information about providing credentials.

Error: NoCredentialProviders: no valid providers in chain. Deprecated.
        For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Note: I have installed terraform and even executed

terraform init
terraform plan
terrafrm apply

I have installed tflint for azure as well https://github.com/terraform-linters/tflint-ruleset-azurerm

Please advise what I am doing wrong here?

wata727 commented 4 years ago

Hi @ameyaagashe

Sorry, deep inspection is only supported in the AWS provider now.

ameyaagashe commented 4 years ago

@wata727 What is available for Azure in that case?

wata727 commented 4 years ago

Normal inspection is available. It doesn't require Azure or AWS credentials and is available by default.

Although there is no plan yet, if deep inspection is supported in Azure, it will be possible to perform more detailed inspection with calling APIs using Azure credentials.

samrobillard commented 7 months ago

Will deep checking be available soon for Azure?

wata727 commented 7 months ago

There are no plans yet. I don't have enough time to maintain this ruleset, so development of new features like this has been frozen for a long time. Proposals for new features with high feasibility, or the participation of new maintainers may move this type of feature forward.

wata727 commented 7 months ago

Since the original question has been resolved, closing this issue.