sander0542 / terraform-provider-nginxproxymanager Goto Github PK
View Code? Open in Web Editor NEWTerraform Provider for Nginx Proxy Manager
Home Page: https://registry.terraform.io/providers/Sander0542/nginxproxymanager
License: MIT License
Terraform Provider for Nginx Proxy Manager
Home Page: https://registry.terraform.io/providers/Sander0542/nginxproxymanager
License: MIT License
Hi, now your provider can add proxy host with certificate?
Nice provider. It looks like it will be really useful for homelab automation.
Ran into an error when trying to dump a list of the proxy hosts I created in the UI with the following code:
data "nginxproxymanager_proxy_hosts" "all" {}
output "proxy_hosts" {
value = data.nginxproxymanager_proxy_hosts.all.proxy_hosts
}
Returns the following error when executing terraform plan
data.nginxproxymanager_proxy_hosts.all: Reading...
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Value Conversion Error
│
│ with data.nginxproxymanager_proxy_hosts.all,
│ on main.tf line 19, in data "nginxproxymanager_proxy_hosts" "all":
│ 19: data "nginxproxymanager_proxy_hosts" "all" {}
│
│ An unexpected error was encountered trying to convert from struct into an object. This is always an error
│ in the provider. Please report the following to the provider developer:
│
│ Mismatch between struct and object type: Struct defines fields not found in object: location. Object
│ defines fields not found in struct: locations.
│ Struct: models.ProxyHost
│ Object type: types.ObjectType["access_list_id":basetypes.Int64Type, "advanced_config":basetypes.StringType,
│ "allow_websocket_upgrade":basetypes.BoolType, "block_exploits":basetypes.BoolType,
│ "caching_enabled":basetypes.BoolType, "certificate_id":basetypes.StringType,
│ "created_on":basetypes.StringType, "domain_names":types.ListType[basetypes.StringType],
│ "enabled":basetypes.BoolType, "forward_host":basetypes.StringType, "forward_port":basetypes.Int64Type,
│ "forward_scheme":basetypes.StringType, "hsts_enabled":basetypes.BoolType,
│ "hsts_subdomains":basetypes.BoolType, "http2_support":basetypes.BoolType, "id":basetypes.Int64Type,
│ "locations":types.ListType[types.ObjectType["advanced_config":basetypes.StringType,
│ "forward_host":basetypes.StringType, "forward_port":basetypes.Int64Type,
│ "forward_scheme":basetypes.StringType, "path":basetypes.StringType]],
│ "meta":types.MapType[basetypes.StringType], "modified_on":basetypes.StringType,
│ "owner_user_id":basetypes.Int64Type, "ssl_forced":basetypes.BoolType]
╵
First, thank you very much for this amazing work, I appreciate it a lot.
I have dns_challenge on all my hosts, this setting is read-only and I can't configure it before the first plan/apply, ok, no problem I will do that after, manually, so... next, in each plan/apply, this "meta" data is deleted.
This is the output when I try to plan each change, making this provider unusable when you have dns_challenge configured:
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# nginxproxymanager_proxy_host.fog will be updated in-place
~ resource "nginxproxymanager_proxy_host" "fog" {
~ forward_host = "xxx.xxx.xxx.114" -> "xxx.xxx.xxx.14"
id = 56
~ meta = {
- "dns_challenge" = "true"
- "dns_provider" = "\"route53\""
- "dns_provider_credentials" = "\"[default]\\r\\naws_access_key_id=*****redacted******\\r\\naws_secret_access_key=**********redacted**********\""
- "letsencrypt_agree" = "true"
- "letsencrypt_email" = "\"*****redacted*****@**********.com\""
- "nginx_err" = "null"
- "nginx_online" = "true"
} -> (known after apply)
~ modified_on = "2024-02-29T17:07:43.000Z" -> (known after apply)
# (15 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Obviously, when I try to configure it, I can't, the output is: "Cannot set value for this attribute as the provider has marked it as read-only. Remove the configuration line setting the value."
The question is, is there a way to tell to the provider do not touch this data, or is it really not read-only?
Please, if this a well known fact and there is no way to solve it, it'll a good idea to put a brief note advertising this behavior.
Thanks in advance.
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.