Comments (5)
I've got a draft PR in my fork that I worked on yesterday that works for my needs. I'll find some time to clean it up and submit a PR here.
It allows me to have a project looking like this -- essentially adding support for the virtual_network_route
block:
resource "pritunl_server" "test" {
name="terraform_test"
groups = []
# todo = convert this to a data resource lookup
organization_ids = [
"[REDACTED]"
]
host_ids = [for host in local.host_names:
data.pritunl_host.host[host].id
]
network = "172.20.68.0/24"
port = 20068
cipher = "aes256"
dns_servers = [
"10.20.0.2",
"9.9.9.9",
]
# This block is new, allowing me to ensure the server's network is updated in our VPC to
# always point to the active pritunl host for this server.
virtual_network_route {
cloud_advertise = true
}
route {
network = "10.20.0.2/32"
nat = false
}
}
from terraform-provider-pritunl.
On challenge I ran into when testing my changes on our existing infrastructure via terraform import, is that pritunl used to use the vpc_id field to mark whether a route was marked as cloud_advertise. So I've got a few routes in that situation where advertise is not set for vpc_id is.
I tried to account for that in this change here -- dlethin@bc81442#diff-3f3aaab5413458017dfa169b2579db2467bc64be78ba8f86a84872472e6c1e32R618
But I don't know if its great to have the provider try to manage changes like this. Maybe the expectation might be that the user cleans up there installation prior to trying to use this plugin?
Cuirious if anyone has thoughts on this?
from terraform-provider-pritunl.
I had another discussion with pritunl developer and it seems that when terraform provider wants to update a route to turn cloud_advertise off, we only need to set advertise to false, and the server will handle setting unsetting vpc_id.
That makes this problem easier. The only thing we need to do is marke cloud_advertise as true if either advertise is set or vpc_id is not empty.
from terraform-provider-pritunl.
Hey @dlethin, why did you close your draft PR with cloud_advertise feature?
Have you faced with some issues with it?
Have this PR solved your issue?
dlethin#1
from terraform-provider-pritunl.
Hi there -- Quite frankly, I don't remember why I had closed it back then -- I'm not a native golang developer and wasn't really reaching critical momentum getting this to work I was doing this in my spare time but other priorities arose and I completely stopped working on this. It's been so long I've forgotten all the context behind this, but if you are actively working on this I can try to offer some help in this area.
from terraform-provider-pritunl.
Related Issues (16)
- Server routes order HOT 20
- Settings resource HOT 4
- intermittent test failures HOT 1
- dynamic inventory: querying multiple pritunl hosts by criteria HOT 1
- Organizations are not imported by importing their server and being in the code. HOT 5
- Create data_source for pritunl_user
- Multiple applying of changes
- Any plans to support links? HOT 1
- Missing session_timeout on sever config HOT 1
- any plans for host related resources? HOT 9
- Route not supporting NET GATEWAY HOT 4
- Groups with spaces are not saved to terraform state HOT 1
- Refreshing state problem HOT 4
- validation needed for fields requiring CIDR
- warnings in terraform log file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-pritunl.