Merge pull request #946 from hashicorp/chore-refactor-host-catalog-mirage-data

chore: 🤖 Refactor mirage for GET host-catalog
This commit is contained in:
Carlos Alcaide Corvo authored and GitHub committed 2022-02-10 09:06:30 -06:00
commit 37849ecf36
1 file changed
+17 -6
+17 -6
View File
@@ -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({