We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d275f0 commit 705b50eCopy full SHA for 705b50e
cdk/cdk/web_stack.py
@@ -1,4 +1,4 @@
1
-from aws_cdk import Duration, RemovalPolicy, Stack
+from aws_cdk import CfnOutput, Duration, RemovalPolicy, Stack
2
from aws_cdk import aws_ec2 as ec2
3
from aws_cdk import aws_iam as iam
4
from aws_cdk import aws_s3 as s3
@@ -102,6 +102,14 @@ def __init__(
102
instance_id=instance.instance_id,
103
)
104
105
+ # Output the server IP address
106
+ CfnOutput(
107
+ self,
108
+ "ServerIP",
109
+ value=elastic_ip.attr_public_ip,
110
+ description="Public IP address of the web server",
111
+ )
112
+
113
# S3 bucket for database backups
114
backup_bucket = s3.Bucket(
115
self,
0 commit comments