data "aws_elb_service_account" "${main}" { }
      
      # Example
      
      resource "aws_s3_bucket" "elb_logs" {
         bucket = "${my-elb-tf-test-bucket}"
         acl = "private"
         policy = <<POLICY
      {
         "Id": "Policy",
         "Version": "2012-10-17",
         "Statement": [
         {
             "Action": [
                 "s3:PutObject"
             ],
             "Effect": "Allow",
             "Resource": "arn:aws:s3:::my-elb-tf-test-bucket/AWSLogs/*",
             "Principal": {
                 "AWS": [
                     "\${data.aws_elb_service_account.${main}.id}"
                 ]
             }
         }
         ]
      }
      POLICY
      }
      
      resource "aws_elb" "${bar}" {
         name = "${my-foobar-terraform-elb}"
         availability_zones = ["${us-west-2a}"]
      
         access_logs {
             bucket = "\${aws_s3_bucket.elb_logs.bucket}"
             interval = 5
         }
      
         listener {
             instance_port = 8000
             instance_protocol = "http"
             lb_port = 80
             lb_protocol = "http"
         }
      }
      Terraform language logo

      aws_elb_service_account

      Terraform snippets

      resource "aws_elb_instance" "${bar}" { instance_type = "t2.micro" instance_id = "${aws_elb_instance.${bar}.id}" instance_security_group = "sg-${aws_elb_instance.${bar}.security_group.

      Shortcut: tf_aws_elb_service_account

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.