If you want to fetch the output of s3 bucket domain name. you can use below output section.It more are less same of other service only differ attribute and service name.
Syntax of Attribute:
(Provider_property.userdefined_property.Attributes) aws_s3_bucket.my_bucket.bucket_domain_name
Syntax of Attribute:
(Provider_property.userdefined_property.Attributes) aws_s3_bucket.my_bucket.bucket_domain_name
provider "aws" { region = "us-east-1"
access_key = "CCCCCCCCCCCCCCCCCCCCCC"
secret_key = "CCCCCCCCCCCCCCCCCCCCCC"} resource "aws_s3_bucket" "my_bucket" { bucket = "my-bucket-testing-frist"} output "bucket" { value = "${aws_s3_bucket.my_bucket.bucket_domain_name}"}