@domesystems/templates 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/generate.mjs +1 -1
package/package.json
CHANGED
package/src/generate.mjs
CHANGED
|
@@ -113,7 +113,7 @@ export function renderDomeTerraform(manifest) {
|
|
|
113
113
|
}
|
|
114
114
|
for (const connection of manifest.tool_connections) {
|
|
115
115
|
const auth = connection.auth_method ?? "none";
|
|
116
|
-
const lines = [attr("workspace_id", "var.workspace_id"), attr("name", q(connection.name)), attr("protocol", q(required(connection, "protocol", `Tool connection ${connection.name} needs protocol.`))), attr("url",
|
|
116
|
+
const lines = [attr("workspace_id", "var.workspace_id"), attr("name", q(connection.name)), attr("protocol", q(required(connection, "protocol", `Tool connection ${connection.name} needs protocol.`))), attr("url", expression(required(connection, "url", `Tool connection ${connection.name} needs url.`))), attr("auth_method", q(auth)), attr("credential_type", q(connection.credential_type ?? (auth === "none" ? "none" : "shared")))];
|
|
117
117
|
if (connection.managed_header_name) lines.push(attr("managed_header_name", q(connection.managed_header_name)));
|
|
118
118
|
if (connection.secret_values) lines.push(attr("secret_values", `{ ${Object.entries(connection.secret_values).map(([key, value]) => `${q(key)} = ${expression(value)}`).join(", ")} }`));
|
|
119
119
|
if (connection.oauth) lines.push(attr("oauth", `jsonencode(${JSON.stringify(connection.oauth)})`));
|