amalucelli / terraform-provider-nextdns Goto Github PK
View Code? Open in Web Editor NEWNextDNS Terraform Provider
License: MIT License
NextDNS Terraform Provider
License: MIT License
Re:
Why's that? Create will create it, so removing that resource should then remove it again. This would be the equivalent of create only importing an existing profile, but there's already terraform import
for that; likewise if 'delete from state only' is what someone wants, there's terraform state rm
for that.
When writing an example like this:
resource "nextdns_rewrite" "test" {
profile_id = nextdns_profile.i.id
rewrite {
domain = "test.example.com"
address = "1.1.1.1"
}
}
resource "nextdns_rewrite" "test2" {
profile_id = nextdns_profile.i.id
rewrite {
domain = "test2.example.com"
address = "8.8.8.8"
}
}
The first plan / apply works, on a subsequent plan / apply both try and overwrite each other:
# module.nextdns.nextdns_rewrite.test will be updated in-place
~ resource "nextdns_rewrite" "test" {
id = "<snipped>"
# (1 unchanged attribute hidden)
- rewrite {
- address = "8.8.8.8" -> null
- domain = "test2.example.com" -> null
}
# (1 unchanged block hidden)
}
# module.nextdns.nextdns_rewrite.test2 will be updated in-place
~ resource "nextdns_rewrite" "test2" {
id = "<snipped>"
# (1 unchanged attribute hidden)
- rewrite {
- address = "1.1.1.1" -> null
- domain = "test.example.com" -> null
}
# (1 unchanged block hidden)
}
I imagine this might be difficult if the API just returns a list of rewrites instead of each rewrite being its own object, is this something that can be fixed/mitigated in the provider or should we use a lifecycle
block to ignore the extra values?
Today is required for the user to build and install the provider locally before consuming the resources it exposes. It's possible to improve this flow by pushing the module to the Terraform Registry by following this guide.
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.