Code Monkey home page Code Monkey logo

terraform-provider-dns-he-net's People

Contributors

cypheon avatar dependabot[bot] avatar superbuker avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cypheon

terraform-provider-dns-he-net's Issues

Plan fails when using for_each and each.value.IPAddress for data

I'm trying to create multiple a-records. I populate an array with values:

locals {
  he_net_test = {
    "test1" = {
      Hostname   = "test1"
      Domainname = "subdomain.domain.tld
      IPAddress  = "192.168.88.35"
    }
    "test2" = {
      Hostname   = "test2"
      Domainname = "subdomain.domain.tld"
      IPAddress  = "192.168.88.36"
    }
  }
}

I then apply those values to a resource:

resource "dns-he-net_a" "containers" {
  for_each = local.he_net_test
  zone_id  = 123456
  domain   = format("%s.%s", each.value.Hostname, each.value.Domainname)
  ttl      = 86400
  data     = each.value.IPAddress
}

But this fails with:

| Error: Invalid A record configuration
│
│   with dns-he-net_a.containers,
│   on dns.tf line 37, in resource "dns-he-net_a" "containers":
│   37: resource "dns-he-net_a" "containers" {
│
│ Static A records must have Data configured.

This passes plan, though:

resource "dns-he-net_a" "containers" {
  for_each = local.he_net_test
  zone_id  = 123456
  domain   = format("%s.%s", each.value.Hostname, each.value.Domainname)
  ttl      = 86400
  data     = "192.168.1.2"
}

(but will configure the wrong IP address)

Client side record validation

Is your feature request related to a problem? Please describe.
User can't validate on the client the record fields values.

Only once the client makes a request to the server the validation is performed, this can abort the in progress deployment.

Describe the solution you'd like
Introduce validation on the client side, for each record type.

Additionally, it would be nice to hace a server side dry-run mode, but this depends on he.net.

Describe alternatives you've considered
Keep it as it is and cross your fingers.

Add custom logger support in client

Is your feature request related to a problem? Please describe.
The api client currently isn't currently using the a terraform logger

Describe the solution you'd like
Add the option to add a custom logger.

Describe alternatives you've considered
Integrating the terraform logger, but it this really needs to be properly decoupled.

Additional context
It might be great to log the "status" responses.
<div id="dns_status" onclick="hideThis(this);">Successfully added new record to dns-he-net.ovh</div>

Custom user agent

Is your feature request related to a problem? Please describe.
The current user agent is generic and makes this tool requests difficult to identify in the server logs.

Describe the solution you'd like
Define a custom user agent instead of the current go-resty one.
Additionally, add support to "TF_APPEND_USER_AGENT".

Additional context
The usage of TF_APPEND_USER_AGENT is explained here:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs#custom-user-agent-information
TF code example: https://github.com/hashicorp/terraform/blob/main/internal/httpclient/useragent.go

Missing Terrraform Documentation

TODO:

  • Add go generate for the documentation
  • Add documentation in the provider/resources/datasources
  • Add automatically generated documentation
  • Add examples

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.