Skip to content

[Workers] env variables revision#2103

Merged
deadlypants1973 merged 6 commits into
productionfrom
kate/fwsev
Aug 20, 2021
Merged

[Workers] env variables revision#2103
deadlypants1973 merged 6 commits into
productionfrom
kate/fwsev

Conversation

@deadlypants1973

Copy link
Copy Markdown
Contributor

closes #1937

@deadlypants1973 deadlypants1973 added this to the Pages and Workers milestone Aug 18, 2021
@deadlypants1973 deadlypants1973 self-assigned this Aug 18, 2021
@deadlypants1973
deadlypants1973 requested a review from a team August 18, 2021 18:02
@deadlypants1973
deadlypants1973 requested a review from a team as a code owner August 18, 2021 18:02
@deadlypants1973 deadlypants1973 added the product:workers Related to Workers product label Aug 19, 2021
Comment thread products/workers/src/content/cli-wrangler/configuration.md Outdated
Comment thread products/workers/src/content/platform/environments.md Outdated
Luke's edits

Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>

1. Go to your **Workers script** > **Settings** > **Add variable** under **Environment Variables**.
2. Input a **Variable name** and its **value**, which will be made available to your Worker.
3. If your variable is a secret select **Encrypt** to protect its value. This will prevent the value from being visible via `wrangler` and the dashboard.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. If your variable is a secret select **Encrypt** to protect its value. This will prevent the value from being visible via `wrangler` and the dashboard.
3. If your variable is a secret, click **Encrypt** to protect its value. This will prevent the value from being visible via `wrangler` and the dashboard.

1. Go to your **Workers script** > **Settings** > **Add variable** under **Environment Variables**.
2. Input a **Variable name** and its **value**, which will be made available to your Worker.
3. If your variable is a secret select **Encrypt** to protect its value. This will prevent the value from being visible via `wrangler` and the dashboard.
3. (Optional) To add multiple environment variables, select **Add variable**.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. (Optional) To add multiple environment variables, select **Add variable**.
3. (Optional) To add multiple environment variables, click **Add variable**.

2. Input a **Variable name** and its **value**, which will be made available to your Worker.
3. If your variable is a secret select **Encrypt** to protect its value. This will prevent the value from being visible via `wrangler` and the dashboard.
3. (Optional) To add multiple environment variables, select **Add variable**.
5. Select **Save** to implement your changes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Select **Save** to implement your changes.
5. Click **Save** to implement your changes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change in other places too. I think we decided on Click for buttons and Select/Choose for items in a dropdown list.


## Adding environment variables via wrangler

* Environment variables are defined via the `[vars]` configuration in your `wranger.toml` file and are always plaintext values.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For SEO and scanability, I'd change this from a bulleted list to some h3s

@deadlypants1973
deadlypants1973 merged commit 62d0c65 into production Aug 20, 2021
@deadlypants1973
deadlypants1973 deleted the kate/fwsev branch August 20, 2021 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[workers] Improve Environmental Variables & Secrets documentation + discovery

3 participants