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

Cannot find module 'aws-sdk' #173

Open
jwatson3d opened this issue Apr 19, 2021 · 0 comments
Open

Cannot find module 'aws-sdk' #173

jwatson3d opened this issue Apr 19, 2021 · 0 comments

Comments

@jwatson3d
Copy link

Describe the Bug

Following the Terraform module for AWS Landing Zone (one component: AWS Organization).

To Reproduce

main.tf contains the following:

module "landing_zone" {
  source  = "MitocGroup/landing-zone/aws"
  version = "0.2.4"

  landing_zone_providers = {
    default = {
      account_id = var.account_id
      region     = var.region
    }
  }
  landing_zone_components = {
    landing_zone_organization = "s3://terraform-aws-landing-zone/components/landing_zone_organization/default.tfvars"
  }


  terraform_backend = {
    backend = "s3"
    bucket  = "tf-remote-state"
    key     = "landing_zone/terraform.tfstate"
    region  = "us-east-1"
    encrypt = true
    kms_key_id = "**************" 
  }
}

Executed terraform plan -out tfplan.out then terrform apply tfplan.out

Expected Behavior

An AWS Organization is created.

Screenshots

Desktop

  • Device: MacBook Pro (Intel)
  • OS: Big Sur 11.2.3
  • Browser n/a
  • Version [e.g. 22]

Additional context

My next step was to try installing globally with: npm -i -g aws-sdk with same result.

I noticed this npm warning: npm WARN saveError ENOENT: no such file or directory, open '/Users/john/package.json' so I tried the following:

cp .terraform/modules/landing_zone/package.json ~/

to place the package.json into my $HOME directory and finally the apply worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant