diff --git a/addons/api/mirage/factories/host-catalog.js b/addons/api/mirage/factories/host-catalog.js index 776d8cdfa..0cf046228 100644 --- a/addons/api/mirage/factories/host-catalog.js +++ b/addons/api/mirage/factories/host-catalog.js @@ -47,19 +47,30 @@ export default factory.extend({ case 'aws': return { disable_credential_rotation: datatype.boolean(), - tenant_id: datatype.hexaDecimal(6), - client_id: datatype.hexaDecimal(6), - subscription_id: datatype.hexaDecimal(8), - secret_id: datatype.hexaDecimal(6), - secret_value: datatype.string(12), + region: address.state(), }; case 'azure': return { disable_credential_rotation: datatype.boolean(), - region: address.state(), + tenant_id: datatype.hexaDecimal(6), + client_id: datatype.hexaDecimal(6), + subscription_id: datatype.hexaDecimal(8), + }; + } + }, + + secrets() { + switch (this.plugin?.name) { + case 'aws': + return { access_key_id: datatype.hexaDecimal(8), secret_access_key: datatype.string(12), }; + case 'azure': + return { + secret_id: datatype.hexaDecimal(6), + secret_value: datatype.string(12), + }; } }, withChildren: trait({