We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Good day,
For my backup server I want to define the password in locals to leverage a data object.
module "aci" { source = "netascode/nac-aci/aci" version = "0.9.1" model = local.model yaml_directories = [ "data/*", "data/**/*", ] manage_access_policies = true manage_fabric_policies = true manage_pod_policies = true manage_node_policies = true manage_interface_policies = true manage_tenants = true } locals { model = { apic = { fabric_policies = { remote_locations = [{ name = "backup_server" password = data.key_vault.password }] } } } }
and my yaml file looks like this:
--- apic: fabric_policies: remote_locations: - name: backup_server hostname_ip: 192.168.1.20 protocol: sftp path: / auth_type: password username: backup_user mgmt_epg: oob
This will try to create 2x objects that is named backup_server, is it possible to instead merge them?
br Jørgen
The text was updated successfully, but these errors were encountered:
I think this has to do with the utils_yaml_merge provider, since it matches on all primitive types.
The following seems to work, but not a great solution for what I think you're trying to accomplish
locals { model = { apic = { fabric_policies = { remote_locations = [{ name = "backup_server" hostname_ip = "192.168.1.20" protocol = "sftp" path = "/" auth_type = "password" username = "backup_user" mgmt_epg = "oob" password = "MuHP4ssw0rd" }] } } } }
--- apic: fabric_policies: remote_locations: - name: "backup_server" hostname_ip: "192.168.1.20" protocol: "sftp" path: / auth_type: password username: backup_user mgmt_epg: oob
You could also use an environment variable
So an example would be to export the password to an environment var muh_password
muh_password
--- apic: fabric_policies: remote_locations: - name: "backup_server" hostname_ip: "192.168.1.20" protocol: "sftp" path: / auth_type: password username: backup_user mgmt_epg: oob password: !env muh_password
Sorry, something went wrong.
No branches or pull requests
Good day,
For my backup server I want to define the password in locals to leverage a data object.
and my yaml file looks like this:
This will try to create 2x objects that is named backup_server, is it possible to instead merge them?
br
Jørgen
The text was updated successfully, but these errors were encountered: