Saturday, 14 July 2018

Fetch the output of resource

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




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}"}

No comments:

Post a Comment

Configure EKS Persistent Static Storage With Elastic File System Using Terraform

  checkout :https://youtu.be/QuUIgQWBBZM