s3_backend

    1

    0

    lucycodes42

    Terraform snippets

    The code defines a data structure called "terraform_remote_state" that contains the configuration for an S3 backend for Terraform. The data structure is defined in the variable "${myBackend}" and contains the following properties:

    backend - The name of the S3 backend to use (defaults to "s3")

    config - A JSON object containing the following properties:

    bucket - The name of the S3 bucket to store the state in (defaults to "terraform-state-prod")

    key - A key name to use to identify the state file in S3 (defaults to "network/terraform.

    Shortcut: tf_s3_backend

    data "terraform_remote_state" "${myBackend}" {
       backend = "s3"
       config {
           bucket = "terraform-state-prod"
           key = "network/terraform.tfstate"
           region = "us-east-1"
       }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.