GithubHelp home page GithubHelp logo

Comments (13)

betaboon avatar betaboon commented on July 28, 2024

according to https://github.com/NixOS/nixops/blob/master/nix/route53-recordset.nix#L84 you can do
recordValues = [ resources.machines.machine_foo ]; (which is how i do it)

but as you asked specifically for the private IPv4:
according to https://github.com/NixOS/nixops/blob/master/nixops/resources/route53_recordset.py#L154
passing in a machine definition leads to usage of the publicIPv4 only and there doesnt seem to be a way to use the privateIPv4.

maybe this option is what you are looking for:
https://nixos.org/nixops/manual/#opt-deployment.route53.usePublicDNSName

you could always do resources.machines.machine_foo.networking.privateIPv4 but i don't know what public opinion says about this.

from nixops-aws.

coretemp avatar coretemp commented on July 28, 2024

@betaboon Your suggestion ("you could always do") fails with The option networking.privateIPv4 is used but not defined..

from nixops-aws.

betaboon avatar betaboon commented on July 28, 2024

@coretemp that should only happen during --build-only etc as it references the privateIPv4 of the deployed machine. Which prior do being created does not exist.
That's the downside of that approach.

from nixops-aws.

coretemp avatar coretemp commented on July 28, 2024

@betaboon Thanks for you reply. As you can see, I am not passing --build-only:

nixops deploy -s localstate.nixops --kill-obsolete -d foo --allow-reboot --show-trace

from nixops-aws.

betaboon avatar betaboon commented on July 28, 2024

@coretemp could you share the expression of the machine and the route53RecordSet ?

from nixops-aws.

coretemp avatar coretemp commented on July 28, 2024

Any description of my_machine would do (I expect even an empty one), so just pick the one from the NixOps manual or one of your own.

I think the easiest repro would be just trying to add an expression similar to the one below to one of your existing machines. It will return the same.

   resources.route53RecordSets = {
      a-record = { resources, nodes,  ... }: {
          zoneId = "ZSOME_VALID_ID";
          domainName = ''www.example.com.'';
          ttl = 300;
          recordValues = [ (builtins.trace (resources.machines.my_machine.networking.privateIPv4) "1.1.1.1")];
          recordType = "A";
      };
  };

This shouldn't even set the privateIP, it should merely print the value, but even that doesn't work.

from nixops-aws.

betaboon avatar betaboon commented on July 28, 2024

@coretemp what version of nixops are you running?

from nixops-aws.

coretemp avatar coretemp commented on July 28, 2024

master

from nixops-aws.

betaboon avatar betaboon commented on July 28, 2024

@coretemp i just tried that way.
can confirm that it doesn't work.
which is kind of confusing to me, as i use references to networking.privateIPv4 in different locations like that.

from nixops-aws.

lo1tuma avatar lo1tuma commented on July 28, 2024

I’ve run into the same issue. Does someone already know how this could be achieved?

from nixops-aws.

tomberek avatar tomberek commented on July 28, 2024

Would this help? NixOS/nixops#1054

from nixops-aws.

JosephLucas avatar JosephLucas commented on July 28, 2024

On this issue, in addition to resources.machines.my_machine.networking.privateIPv4, I also tried nodes.<ecc-name>.config.networking.privateIPv4 without any success.
Any help ?

from nixops-aws.

exFalso avatar exFalso commented on July 28, 2024

Confirm, config.networking.privateIPv4 does not work. Tried with both the passed in config and nodes.<machine>.config

from nixops-aws.

Related Issues (20)

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.