Git Product home page Git Product logo

[ERROR] InvalidChangeBatch: An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation: [RRSet with DNS name ........ is not permitted in zone ......] about terraform-aws-asg-dns-handler HOT 4 CLOSED

emiioan avatar emiioan commented on June 23, 2024
[ERROR] InvalidChangeBatch: An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation: [RRSet with DNS name ........ is not permitted in zone ......]

from terraform-aws-asg-dns-handler.

Comments (4)

cmckeen avatar cmckeen commented on June 23, 2024 1

Hi @emiioan, it looks like the problem here is that you're not creating a fully qualified domain name inside of the asg:hostname_pattern tag, which is preventing the Route 53 record from being created. Here is an example of how this would work -

resource "aws_autoscaling_group" "asg" {
...
  tag {
    key                 = "asg:hostname_pattern"
    value               = "#instanceid.${var.vpc_name}.asg-testing.internal@${aws_route53_zone.test.id}"
    propagate_at_launch = true
  }
}

resource "aws_route53_zone" "test" {
  name          = "asg-testing.internal"

  vpc {
    vpc_id = data.terraform_remote_state.vpc.outputs.vpc_id
  }
}

It's worth noting as well that #instanceid is interpolated by the lambda function to the instance_id of the AWS instance that is created. I will update the documentation to make this more clear.

from terraform-aws-asg-dns-handler.

cmckeen avatar cmckeen commented on June 23, 2024 1

Additional documentation added in 498537e.

from terraform-aws-asg-dns-handler.

emiioan avatar emiioan commented on June 23, 2024 1

Hi @cmckeen, thanks a lot for the response, yes indeed it worked after adding the FQDN including the R53 zone name in asg:hostname_pattern value.

from terraform-aws-asg-dns-handler.

cmbengels avatar cmbengels commented on June 23, 2024

I had that error, too. The module mismatches foo.id, foo.name and foo.arn at some places. Check the generated policy, I think you'll find a wrong ARN like arn:aws:route53::: arn:aws:route53:::foo/bar. (When you have fixed that, you'll find the next mistake where the module expects a zone id but the module's description says you need an ARN.
(sorry, I mismatched this with a different error.)

from terraform-aws-asg-dns-handler.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.