Automate the entry and updating of routing information

If you wish to delete or return an AS number that is no longer required, please email the APNIC hostmaster with your account name in the subject line.

While it’s not straightforward, it’s possible to get the account ID using the Amazon Resource Names (ARNs).

Since we now have the VPC id of the accepter VPC, we can use it’s ARN to extract the account-id. I am using the aws_vpc data source, and using the arn to extract the account-id.

Tagging is a good practice, especially if you have multiple peering connections and it’ll help during any maintenance or network troubleshooting.

We have a complete blogpost dedicated to tagging practices, and I highly recommend you check it out.

When querying an IP address or range, any associated route object will be returned with the inetnum object.

Use this form to perform regular updates on inetnum objects in the APNIC Whois Database, including updating additional routing attributes: To view or modify an exiting aut-num object, enter the aut-num of interest (for example, AS4777) below.When you do a cross-account peering connection request, you need the 12 digit account ID of the AWS account where the accepter VPC resides.If you’ve noticed, I have not defined this as a variable.I also touched upon some concepts of Terraform like data sources, split local values, and loops.You can find the complete terraform code for the above at our github repository.I have created a loop using count to cycle through all the route tables and create the route entry to the other VPC via the peering connection ID.


  1. As treasurer and comptroller of the Royal Navy Hawkins rebuilt older ships and helped design the faster ships that withstood the Spanish Armada.

  2. I have to send him money from time to time so that he can stay in constant communication with me, but that’s OK because I understand that he cannot have access to his money because he is constantly on the go. Military members can access their money from overseas.

Comments are closed.