diff --git a/changelog/27405.txt b/changelog/27405.txt
new file mode 100644
index 0000000000..ac5162e801
--- /dev/null
+++ b/changelog/27405.txt
@@ -0,0 +1,3 @@
+```release-note:improvement
+ui: AWS credentials form sets credential_type from backing role
+```
diff --git a/ui/app/components/configure-aws-secret.hbs b/ui/app/components/configure-aws-secret.hbs
index fafec4906b..0bd38b378e 100644
--- a/ui/app/components/configure-aws-secret.hbs
+++ b/ui/app/components/configure-aws-secret.hbs
@@ -40,7 +40,7 @@
autocomplete="off"
spellcheck="false"
@value={{@accessKey}}
- data-test-aws-input="accessKey"
+ data-test-input="accessKey"
/>
@@ -56,7 +56,7 @@
name="secret"
class="input"
@value={{@secretKey}}
- data-test-aws-input="secretKey"
+ data-test-input="secretKey"
/>
@@ -104,7 +104,7 @@
{{/if}}
-
+
@@ -134,7 +134,7 @@
@onChange={{fn this.handleTtlChange "leaseMax"}}
/>
-
+
diff --git a/ui/app/templates/components/generate-credentials.hbs b/ui/app/components/generate-credentials.hbs
similarity index 57%
rename from ui/app/templates/components/generate-credentials.hbs
rename to ui/app/components/generate-credentials.hbs
index 7b515e41f3..8481a662c9 100644
--- a/ui/app/templates/components/generate-credentials.hbs
+++ b/ui/app/components/generate-credentials.hbs
@@ -7,13 +7,13 @@
-
-
+
+
@@ -24,7 +24,7 @@
-{{#if this.model.hasGenerated}}
+{{#if this.hasGenerated}}
{{#unless this.model.isError}}
@@ -35,48 +35,42 @@
{{/unless}}
- {{#each this.model.attrs as |attr|}}
- {{#if (eq attr.type "object")}}
-
- {{else}}
- {{#if
- (or
- (eq attr.name "key")
- (eq attr.name "secretKey")
- (eq attr.name "securityToken")
- (eq attr.name "privateKey")
- attr.options.masked
- )
- }}
- {{#if (get this.model attr.name)}}
+ {{#each this.displayFields as |key|}}
+ {{#let (get this.model.allByKey key) as |attr|}}
+ {{#if (eq attr.type "object")}}
+
+ {{else}}
+ {{#if attr.options.masked}}
+ {{#if (get this.model attr.name)}}
+
+
+
+ {{/if}}
+ {{else if (and (get this.model attr.name) (or (eq attr.name "issueDate") (eq attr.name "expiryDate")))}}
+
+ {{else}}
-
-
+ />
{{/if}}
- {{else if (and (get this.model attr.name) (or (eq attr.name "issueDate") (eq attr.name "expiryDate")))}}
-
- {{else}}
-
{{/if}}
- {{/if}}
+ {{/let}}
{{/each}}
@@ -106,34 +100,25 @@
@text="Back"
@color="secondary"
@route="vault.cluster.secrets.backend.list-root"
- @model={{this.backendPath}}
- data-test-secret-generate-back={{true}}
+ @model={{@backendPath}}
+ data-test-back-button
/>
{{else}}
-
+
{{/if}}
{{else}}
-