Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How would I define the URL/Domain for AWS Elastic Beanstalk on Terraform?

Basically, I’m trying to have a pre-set domain/url for my EBS on Terraform (Green box is what URL/Domain I want to change), but I am very unsure of where I can do this so that my backend pipeline can upload directly to my infrastructure and my frontend can still connect to it without having to change any values on either.

Any help/direction they can lead me to is very helpful!

provider "aws" {
  region = "us-east-1"
}
resource "aws_elastic_beanstalk_application" "beanstalkApplication" {
  name        = "beanstalk-test"
  description = "Development test EBS system"
}
resource  "aws_elastic_beanstalk_environment" "beanstalk-env" {
  name = "beanstalk-env"
  domain = "beanstalk-env"
  application = aws_elastic_beanstalk_application.beanstalkApplication.name
  solution_stack_name = "64bit Amazon Linux 2 v2.2.10 running .NET Core" 
  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name = "IamInstanceProfile"
    value = "aws-elasticbeanstalk-ec2-role"
  }
  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name = "InstanceType"
    value = "t3a.micro"
  }
}

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I think you are looking for this [1]:

cname_prefix = "prefix.you.want"

[1] https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elastic_beanstalk_environment#cname_prefix

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading