我将如何为 Terraform 上的 AWS Elastic Beanstalk 定义 URL/Domain?
How would I define the URL/Domain for AWS Elastic Beanstalk on Terraform?
基本上,我正在尝试在 Terraform (Green box is what URL/Domain I want to change) 上为我的 EBS 预先设置 domain/url,但我非常不确定我可以在哪里执行此操作,以便我的后端管道可以直接上传到我的基础设施,我的前端仍然可以连接到它,而无需更改两者的任何值。
任何 help/direction 他们可以引导我找到的东西都非常有帮助!
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"
}
}
我想你在找 this:
cname_prefix = "prefix.you.want"
基本上,我正在尝试在 Terraform (Green box is what URL/Domain I want to change) 上为我的 EBS 预先设置 domain/url,但我非常不确定我可以在哪里执行此操作,以便我的后端管道可以直接上传到我的基础设施,我的前端仍然可以连接到它,而无需更改两者的任何值。
任何 help/direction 他们可以引导我找到的东西都非常有帮助!
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"
}
}
我想你在找 this:
cname_prefix = "prefix.you.want"