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

Support for required_providers block inside terraform #202

Open
romanprog opened this issue May 30, 2023 · 0 comments
Open

Support for required_providers block inside terraform #202

romanprog opened this issue May 30, 2023 · 0 comments
Assignees
Labels
kind/feature New feature or request

Comments

@romanprog
Copy link
Contributor

romanprog commented May 30, 2023

Now (deprecated in terraform >1.0):

provider "aws" {
  region  = "eu-central-1"
  version = "4.67.0"
}

Should be:

provider "aws" {
  region  = "eu-central-1"
}

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.0"
    }
  }
}

Cdev unit code example:

  -
    name: redis-{{ $name }}
    type: tfmodule
    providers:
    - aws:
        region: {{ $variables.region }}
    required_providers:
    - aws:
        source: "hashicorp/aws"
        version: "4.67.0"
    source: cloudposse/elasticache-redis/aws
    version: "0.49.0"
    inputs:
      zone_id: []
@romanprog romanprog added the kind/feature New feature or request label May 30, 2023
@romanprog romanprog self-assigned this May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant