Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Quickstart not working #8

Closed
Closed

Description

@backnight

Hello,

I just wanted to try the "Quickstart" but got the following errors when running "terraform apply" command:

Error applying plan:

7 error(s) occurred:

  • aws_subnet.internal.1: Error creating subnet: InvalidParameterValue: Value (us-west-2b) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1d, us-east-1e.
    status code: 400, request id: 18263fde-a8ef-4696-a08a-f0f4c7a76856
  • aws_subnet.internal.2: Error creating subnet: InvalidParameterValue: Value (us-west-2c) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1d, us-east-1e.
    status code: 400, request id: 30d9c3c5-ab70-4607-ac53-727e89b99d95
  • aws_subnet.internal.0: Error creating subnet: InvalidParameterValue: Value (us-west-2a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1d, us-east-1e.
    status code: 400, request id: eabdf1f0-0e82-410e-843c-cf61968af01e
  • aws_subnet.external.1: Error creating subnet: InvalidParameterValue: Value (us-west-2b) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1d, us-east-1e.
    status code: 400, request id: 692192b3-822b-4149-9294-ac710b353586
  • aws_subnet.external.2: Error creating subnet: InvalidParameterValue: Value (us-west-2c) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1d, us-east-1e.
    status code: 400, request id: 38847188-311a-4edb-9c76-3a2782087f6f
  • aws_subnet.external.0: Error creating subnet: InvalidParameterValue: Value (us-west-2a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1d, us-east-1e.
    status code: 400, request id: 3885f22e-823d-4d51-aa7b-1884feaf3dcd
  • aws_launch_configuration.main: InvalidAMIID.NotFound: The image id '[ami-f3985d93]' does not exist
    status code: 400, request id: dc5aebf9-3abd-4232-a45d-71f75a3f5654

Thanks.

Activity

  1. calvinfo commented on Jun 17, 2016

    @calvinfo
    Contributor

    Ah, @backnight by default we boot all of the instances in us-west-2. If you want to use a different region, you'll have to pass in your own availability zones for it:

    module "stack-east" {
      source      = "github.com/segmentio/stack"
      name        = "stack-east"
      environment = "prod-east"
      key_name    = "bastion-ssh"
      region      = "us-east-1"
      availability_zones = "us-east-1a,us-east-1b,us-east1-c"
    }
    
  2. calvinfo commented on Jun 17, 2016

    @calvinfo
    Contributor

    As far as the image not being found, cc @achille-roussel can you double check the public settings?

  3. achille-roussel commented on Jun 17, 2016

    @achille-roussel
    Contributor

    AMIs are local to the region as well. I'll copy them to other regions.

  4. achille-roussel commented on Jun 19, 2016

    @achille-roussel
    Contributor

    We've copied the AMIs to all EC2 regions, they will be selected automatically by default if you change the region.

    For the availability zones (and by extension the subnets) you should specify them manually, it's the best we can do for now. I tried to give a shot at having terraform dynamically select the right AZ and generate the subnets accordingly but it doesn't work, the subnet resources are generated dynamically via the count property and terraform needs to know how many it has to create or the plan fails (no dynamically computed value can be given to the count property unfortunately).

    If you know of a better way feel free to let me know and I'll give it a shot.

    See these PR for reference:

  5. backnight commented on Jun 21, 2016

    @backnight
    ContributorAuthor

    Thanks guys for the reactivity.

    Just wanted to add a little information about @calvinfo first comment:

    availability_zones = "us-east-1a,us-east-1b,us-east1-c"

    There is a mistyping, the AZ us-east1-c doesn't exist, there are : us-east-1d and us-east-1e BUT NO us-east1-c (for those who will copy past it).

    Have a nice day!

  6. calvinfo commented on Jun 21, 2016

    @calvinfo
    Contributor

    Whoops, my mistake. Thanks for the feedback @backnight, I'll close this for now :)

  7. adambarthelson commented on Oct 6, 2016

    @adambarthelson

    Is somebody updating the AMIs? Did a terraform apply earlier today no problems. Tried it again just now in us-east-1 to be greeted with:

    aws_launch_configuration.main: InvalidAMIID.NotFound: The image id '[ami-f3985d93]' does not exist; status code: 400, request id: 68e2242a-c53d-4380-9274-16f3bca2deaf
    
  8. achille-roussel commented on Oct 6, 2016

    @achille-roussel
    Contributor

    The AMIs were not changed to the best of my knowledge, however this AMI seems to be available for us-west-2, in us-east-1 the AMI id is ami-5f3ff932, not sure why the modules haven't selected the right AMI here :/

    Was it working in a different region?

  9. achille-roussel commented on Oct 6, 2016

    @achille-roussel
    Contributor

    Also can you confirm you're using the up-to-date master branch?

  10. adambarthelson commented on Oct 10, 2016

    @adambarthelson

    I reverted to Terraform v0.6.16, as I believe one of my other issues stemmed from 0.7. I am now currently trying to do a terraform get of the master branch, and am receiving the error

    Error loading Terraform: Error downloading modules: module vpc: Error loading .terraform/modules/<long id>/main.tf: Variable 'external_subnets' must be of type string or map - 'list' is not a valid type
    
  11. adambarthelson commented on Oct 10, 2016

    @adambarthelson

    This is fixed by specifying source = "github.com/segmentio/stack?ref=0.1" in the stack module:

  12. adambarthelson commented on Oct 10, 2016

    @adambarthelson

    Terraform v0.6.16
    Stack v0.1

    Here's my current base stack setup for us-east-1:

    provider "aws" {
      region = "us-east-1"
    }
    
    module "stack" {
      source      = "github.com/segmentio/stack?ref=0.1"
      name        = "clientname"
      environment = "demo"
      key_name    = "bastion-ssh"
      availability_zones = "us-east-1d,us-east-1a,us-east-1b"
    }
    

    It's currently failing due to it finding the correct AMI when trying to setup the bastion server.

    I noticed the region is set incorrectly when running terraform plan:

    + module.stack.ecs_cluster.template_file.cloud_config
        rendered:              "" => "<computed>"
        template:              "" => "#cloud-config\nbootcmd:\n  - echo 'SERVER_ENVIRONMENT=${environment}' >> /etc/environment\n  - echo 'SERVER_GROUP=${name}' >> /etc/environment\n  - echo 'SERVER_REGION=${region}' >> /etc/environment\n\n  - mkdir -p /etc/ecs\n  - echo 'ECS_ENGINE_AUTH_TYPE=${docker_auth_type}' >> /etc/ecs/ecs.config\n  - echo 'ECS_ENGINE_AUTH_DATA=${docker_auth_data}' >> /etc/ecs/ecs.config\n"
        vars.#:                "" => "5"
        vars.docker_auth_data: "" => ""
        vars.docker_auth_type: "" => ""
        vars.environment:      "" => "demo"
        vars.name:             "" => "default"
        vars.region:           "" => "us-west-2" <--- Incorrect
    

    It's also causing the incorrect AMI to be specified for ECS cluster and bastion servers.

  13. yields commented on Oct 11, 2016

    @yields
    Contributor

    @adambarthelson Just by looking at the stack config, i think you're missing the region:

    module "stack" {
      source      = "github.com/segmentio/stack?ref=0.1"
      name        = "clientname"
      environment = "demo"
      key_name    = "bastion-ssh"
      availability_zones = "us-east-1d,us-east-1a,us-east-1b"
      region = "us-east-1" // <- Missing from your config?
    }

    If you're just getting started, i suggest you use the latest terraform, lots of fixes and new features!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions