Hello terraform group,
I am using terraform for a while now and experiencing a problem by
trying to create an aws_route53_resolver_endpoint resource. Maybe
someone can explain to me what this means? I never had this for other
resources. For details see below. I am using the latest AWS provider
version 2.11.
And is there a way to use terraform to create this resource? Or do I
have to set this up manually and import it?
When doing a terraform apply I get the following message on the console:
=====================================================
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
aws_route53_resolver_endpoint.outbound_XXX: Creating...
arn: "" => "<computed>"
direction: "" => "OUTBOUND"
host_vpc_id: "" => "<computed>"
ip_address.#: "" => "2"
ip_address.3535719968.ip: "" => "10.AAA.BBB.250>"
ip_address.3535719968.ip_id: "" => "<computed>"
ip_address.3535719968.subnet_id: "" => "subnet-xxxxxxxxxxxxxxxxx"
ip_address.
4035092634.ip: "" => "10.AAA.CCC.250"
ip_address.
4035092634.ip_id: "" => "<computed>"
ip_address.
4035092634.subnet_id: "" => "subnet-yyyyyyyyyyyyyyyyy"
name: "" => "outbound_XXX"
security_group_ids.#: "" => "1"
security_group_ids.657611388: "" => "sg-zzzzzzzzzzzzzzzzzzz"
tags.%: "" => "5"
tags.Name: "" => "outbound DNS endpoint XX <-> YY"
tags.VPC: "" => "eu-central-1-mgmt"
tags.region: "" => "eu-central-1"
tags.system_stage: "" => "mgmt"
tags.terraform: "" => "true"
Error: Error applying plan:
1 error(s) occurred:
* aws_route53_resolver_endpoint.outbound_aws_cronon: 1 error(s) occurred:
* aws_route53_resolver_endpoint.outbound_aws_cronon: error creating
Route53 Resolver endpoint: InternalServiceErrorException:
[RSLVR-00201] Internal Service Error, please retry your request. Trace
ID: "AAAAAAAAAAAAAAAAAAAAAAAAA"
status code: 400, request id: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
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.
=====================================================
My corresponding code for this is:
=====================================================
resource "aws_route53_resolver_endpoint" "outbound_XXX" {
name = "outbound_XXX"
direction = "OUTBOUND"
security_group_ids = [
"${
aws_security_group.outbound_security_group.id}",
]
ip_address {
subnet_id = "${element(module.vpc.private_subnets, 0)}"
}
ip_address {
subnet_id = "${element(module.vpc.private_subnets, 1)}"
}
tags {
Name = "outbound DNS endpoint XX <-> YY"
terraform = "true"
system_stage = "${var.system_stage}"
region = "${var.region}"
VPC = "${var.vpc_name}"
}
}
=====================================================