# Can we populate the parameter which is file type with string?

**URL:** <https://community.replicated.com/t/can-we-populate-the-parameter-which-is-file-type-with-string/423>\
**Category:** Supporting your customers\
**Created:** [May 4, 2020, 6:04pm UTC](https://community.replicated.com/t/can-we-populate-the-parameter-which-is-file-type-with-string/423 "2020-05-04T18:04:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chitender\_kumar](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@chitender\_kumar](https://community.replicated.com/u/chitender_kumar)\
**Post date:** [May 4, 2020, 6:04pm UTC](https://community.replicated.com/t/can-we-populate-the-parameter-which-is-file-type-with-string/423/1 "2020-05-04T18:04:11Z")

</div>

Hi,

in our deployment we use SSL certficates, which user uploads it through UI. to make a single click deployment we want to upload the SSl certs at the beginning. our deployment is in AWS, where we are managing replicated config through configmap. below is the example:

below is the parameter which we have in replicated settings:

- name: certs  
title: TLS Configuration  
when: advance\_settings=1  
items:
  - name: tls-private-key-file  
title: Private Key  
value: private key  
data\_cmd:  
name: ssl\_cert  
value\_at: 0  
type: file  
affix: left
  - name: tls-certificate-file  
title: Certificate  
value: certificate file  
required: true  
data\_cmd:  
name: ssl\_cert  
value\_at: 1  
type: file  
affix: right

if we populate above field with string, would that work?

---

<div class="post-metadata">

**Author:** ![laverya](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/laverya/32/263_2.png) [@laverya](https://community.replicated.com/u/laverya)\
**Post date:** [May 4, 2020, 8:43pm UTC](https://community.replicated.com/t/can-we-populate-the-parameter-which-is-file-type-with-string/423/2 "2020-05-04T20:43:18Z")

</div>

What do you mean by populating a file with string? Are you trying to set a parameter with `replicatedctl app-config set`?

Generally a good way to do this is by using `replicatedctl app-config export` to get formatting, and then `replicatedctl app-config import` to set the desired params on a new installation.

---

<div class="post-metadata">

**Author:** ![chitender\_kumar](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@chitender\_kumar](https://community.replicated.com/u/chitender_kumar)\
**Post date:** [May 5, 2020, 5:10am UTC](https://community.replicated.com/t/can-we-populate-the-parameter-which-is-file-type-with-string/423/3 "2020-05-05T05:10:16Z")

</div>

yes, we are using app-config export only. if in app-config we use below:

“tls-private-key-file”: { value: “CONTENT\_OF\_KEY\_FILE\_AS\_STRING”}

would this work?

---

<div class="post-metadata">

**Author:** ![laverya](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/laverya/32/263_2.png) [@laverya](https://community.replicated.com/u/laverya)\
**Post date:** [May 6, 2020, 8:19pm UTC](https://community.replicated.com/t/can-we-populate-the-parameter-which-is-file-type-with-string/423/4 "2020-05-06T20:19:38Z")

</div>

not exactly - instead, you’d have something like this:

```auto
{
    "setting-name": {
        "value": "filename.txt",
        "data": "base64-encoded-file-contents"
    },
}

```
