diff options
author | clarkzjw <[email protected]> | 2022-12-09 17:22:10 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2022-12-09 17:22:10 -0800 |
commit | cb5f8087f8c69c920f87fd5c219906f0796d6938 (patch) | |
tree | 8103290af0e2e14feb4fd1f1c5374fbdb1cdab75 /jinwei.me/infra/outputs.tf | |
parent | 0a8d79e00ebf51965b102b883e72d9e7987d50ae (diff) | |
download | jinwei.me-cb5f8087f8c69c920f87fd5c219906f0796d6938.tar.gz |
aws infra: add ec2, rds, vpc
Diffstat (limited to 'jinwei.me/infra/outputs.tf')
-rw-r--r-- | jinwei.me/infra/outputs.tf | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/jinwei.me/infra/outputs.tf b/jinwei.me/infra/outputs.tf new file mode 100644 index 0000000..3537e02 --- /dev/null +++ b/jinwei.me/infra/outputs.tf | |||
@@ -0,0 +1,29 @@ | |||
1 | output "rds_hostname" { | ||
2 | description = "RDS instance hostname" | ||
3 | value = aws_db_instance.jinwei-me.address | ||
4 | } | ||
5 | |||
6 | output "rds_port" { | ||
7 | description = "RDS instance port" | ||
8 | value = aws_db_instance.jinwei-me.port | ||
9 | } | ||
10 | |||
11 | output "rds_username" { | ||
12 | description = "RDS instance username" | ||
13 | value = aws_db_instance.jinwei-me.username | ||
14 | } | ||
15 | |||
16 | output "rds_password" { | ||
17 | description = "RDS instance password" | ||
18 | value = random_password.mysql_password.result | ||
19 | sensitive = true | ||
20 | } | ||
21 | |||
22 | output "instance" { | ||
23 | description = "The main EC2 instance." | ||
24 | value = { | ||
25 | arn = aws_instance.jinwei_me.arn | ||
26 | public_ip = aws_eip.main.public_ip | ||
27 | private_ip = aws_instance.jinwei_me.private_ip | ||
28 | } | ||
29 | } | ||