Giter Site home page Giter Site logo

Comments (1)

pranav-new-relic avatar pranav-new-relic commented on July 28, 2024

Hi @nandoin, TL;DR you're seeing this issue because you're on an older version of the Hashicorp AWS Terraform Provider (<v5).

I was able to reproduce the issue when I used v4.67.0 (which is the last release in v4) of the AWS Provider in terraform init, but not with any version succeeding v5 of the AWS Provider.

This is because the AWS Terraform Provider had a change introduced with v5 in the resource aws_kinesis_firehose_delivery_stream, as a result of which the attribute s3_configuration, which was earlier an argument of this resource was made a nested argument - compare this example (old version, new version) for a better idea. In light of this change, to keep our AWS integrations module up to date with the latest version of the AWS Provider, we had updated code in an older PR (#2380) to make s3_configuration a nested attribute, and since you're on an older version of the AWS Terraform Provider, there is a mismatch in configuration.

The solution would be to use v5 and above of the AWS Terraform Provider.

terraform validate results with v4.67.0 of the AWS Terraform Provider

user@~ Git-2512 % terraform init -upgrade

Initializing the backend...
Upgrading modules...
Downloading git::https://github.com/newrelic/terraform-provider-newrelic.git for newrelic-aws-cloud-integrations...
- newrelic-aws-cloud-integrations in .terraform/modules/newrelic-aws-cloud-integrations/examples/modules/cloud-integrations/aws

Initializing provider plugins...
- Finding hashicorp/aws versions matching "4.67.0"...
- Finding latest version of newrelic/newrelic...
- Finding latest version of hashicorp/random...
- Installing hashicorp/aws v4.67.0...
- Installed hashicorp/aws v4.67.0 (signed by HashiCorp)
- Using previously-installed newrelic/newrelic v3.27.7
- Using previously-installed hashicorp/random v3.5.1

Terraform has made some changes to the provider dependency selections recorded
in the .terraform.lock.hcl file. Review those changes and commit them to your
version control system if they represent changes you intended to make.

Terraform has been successfully initialized!
..
..

user@~ Git-2512 % terraform validate     
╷
│ Error: Unsupported block type
│ 
│   on .terraform/modules/newrelic-aws-cloud-integrations/examples/modules/cloud-integrations/aws/main.tf line 135, in resource "aws_kinesis_firehose_delivery_stream" "newrelic_firehose_stream":
│  135:     s3_configuration {
│ 
│ Blocks of type "s3_configuration" are not expected here.
╵

terraform validate results with v5+ of the AWS Terraform Provider

user@~ Git-2512 % terraform init -upgrade

Initializing the backend...
Upgrading modules...
Downloading git::https://github.com/newrelic/terraform-provider-newrelic.git for newrelic-aws-cloud-integrations...
- newrelic-aws-cloud-integrations in .terraform/modules/newrelic-aws-cloud-integrations/examples/modules/cloud-integrations/aws

Initializing provider plugins...
- Finding latest version of hashicorp/aws...
- Finding latest version of newrelic/newrelic...
- Finding latest version of hashicorp/random...
- Using previously-installed newrelic/newrelic v3.27.7
- Using previously-installed hashicorp/random v3.5.1
- Installing hashicorp/aws v5.26.0...
- Installed hashicorp/aws v5.26.0 (signed by HashiCorp)

Terraform has made some changes to the provider dependency selections recorded
in the .terraform.lock.hcl file. Review those changes and commit them to your
version control system if they represent changes you intended to make.

Terraform has been successfully initialized!
..
..

user@~ Git-2512 % terraform validate
Success! The configuration is valid.

from terraform-provider-newrelic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.