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

Time:03-03

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"
  }
}

CodePudding user response:

I think you are looking for this:

cname_prefix = "prefix.you.want"
  • Related