itd27m01 / oci-route-table-updater Goto Github PK
View Code? Open in Web Editor NEWRoute table updater for Oracle Cloud Infrastructure
License: MIT License
Route table updater for Oracle Cloud Infrastructure
License: MIT License
Hi!
After attempting to use ortu module, I'm consistently getting the following error:
[opc@dalquintdevhub lpg_config]$ terraform apply --var-file=myvars.tfvars
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# null_resource.from_route_table_update will be created
+ resource "null_resource" "from_route_table_update" {
+ id = (known after apply)
+ triggers = {
+ "from_lpg" = "ocid1.localpeeringgateway.oc1.sa-santiago-1.aaaaaaaavp6pw6kadngkswzinshv7hy223rxc45vwkkd4zeuiuqwqyo5w62q"
}
}
# null_resource.to_route_table_update will be created
+ resource "null_resource" "to_route_table_update" {
+ id = (known after apply)
+ triggers = {
+ "to_lpg" = "ocid1.localpeeringgateway.oc1.sa-santiago-1.aaaaaaaaxeaw7qvnzckopr7ai6fa2r23rnnvotjzcrjepp6ur76i2jtad4ra"
}
}
Plan: 2 to add, 0 to change, 0 to destroy.
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
After hitting yes, I get this:
null_resource.to_route_table_update: Creating...
null_resource.from_route_table_update: Creating...
null_resource.from_route_table_update: Provisioning with 'local-exec'...
null_resource.from_route_table_update (local-exec): Executing: ["/bin/sh" "-c" "ortu --rt-ocid ocid1.routetable.oc1.sa-santiago-1.aaaaaaaagjzhbjjipaehopoeozzhwo33n4pjhuokdj7qozf4japda7o2vmna --cidr ocid1.vcn.oc1.sa-santiago-1.amaaaaaatwfhi7ya2csaeycdh2vsxhuu2eyerufdnz6ydltkejyqpc6nqi5a --ne-ocid ocid1.localpeeringgateway.oc1.sa-santiago-1.aaaaaaaavp6pw6kadngkswzinshv7hy223rxc45vwkkd4zeuiuqwqyo5w62q"]
null_resource.to_route_table_update: Provisioning with 'local-exec'...
null_resource.to_route_table_update (local-exec): Executing: ["/bin/sh" "-c" "ortu --rt-ocid ocid1.routetable.oc1.sa-santiago-1.aaaaaaaav7xpvdfbo4j7eeqlgglmqoh5nu4egpls4cbou2idxubuj35353ia --cidr ocid1.vcn.oc1.sa-santiago-1.amaaaaaatwfhi7yasndc5vjypf2pgnfimyb2so756vmaimnozxlfpzu3uzhq --ne-ocid ocid1.localpeeringgateway.oc1.sa-santiago-1.aaaaaaaaxeaw7qvnzckopr7ai6fa2r23rnnvotjzcrjepp6ur76i2jtad4ra"]
null_resource.from_route_table_update (local-exec): Traceback (most recent call last):
null_resource.from_route_table_update (local-exec): File "/home/opc/.local/bin/ortu", line 5, in <module>
null_resource.from_route_table_update (local-exec): from ortu.main import main
null_resource.from_route_table_update (local-exec): ImportError: No module named ortu.main
null_resource.to_route_table_update (local-exec): Traceback (most recent call last):
null_resource.to_route_table_update (local-exec): File "/home/opc/.local/bin/ortu", line 5, in <module>
null_resource.to_route_table_update (local-exec): from ortu.main import main
null_resource.to_route_table_update (local-exec): ImportError: No module named ortu.main
╷
│ Error: local-exec provisioner error
│
│ with null_resource.to_route_table_update,
│ on lpgconfig.tf line 13, in resource "null_resource" "to_route_table_update":
│ 13: provisioner "local-exec" {
│
│ Error running command 'ortu --rt-ocid ocid1.routetable.oc1.sa-santiago-1.aaaaaaaav7xpvdfbo4j7eeqlgglmqoh5nu4egpls4cbou2idxubuj35353ia --cidr
│ ocid1.vcn.oc1.sa-santiago-1.amaaaaaatwfhi7yasndc5vjypf2pgnfimyb2so756vmaimnozxlfpzu3uzhq --ne-ocid ocid1.localpeeringgateway.oc1.sa-santiago-1.aaaaaaaaxeaw7qvnzckopr7ai6fa2r23rnnvotjzcrjepp6ur76i2jtad4ra': exit status
│ 1. Output: Traceback (most recent call last):
│ File "/home/opc/.local/bin/ortu", line 5, in <module>
│ from ortu.main import main
│ ImportError: No module named ortu.main
│
╵
╷
│ Error: local-exec provisioner error
│
│ with null_resource.from_route_table_update,
│ on lpgconfig.tf line 23, in resource "null_resource" "from_route_table_update":
│ 23: provisioner "local-exec" {
│
│ Error running command 'ortu --rt-ocid ocid1.routetable.oc1.sa-santiago-1.aaaaaaaagjzhbjjipaehopoeozzhwo33n4pjhuokdj7qozf4japda7o2vmna --cidr
│ ocid1.vcn.oc1.sa-santiago-1.amaaaaaatwfhi7ya2csaeycdh2vsxhuu2eyerufdnz6ydltkejyqpc6nqi5a --ne-ocid ocid1.localpeeringgateway.oc1.sa-santiago-1.aaaaaaaavp6pw6kadngkswzinshv7hy223rxc45vwkkd4zeuiuqwqyo5w62q': exit status
│ 1. Output: Traceback (most recent call last):
│ File "/home/opc/.local/bin/ortu", line 5, in <module>
│ from ortu.main import main
│ ImportError: No module named ortu.main
I've installed the module as instructed on documentation (pip install ortu)
I see installed module and indeed, I don't see it defined. This is what I get on .local binary:
#!/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from ortu.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
I've also tried with pip3, without good results unfortunately.
If executing ortu by it self, I get the same error as well:
[opc@dalquintdevhub lpg_config]$ ortu
Traceback (most recent call last):
File "/home/opc/.local/bin/ortu", line 5, in <module>
from ortu.main import main
ImportError: No module named ortu.main
Is this something I'm doing wrong?
Thanks!
Hi,
I've been using this package with terraform to create route table rules for routing traffic to DRGs. However, when deleting the rules, it deletes all rules in the route table, even ones it hasn't provisioned itself.
Example:
ortu delete --rt-ocid "ocid1.routetable.oc1.uk-london-1.aaaaaaaaexampleocid" --cidr "24.0.0.0/16" --ne-ocid "ocid1.drg.oc1.uk-london-1.bbbbbbbexampleocid"
Running this command deletes the 24.0.0.0/16
rule as well as a 10.0.0.0/16
rule that has been crated manually.
Running the command with --dry-run --debug
shows the following output:
https://pastebin.com/pVUjtSi6
You can see that it finds the route table containing both rules, but removes both when sending back the updated rules to OCI.
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.