Skip to content

Commit 17d49ed

Browse files
committed
chore: update example
1 parent 7060f23 commit 17d49ed

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
vendor
2-
examples/.terraform
3-
examples/.terraform.lock.hcl
2+
examples/.terraform*
3+
examples/terraform.*

examples/main.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
# 4. Run `cd examples && terraform init`
77
# 5. Run `terraform plan` to check the changes
88
# 6. Run `terraform apply` to apply the changes
9-
# 7. Run `terraform destory` to delete the test resources
9+
# 7. Run `terraform output` to find the outputs
10+
# 8. Run `terraform destory` to delete the test resources
1011
terraform {
1112
required_providers {
1213
bytebase = {
@@ -47,3 +48,11 @@ resource "bytebase_instance" "dev_instance" {
4748
# username = "username"
4849
# password = "password"
4950
}
51+
52+
# Print the new instance
53+
output "dev_instance" {
54+
value = bytebase_instance.dev_instance
55+
# The password in instance is sensitive, so you cannot directly get its value from the output.
56+
# But we can still print the instance via `terraform output -json dev_instance`
57+
sensitive = true
58+
}

0 commit comments

Comments
 (0)