GithubHelp home page GithubHelp logo

Comments (3)

emanuele-scarsella avatar emanuele-scarsella commented on May 28, 2024 2

same issue here.

Informations

enviroment:

Pop!_OS 22.04 LTS x86_64
linux kernel v 6.6.6-76060606-generic

terraform:

$ terraform --version
Terraform v1.7.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.32.1

provider:

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

command:

terraformer import aws --resources="*" --regions=eu-central-1

full output:

2024/01/24 13:08:31 aws importing region eu-central-1
2024/01/24 13:08:31 Attempting an import of ALL resources in aws
2024/01/24 13:08:32 aws importing... accessanalyzer
2024/01/24 13:08:32 aws error initializing resources in service accessanalyzer, err: operation error AccessAnalyzer: ListAnalyzers, failed to resolve service endpoint, an AWS region is required, but was not found
2024/01/24 13:08:32 aws importing... acm
2024/01/24 13:08:32 aws done importing acm
2024/01/24 13:08:32 aws importing... alb
2024/01/24 13:08:32 aws done importing alb
2024/01/24 13:08:32 aws importing... api_gateway
2024/01/24 13:08:33 aws done importing api_gateway
2024/01/24 13:08:33 aws importing... appsync
2024/01/24 13:08:33 aws done importing appsync
2024/01/24 13:08:33 aws importing... auto_scaling
2024/01/24 13:08:34 aws done importing auto_scaling
2024/01/24 13:08:34 aws importing... batch
2024/01/24 13:08:34 aws done importing batch
2024/01/24 13:08:34 aws importing... budgets
2024/01/24 13:08:35 aws done importing budgets
2024/01/24 13:08:35 aws importing... cloud9
2024/01/24 13:08:35 aws done importing cloud9
2024/01/24 13:08:35 aws importing... cloudformation
2024/01/24 13:08:35 aws done importing cloudformation
2024/01/24 13:08:35 aws importing... cloudfront
2024/01/24 13:08:36 aws done importing cloudfront
2024/01/24 13:08:36 aws importing... cloudhsm
2024/01/24 13:08:36 aws done importing cloudhsm
2024/01/24 13:08:36 aws importing... cloudtrail
2024/01/24 13:08:37 aws done importing cloudtrail
2024/01/24 13:08:37 aws importing... cloudwatch
2024/01/24 13:08:38 aws done importing cloudwatch
2024/01/24 13:08:38 aws importing... codebuild
2024/01/24 13:08:38 aws done importing codebuild
2024/01/24 13:08:38 aws importing... codecommit
2024/01/24 13:08:38 aws done importing codecommit
2024/01/24 13:08:38 aws importing... codedeploy
2024/01/24 13:08:38 aws done importing codedeploy
2024/01/24 13:08:38 aws importing... codepipeline
2024/01/24 13:08:39 aws done importing codepipeline
2024/01/24 13:08:39 aws importing... cognito
2024/01/24 13:08:39 aws done importing cognito
2024/01/24 13:08:39 aws importing... config
2024/01/24 13:08:39 aws done importing config
2024/01/24 13:08:39 aws importing... customer_gateway
2024/01/24 13:08:40 aws done importing customer_gateway
2024/01/24 13:08:40 aws importing... datapipeline
2024/01/24 13:08:41 aws done importing datapipeline
2024/01/24 13:08:41 aws importing... devicefarm
2024/01/24 13:08:46 aws done importing devicefarm
2024/01/24 13:08:46 aws importing... docdb
2024/01/24 13:08:46 aws done importing docdb
2024/01/24 13:08:46 aws importing... dynamodb
2024/01/24 13:08:46 aws done importing dynamodb
2024/01/24 13:08:46 aws importing... ebs
2024/01/24 13:08:46 aws done importing ebs
2024/01/24 13:08:46 aws importing... ec2_instance
2024/01/24 13:08:47 aws done importing ec2_instance
2024/01/24 13:08:47 aws importing... ecr
2024/01/24 13:08:47 aws done importing ecr
2024/01/24 13:08:47 aws importing... ecrpublic
2024/01/24 13:08:48 aws done importing ecrpublic
2024/01/24 13:08:48 aws importing... ecs
2024/01/24 13:08:48 aws done importing ecs
2024/01/24 13:08:48 aws importing... efs
2024/01/24 13:08:48 aws done importing efs
2024/01/24 13:08:48 aws importing... eip
2024/01/24 13:08:49 aws done importing eip
2024/01/24 13:08:49 aws importing... eks
2024/01/24 13:08:49 aws done importing eks
2024/01/24 13:08:49 aws importing... elastic_beanstalk
2024/01/24 13:08:49 aws done importing elastic_beanstalk
2024/01/24 13:08:49 aws importing... elasticache
2024/01/24 13:08:50 aws done importing elasticache
2024/01/24 13:08:50 aws importing... elb
2024/01/24 13:08:50 aws done importing elb
2024/01/24 13:08:50 aws importing... emr
2024/01/24 13:08:50 aws done importing emr
2024/01/24 13:08:50 aws importing... eni
2024/01/24 13:08:50 aws done importing eni
2024/01/24 13:08:50 aws importing... es
2024/01/24 13:08:51 aws done importing es
2024/01/24 13:08:51 aws importing... firehose
2024/01/24 13:08:51 aws done importing firehose
2024/01/24 13:08:51 aws importing... glue
2024/01/24 13:08:51 aws done importing glue
2024/01/24 13:08:51 aws importing... iam
2024/01/24 13:08:58 aws done importing iam
2024/01/24 13:08:58 aws importing... identitystore
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*IdentityStoreGenerator).GetIdentityStoreId(0xc00619b0d0?)
        /Users/sergey/temp/terraformer/providers/aws/identitystore.go:44 +0x1ce
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*IdentityStoreGenerator).InitResources(0x0?)
        /Users/sergey/temp/terraformer/providers/aws/identitystore.go:169 +0x25
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*AwsFacade).InitResources(0xc00230f720?)
        /Users/sergey/temp/terraformer/providers/aws/aws_facade.go:61 +0x26
github.com/GoogleCloudPlatform/terraformer/cmd.initServiceResources({_, _}, {_, _}, {{0xc000d8b800, 0x56, 0x80}, {0x12999268, 0x0, 0x0}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/import.go:209 +0x21e
github.com/GoogleCloudPlatform/terraformer/cmd.initAllServicesResources(_, {{0xc000d8b800, 0x56, 0x80}, {0x12999268, 0x0, 0x0}, {0xb20575b, 0x1e}, {0xb15cdd8, ...}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/import.go:166 +0x1c5
github.com/GoogleCloudPlatform/terraformer/cmd.Import({_, _}, {{0xc000d8b800, 0x56, 0x80}, {0x12999268, 0x0, 0x0}, {0xb20575b, 0x1e}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/import.go:98 +0x2a5
github.com/GoogleCloudPlatform/terraformer/cmd.importRegionResources({{0xc000598e60, 0x1, 0x1}, {0x12999268, 0x0, 0x0}, {0xb20575b, 0x1e}, {0xb15cdd8, 0x9}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/provider_cmd_aws.go:121 +0x292
github.com/GoogleCloudPlatform/terraformer/cmd.newCmdAwsImporter.func1(0xc000dcc580?, {0xb14e4f4?, 0x2?, 0x2?})
        /Users/sergey/temp/terraformer/cmd/provider_cmd_aws.go:58 +0xa0e
github.com/spf13/cobra.(*Command).execute(0xc000dcc580, {0xc000aae9a0, 0x2, 0x2})
        /Users/sergey/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000cff340)
        /Users/sergey/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x39d
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/sergey/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/GoogleCloudPlatform/terraformer/cmd.Execute()
        /Users/sergey/temp/terraformer/cmd/root.go:36 +0x1e
main.main()
        /Users/sergey/temp/terraformer/main.go:39 +0x50

Temporary workaround

Since the problem seams to only affect identitystore the problem can be avoided adding
--excludes="identitystore" like below. (of course "identitystore" resources will not be considered)

terraformer [command] [provider] [flags] --excludes="identitystore"

from terraformer.

Asgaros avatar Asgaros commented on May 28, 2024

Same issue here. Not sure if it is relevant, but I am using version 5.33.0 of the AWS provider for Windows (AMD64).

Used command:
terraformer plan aws --output hcl --resources="*" --verbose

from terraformer.

matsui-p avatar matsui-p commented on May 28, 2024

getting the same error with the following combination under linux

# terraform --version
Terraform v1.7.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.38.0
# terraformer --version
version v0.8.24

from terraformer.

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.