Documentation
HomeRequest DemoContact

Validio Code FAQ

What namespace does the Validio GUI use?

Resources created in the GUI are assigned to the namespace "default". To avoid conflicts, you should not use this namespace in your Validio Code (IaC) projects. Validio creates the “default” namespace so that users can opt-in to using namespaces when the time comes.

What happens if I runapply multiple times?

Running apply multiple times is fine because it is an independent operation. Before any changes are actually applied, Validio compares the contents in your manifest with the contents on the server. If the contents contain the same configuration, no changes will be made.

What is the difference between name and resource name?

“Name” and “resource name” are effectively the same in the context of IaC, and they represent a globally unique name that you give the resource. They can be used to identify a resource without looking up the generated ID, which is hard to remember.

Since every IaC object is a resource, calling it “resource name” would be stuttering so we just call it “name”. This is not to be confused with the “Name” field in the GUI which represents a “display name”.

How can I move all resources from the GUI into code?

Moving all resources from any namespace into a new Validio Code project is easy. Because all GUI resources use the "default" namespace, you can move everything from that namespace into a new or existing project.

The following example shows how to create a new Validio Code project and move the GUI resources into it using the import command.

validio code init --namespace my-iac-namespace
validio code import --import-namespace default --output main.py

📘

Note

The file specified with -output will be overwritten. Ensure that you don't have code you want to keep in this file.

Why do I get the error “Resource <resource_name> already exists”?

This happens when a resource with the same name exists in a different namespace. Resource names for a given resource need to be unique across the Validio platform because the value is used to identify an exact resource and link it to other related resources.

One way to manage resource names is to create a function that generates a unique prefix or suffix for your current project, as shown in the following example:

NAMESPACE_NAME = "my_namespace"

def name(resource_name: str) -> str:
    return f"{resource_name}_{NAMESPACE_NAME}

Can I change the name of a resource (Validator or Source) using IaC?

The name is a unique global identifier and cannot be changed. Resource names are also used to link related resources together. Changing the name would be equivalent to removing the resource, creating a new resource, and then stitching together all of the relationships with the new resource.

Why are my sources not started after I created them?

Sources cannot be started when they don't have any validators. Because new sources do not have validators, by default the sources are not started after they're created. When using IaC you’re able to specify validators, but these resources are applied asynchronously and there’s no guarantee that all validators exist when the source is created.

If you want to start your sources after applying your manifest the easiest way would be to use the CLI.

validio code apply --auto-approve && validio code start my_source

How do I import and use credentials if I don't know their secret values?

For security reasons, when you import resources into your IaC project, we do not expose any encrypted and sensitive data. Instead, the credential will be moved and added to your manifest with a flag ignore_changes set to true. This flag ensures that the import will ignore the fact that the secret value changes from some set value to an empty value in your manifest.