# Generate config

{% hint style="success" %}
If you don't want to append provider block with credentials inside Terraform script files, you can check  "Use public provider".\
App will append volatile file with provider block and public provider credentials. This file will not be stored or returned as the result of any operation.&#x20;
{% endhint %}

{% hint style="info" %}
If you are not using "Public provider" credentials, it is required to add two Terraform code blocks:

* terraform
  * specify atlcloudjira provider
* provider
  * inside provider, specify credentials used to authenticate Terraform provider in given instance
    {% endhint %}

To generate configuration code based on existing resources, please do following.

1. Go to Toolbox tab
2. Select all required resources
3. Add them as import to selected terraform file.
4. Click on "Generate config" to await process to be completed.
5. Reload workspace to verify that new file was created.

<figure><img src="https://2582686426-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn7nTpq2xv8EGbzULdTCb%2Fuploads%2FhJSFjlf8WLb2CeYveym7%2Fimage.png?alt=media&#x26;token=7f9faceb-90aa-4962-a20b-a5b9887a73d4" alt=""><figcaption><p>Click on helper button to generate configuration for imports.</p></figcaption></figure>

<figure><img src="https://2582686426-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn7nTpq2xv8EGbzULdTCb%2Fuploads%2F76tvI3K47SXg8BDbgcGl%2FGenerateConfig2.png?alt=media&#x26;token=4905e265-2cb4-4cbb-b3f1-86a4b627a7dd" alt=""><figcaption><p>Type a name for generated configuration.</p></figcaption></figure>

<figure><img src="https://2582686426-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn7nTpq2xv8EGbzULdTCb%2Fuploads%2Fk9AyYRNq8ZKQpw5ig12T%2Fimage.png?alt=media&#x26;token=c0e86d35-750d-4c1b-8bc3-ee939c632e6f" alt=""><figcaption><p>Code generation result is visible in Execution logs tab.</p></figcaption></figure>

<figure><img src="https://2582686426-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn7nTpq2xv8EGbzULdTCb%2Fuploads%2FFeHE515yBGvOGAoYa7yT%2FGenerateConfig4.png?alt=media&#x26;token=97dd8254-5880-4671-b0e0-7c48eb94cc6f" alt=""><figcaption><p>Reload workspace and check newly generated Terraform file.</p></figcaption></figure>
