You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/providers/terraform/aws.mdx
+46-2Lines changed: 46 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,44 @@ In this example the project name is `api-testing` and the stack name is `aws`.
79
79
80
80

81
81
82
+
83
+
## Importing Existing Resources
84
+
85
+
The Nitric team is working to expand the list of resources that can be imported. Currently, only the following resources are supported:
86
+
87
+
- [Secrets](/secrets)
88
+
89
+
<Note>
90
+
Currently, only resources in the same AWS account and region as the Nitric project
91
+
are supported.
92
+
</Note>
93
+
94
+
### Secrets
95
+
96
+
To import a secret, you will need to know the secret's ARN. You can find the ARN of a secret in the AWS console or by using the AWS CLI.
97
+
98
+
First, add the secret to your project as you usually would if it wasn't imported. Then add the secret to the `import` section of your stack file. Here's an example of how to import a secret:
Unlike some other imported resources, secret imports require the ARN to be used.
114
+
Providing only the secret's name will be invalid.
115
+
</Note>
116
+
117
+
Need to import another resource type or have another question? Chat with us on [Discord](https://nitric.io/chat) or [open an issue](https://github.com/nitrictech/nitric/issues) on GitHub.
118
+
119
+
82
120
## Stack Configuration
83
121
84
122
```yaml title:nitric.[stack ID].yaml
@@ -95,8 +133,14 @@ region: my-aws-stack-region
95
133
# Optional outdir
96
134
# outdir: ./tf-output
97
135
98
-
# config:
99
-
# Config (same as base AWS provider except for VPC/Secret imports)
136
+
# Import existing AWS Resources
137
+
# Currently only secrets are supported
138
+
import:
139
+
# A name ARN map of secrets, where the name matches the nitric name of the secret you would like to import
140
+
secrets:
141
+
# In typescript this would import the provided secret reference for a secret declared as
0 commit comments