Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Availability of variables from sub environments

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 9 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      Adam1
      last edited by Adam1

      Hi,
      I have a problem with the availability of variables if it is defined in the parent environment and the server is in two sub environments simultaneously. The problem does not occur if the server is added to only one sub environment.

      Schema of environments:

      TestEnvironment
      |-SubEnvironment1
      |-SubEnvironment2

      The variable is defined in TestEnvironment.

      I have added a very simple configuration plan to the server:

      Ensure-Directory c:\$TestVariable;
      

      I get an error:
      ERROR: 2020-08-21 11:31:05Z - Could not resolve variable $TestVariable.

      What is the cause of the problem?

      1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer
        last edited by

        Hello; what product is this for... Otter?

        1 Reply Last reply Reply Quote 0
        • A Offline
          Adam1
          last edited by

          Yes, the problem occurs in Otter.

          1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer
            last edited by

            hi @Adam1, I looked into this further, and this is by design, but it should really be clarified in the UI a little bit better (I updated the docs).

            A server can exist in multiple environments, but it's not recommended.

            Basically, when a server is in multiple environments, then there can be no single environment in context. This means that the variable function $EnvironmentName will return empty, and variables cannot be resolved against those environments.

            This is unlike a role (which is set when executing a configuration plan, or explicitly set with for role X). So, in this case, I recommend you to use multiple roles.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation