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

aws_elastic_beanstalk_hosted_zone Unsupported region: eu-north-1 #7763

Closed
Vadim-Zenin opened this issue Feb 28, 2019 · 8 comments · Fixed by #7829
Closed

aws_elastic_beanstalk_hosted_zone Unsupported region: eu-north-1 #7763

Vadim-Zenin opened this issue Feb 28, 2019 · 8 comments · Fixed by #7829
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service.
Milestone

Comments

@Vadim-Zenin
Copy link

Vadim-Zenin commented Feb 28, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

terraform -v Terraform v0.11.11

Affected Resource(s)

  • aws_XXXXX
  • AWS Beanstalk with Application load balancer environment

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

resource "aws_elastic_beanstalk_environment" "default" {
  name                = "${var.website_name}-${var.website_type}-${var.environment}-ebs-env"
  application         = "${aws_elastic_beanstalk_application.website.name}"
  tier                = "${var.tier}"
  solution_stack_name = "${data.aws_elastic_beanstalk_solution_stack.single_docker.name}"
  cname_prefix = "${var.website_name}-${var.website_type}-${var.environment}"
  version_label = "${aws_elastic_beanstalk_application_version.website.name}"
  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name      = "InstanceType"
    value     = "${var.ebs_instance_type}"
  }
  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name      = "IamInstanceProfile"
    value     = "${var.ebs_iam_instance_profile}"
  }
  setting {
    namespace = "aws:autoscaling:asg"
    name      = "MaxSize"
    value     = "1"
  }
  setting {
    name = "EnvironmentType"
    namespace = "aws:elasticbeanstalk:environment"
    value = "LoadBalanced"
  }
  setting {
    name = "LoadBalancerType"
    namespace = "aws:elasticbeanstalk:environment"
    value = "application"
  }
  setting {
    namespace = "aws:elbv2:loadbalancer"
    name      = "SecurityGroups"
    value     = "${module.aws_ssm_parameter_store.ssmp_value}"
  }
  setting {
    namespace = "aws:elbv2:listener:default"
    name      = "ListenerEnabled"
    value     = "true"
  }
  setting {
    namespace = "aws:elbv2:listener:443"
    name      = "ListenerEnabled"
    value     = "true"
  }
  setting {
    namespace = "aws:elbv2:listener:443"
    name      = "Protocol"
    value     = "HTTPS"
  }
  setting {
    namespace = "aws:elbv2:listener:443"
    name      = "SSLCertificateArns"
    value     = "${module.aws_alb_certificate.acm_certificate_arn}"
  }
  setting {
    namespace = "aws:elbv2:listenerrule:default"
    name = "PathPatterns"
    value = "/*"
  }
  ###  Application Load Balancer Health check settings ###
  # The Application Load Balancer health check does not take into account the Elastic Beanstalk health check path
  # http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-applicationloadbalancer.html
  # http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-applicationloadbalancer.html#alb-default-process.config
  setting {
    namespace = "aws:elasticbeanstalk:environment:process:default"
    name      = "HealthCheckPath"
    value     = "${var.ebs_health_check_url}"
  }
  setting {
    namespace = "aws:elasticbeanstalk:environment:process:default"
    name      = "Port"
    value     = "80"
  }
  setting {
    namespace = "aws:elasticbeanstalk:environment:process:default"
    name      = "Protocol"
    value     = "HTTP"
  }
  setting {
    namespace = "aws:elasticbeanstalk:application"
    name      = "Application Healthcheck URL"
    value     = "${var.ebs_health_check_url}"
  }
  setting {
    namespace = "aws:elasticbeanstalk:command"
    name      = "DeploymentPolicy"
    value     = "Rolling"
  }
  setting {
    namespace = "aws:autoscaling:updatepolicy:rollingupdate"
    name      = "RollingUpdateEnabled"
    value     = "true"
  }
  setting {
    namespace = "aws:autoscaling:updatepolicy:rollingupdate"
    name      = "RollingUpdateType"
    value     = "Health"
  }

  tags {
    "website_id" = "${var.website_name}"
    "environment" = "${var.environment}"
    "Terraform-managed" = true
  }
}

data "aws_elastic_beanstalk_hosted_zone" "default" {
  depends_on  = ["aws_elastic_beanstalk_environment.default"]
}

output "ebs_hosted_zone_id" {
  description = "Beanstalk ALB zone id"
  value = "${data.aws_elastic_beanstalk_hosted_zone.default.id}"
}

Debug Output

Panic Output

aws_elastic_beanstalk_environment.default: Still creating... (4m50s elapsed)
aws_elastic_beanstalk_environment.default: Creation complete after 4m59s (ID: e-111111111)
data.aws_elastic_beanstalk_hosted_zone.default: Refreshing state...

Error: Error applying plan:

1 error(s) occurred:

* data.aws_elastic_beanstalk_hosted_zone.default: data.aws_elastic_beanstalk_hosted_zone.default: Unsupported region: eu-north-1

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Expected Behavior

Provide output with Beanstalk's Application load balancer zone ID.

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

It works in different regions (ca-central-1 for example)

References

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. upstream Addresses functionality related to the cloud provider. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. labels Feb 28, 2019
@bflad
Copy link
Contributor

bflad commented Feb 28, 2019

Hi @Vadim-Zenin 👋 Thanks for submitting this. We generate the data source information based on the AWS Regions and Endpoints documentation, which oddly is still missing the value.

Are you aware if there is a correct value and what it might be? Thanks.

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Feb 28, 2019
@Vadim-Zenin
Copy link
Author

Hi @bflad ,
Thank you for answer.
I got answer from AWS supports and documentation teams.
eu-north-1 Route 53 Hosted Zone ID added to page https://docs.aws.amazon.com/en_us/general/latest/gr/rande.html#elasticbeanstalk_region .

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Mar 6, 2019
@Vadim-Zenin
Copy link
Author

The issue exists still:

Error: Error applying plan:
1 error(s) occurred:
* data.aws_elastic_beanstalk_hosted_zone.default: data.aws_elastic_beanstalk_hosted_zone.default: Unsupported region: eu-north-1

@bflad
Copy link
Contributor

bflad commented Mar 6, 2019

@Vadim-Zenin sorry I probably should not have used the word "generate" before; these values are currently hardcoded in the data source. This pull request will update the data source: #7829

@bflad bflad removed the upstream Addresses functionality related to the cloud provider. label Mar 6, 2019
@bflad bflad added this to the v2.1.0 milestone Mar 6, 2019
@bflad
Copy link
Contributor

bflad commented Mar 6, 2019

Support for the new region has been merged in and will release with version 2.1.0 of the Terraform AWS Provider, likely in the next day or two.

@Vadim-Zenin
Copy link
Author

@bflad thank you.

@bflad
Copy link
Contributor

bflad commented Mar 8, 2019

This has been released in version 2.1.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service.
Projects
None yet
2 participants