Code Monkey home page Code Monkey logo

terraform-refactor-aws-test's Introduction

README

For each commit, run terraform plan and then terraform apply, then move on to next commit.

This is the final result of terraform plan:

terraform-refactor-test % op run --env-file=".env_vars" -- terraform plan
aws_s3_bucket.all_my_s3_buckets["second_s3_bucket"]: Refreshing state... [id=cantbelievethisnameisnottaken100]
aws_s3_bucket.all_my_s3_buckets["s3_bucket"]: Refreshing state... [id=cantbelievethisnameisnottaken]

Terraform will perform the following actions:

  # aws_s3_bucket.s3_bucket has moved to aws_s3_bucket.all_my_s3_buckets["s3_bucket"]
    resource "aws_s3_bucket" "all_my_s3_buckets" {
        id                          = "cantbelievethisnameisnottaken"
        tags                        = {}
        # (10 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_s3_bucket.second_s3_bucket has moved to aws_s3_bucket.all_my_s3_buckets["second_s3_bucket"]
    resource "aws_s3_bucket" "all_my_s3_buckets" {
        id                          = "cantbelievethisnameisnottaken100"
        tags                        = {}
        # (10 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 0 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

This is the final result of terraform apply:

terraform-refactor-test % op run --env-file=".env_vars" -- terraform apply
aws_s3_bucket.all_my_s3_buckets["second_s3_bucket"]: Refreshing state... [id=cantbelievethisnameisnottaken100]
aws_s3_bucket.all_my_s3_buckets["s3_bucket"]: Refreshing state... [id=cantbelievethisnameisnottaken]

Terraform will perform the following actions:

  # aws_s3_bucket.s3_bucket has moved to aws_s3_bucket.all_my_s3_buckets["s3_bucket"]
    resource "aws_s3_bucket" "all_my_s3_buckets" {
        id                          = "cantbelievethisnameisnottaken"
        tags                        = {}
        # (10 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_s3_bucket.second_s3_bucket has moved to aws_s3_bucket.all_my_s3_buckets["second_s3_bucket"]
    resource "aws_s3_bucket" "all_my_s3_buckets" {
        id                          = "cantbelievethisnameisnottaken100"
        tags                        = {}
        # (10 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes


Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Setup

Environment variables for AWS credentials stored in 1Password. Run commands like this:

op run --env-file=".env_vars" -- terraform plan
op run --env-file=".env_vars" -- terraform apply

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.