I have successfully created a VPC B and now I want to peer VPC B and VPC A.
In VPC B I can add the vpc_peering id in route table, but struggling with
how to update the route table of VPC A with the vpc_peering id.
Tried using below play:
> ---
> - hosts: localhost
> connection: local
> gather_facts: no
> tasks:
> - name: update route table of VPC A
> ec2_vpc_route_table:
> vpc_id: vpc-5becdjn87
> region: us-east-1
> state: present
> propagating_vgw_ids: yes
> tags:
> Name: test-update-rt
> routes:
> - dest: 10.104.0.0/16
> vpc_peering_connection_id: pcx-e67hdo5h
>
But getting error as:
> fatal: [localhost]: FAILED! => {"changed": false, "failed": true,
> "invocation": {"module_name": "ec2_vpc_route_table"}, "module_stderr":
> "Traceback (most recent call last):\n File
> \"/tmp/ansible_dbLJB5/ansible_module_ec2_vpc_route_table.py\", line 611, in
> <module>\n main()\n File
> \"/tmp/ansible_dbLJB5/ansible_module_ec2_vpc_route_table.py\", line 599, in
> main\n result = ensure_route_table_present(connection, module)\n File
> \"/tmp/ansible_dbLJB5/ansible_module_ec2_vpc_route_table.py\", line 530, in
> ensure_route_table_present\n check_mode=module.check_mode)\n File
> \"/tmp/ansible_dbLJB5/ansible_module_ec2_vpc_route_table.py\", line 408, in
> ensure_propagation\n dry_run=check_mode)\n File
> \"/usr/lib/python2.7/dist-packages/boto/vpc/__init__.py\", line 1492, in
> enable_vgw_route_propagation\n return
> self.get_status('EnableVgwRoutePropagation', params)\n File
> \"/usr/lib/python2.7/dist-packages/boto/connection.py\", line 1227, in
> get_status\n raise self.ResponseError(response.status, response.reason,
> body)\nboto.exception.EC2ResponseError: EC2ResponseError: 400 Bad
> Request\n<?xml version=\"1.0\"
> encoding=\"UTF-8\"?>\n<Response><Errors><Error><Code>Gateway.NotAttached</Code><Message>resource
>
> true</Message></Error></Errors><RequestID>16a7e21a-07ca-4fcc-9678-50fdf3a12ee0</RequestID></Response>\n",
>
> "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}
>
Could anyone please help me on this.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8cae6f1d-c42a-49c6-9fcd-90e75a1e13c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.