Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature | storage/s3-bucket-demo/ Update versions constraint + Update modules version #411

Merged

Conversation

rodriguez-matias
Copy link
Contributor

What?

  • Update and test Ref Architecture layers with tf latest versions, Leverage CLI latest version and SSO feature enabled.

How?

  • Update tf version constrains ~> v1.1.3
  • Update tf aws provider constrains ~> v4.10
  • Update module version to the latest available
  • Add 'delete_marker_replication' argument in order to avoid errors during tf apply

Environment Versions

  • Leverage CLI : v1.7.2
  • Terraform: v1.1.9
  • provider registry.terraform.io/hashicorp/aws v4.23.0

Layers

apps-devstg/us-east-1/storage/s3-bucket-demo-files

Why?

Keeping Leverage Reference Architecture up to date.

References

GitHub issue #370

* Update tf version constrains v1.1.3
* Update tf aws provider constrains v4.10
* Update source module version to v3.3.0
* Add 'delete_marker_replication' argument in order to avoid errors 
during tf apply
@rodriguez-matias rodriguez-matias requested a review from a team as a code owner July 25, 2022 17:51
@github-actions
Copy link

💰 Infracost estimate: monthly cost will not change

Project Previous New Diff
binbashar/le-tf-infra-aws/apps-...torage/s3-bucket-demo-files -- $0 $0 $0
All projects $1,633 $1,633 $0

123 projects have no cost estimate changes.

Infracost output
──────────────────────────────────
Project: binbashar/le-tf-infra-aws/apps-devstg/us-east-1/storage/s3-bucket-demo-files --
Module path: apps-devstg/us-east-1/storage/s3-bucket-demo-files --

~ module.log_bucket_demo_files.aws_s3_bucket.this[0]
  Monthly cost depends on usage

    - Object tagging
      Monthly cost depends on usage
        -$0.01 per 10k tags

    - One zone - infrequent access
    
        - Storage
          Monthly cost depends on usage
            -$0.01 per GB
    
        - PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            -$0.01 per 1k requests
    
        - GET, SELECT, and all other requests
          Monthly cost depends on usage
            -$0.001 per 1k requests
    
        - Lifecycle transition
          Monthly cost depends on usage
            -$0.01 per 1k requests
    
        - Retrievals
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Select data scanned
          Monthly cost depends on usage
            -$0.002 per GB
    
        - Select data returned
          Monthly cost depends on usage
            -$0.01 per GB

    - Glacier flexible retrieval
    
        - Storage
          Monthly cost depends on usage
            -$0.0036 per GB
    
        - PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - GET, SELECT, and all other requests
          Monthly cost depends on usage
            -$0.0004 per 1k requests
    
        - Lifecycle transition
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - Retrieval requests (standard)
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - Retrievals (standard)
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Select data scanned (standard)
          Monthly cost depends on usage
            -$0.008 per GB
    
        - Select data returned (standard)
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Retrieval requests (expedited)
          Monthly cost depends on usage
            -$10.00 per 1k requests
    
        - Retrievals (expedited)
          Monthly cost depends on usage
            -$0.03 per GB
    
        - Select data scanned (expedited)
          Monthly cost depends on usage
            -$0.02 per GB
    
        - Select data returned (expedited)
          Monthly cost depends on usage
            -$0.03 per GB
    
        - Select data scanned (bulk)
          Monthly cost depends on usage
            -$0.001 per GB
    
        - Select data returned (bulk)
          Monthly cost depends on usage
            -$0.0025 per GB
    
        - Early delete (within 90 days)
          Monthly cost depends on usage
            -$0.0036 per GB

+ module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]
  Monthly cost depends on usage

    + Standard
    
        + Storage
          Monthly cost depends on usage
            +$0.023 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.005 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.0007 per GB

    + One zone - infrequent access
    
        + Storage
          Monthly cost depends on usage
            +$0.01 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.01 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.001 per 1k requests
    
        + Lifecycle transition
          Monthly cost depends on usage
            +$0.01 per 1k requests
    
        + Retrievals
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.01 per GB

    + Glacier flexible retrieval
    
        + Storage
          Monthly cost depends on usage
            +$0.0036 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Lifecycle transition
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + Retrieval requests (standard)
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + Retrievals (standard)
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Select data scanned (standard)
          Monthly cost depends on usage
            +$0.008 per GB
    
        + Select data returned (standard)
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Retrieval requests (expedited)
          Monthly cost depends on usage
            +$10.00 per 1k requests
    
        + Retrievals (expedited)
          Monthly cost depends on usage
            +$0.03 per GB
    
        + Select data scanned (expedited)
          Monthly cost depends on usage
            +$0.02 per GB
    
        + Select data returned (expedited)
          Monthly cost depends on usage
            +$0.03 per GB
    
        + Select data scanned (bulk)
          Monthly cost depends on usage
            +$0.001 per GB
    
        + Select data returned (bulk)
          Monthly cost depends on usage
            +$0.0025 per GB
    
        + Early delete (within 90 days)
          Monthly cost depends on usage
            +$0.0036 per GB

~ module.s3_bucket_demo_files.aws_s3_bucket.this[0]
  Monthly cost depends on usage

    - Object tagging
      Monthly cost depends on usage
        -$0.01 per 10k tags

    - One zone - infrequent access
    
        - Storage
          Monthly cost depends on usage
            -$0.01 per GB
    
        - PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            -$0.01 per 1k requests
    
        - GET, SELECT, and all other requests
          Monthly cost depends on usage
            -$0.001 per 1k requests
    
        - Lifecycle transition
          Monthly cost depends on usage
            -$0.01 per 1k requests
    
        - Retrievals
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Select data scanned
          Monthly cost depends on usage
            -$0.002 per GB
    
        - Select data returned
          Monthly cost depends on usage
            -$0.01 per GB

    - Glacier flexible retrieval
    
        - Storage
          Monthly cost depends on usage
            -$0.0036 per GB
    
        - PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - GET, SELECT, and all other requests
          Monthly cost depends on usage
            -$0.0004 per 1k requests
    
        - Lifecycle transition
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - Retrieval requests (standard)
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - Retrievals (standard)
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Select data scanned (standard)
          Monthly cost depends on usage
            -$0.008 per GB
    
        - Select data returned (standard)
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Retrieval requests (expedited)
          Monthly cost depends on usage
            -$10.00 per 1k requests
    
        - Retrievals (expedited)
          Monthly cost depends on usage
            -$0.03 per GB
    
        - Select data scanned (expedited)
          Monthly cost depends on usage
            -$0.02 per GB
    
        - Select data returned (expedited)
          Monthly cost depends on usage
            -$0.03 per GB
    
        - Select data scanned (bulk)
          Monthly cost depends on usage
            -$0.001 per GB
    
        - Select data returned (bulk)
          Monthly cost depends on usage
            -$0.0025 per GB
    
        - Early delete (within 90 days)
          Monthly cost depends on usage
            -$0.0036 per GB

+ module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]
  Monthly cost depends on usage

    + Standard
    
        + Storage
          Monthly cost depends on usage
            +$0.023 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.005 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.0007 per GB

    + One zone - infrequent access
    
        + Storage
          Monthly cost depends on usage
            +$0.01 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.01 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.001 per 1k requests
    
        + Lifecycle transition
          Monthly cost depends on usage
            +$0.01 per 1k requests
    
        + Retrievals
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.01 per GB

    + Glacier flexible retrieval
    
        + Storage
          Monthly cost depends on usage
            +$0.0036 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Lifecycle transition
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + Retrieval requests (standard)
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + Retrievals (standard)
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Select data scanned (standard)
          Monthly cost depends on usage
            +$0.008 per GB
    
        + Select data returned (standard)
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Retrieval requests (expedited)
          Monthly cost depends on usage
            +$10.00 per 1k requests
    
        + Retrievals (expedited)
          Monthly cost depends on usage
            +$0.03 per GB
    
        + Select data scanned (expedited)
          Monthly cost depends on usage
            +$0.02 per GB
    
        + Select data returned (expedited)
          Monthly cost depends on usage
            +$0.03 per GB
    
        + Select data scanned (bulk)
          Monthly cost depends on usage
            +$0.001 per GB
    
        + Select data returned (bulk)
          Monthly cost depends on usage
            +$0.0025 per GB
    
        + Early delete (within 90 days)
          Monthly cost depends on usage
            +$0.0036 per GB

~ module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0]
  Monthly cost depends on usage

    - Object tagging
      Monthly cost depends on usage
        -$0.01 per 10k tags

    - One zone - infrequent access
    
        - Storage
          Monthly cost depends on usage
            -$0.01 per GB
    
        - PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            -$0.01 per 1k requests
    
        - GET, SELECT, and all other requests
          Monthly cost depends on usage
            -$0.001 per 1k requests
    
        - Lifecycle transition
          Monthly cost depends on usage
            -$0.01 per 1k requests
    
        - Retrievals
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Select data scanned
          Monthly cost depends on usage
            -$0.002 per GB
    
        - Select data returned
          Monthly cost depends on usage
            -$0.01 per GB

    - Glacier flexible retrieval
    
        - Storage
          Monthly cost depends on usage
            -$0.0036 per GB
    
        - PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - GET, SELECT, and all other requests
          Monthly cost depends on usage
            -$0.0004 per 1k requests
    
        - Lifecycle transition
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - Retrieval requests (standard)
          Monthly cost depends on usage
            -$0.03 per 1k requests
    
        - Retrievals (standard)
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Select data scanned (standard)
          Monthly cost depends on usage
            -$0.008 per GB
    
        - Select data returned (standard)
          Monthly cost depends on usage
            -$0.01 per GB
    
        - Retrieval requests (expedited)
          Monthly cost depends on usage
            -$10.00 per 1k requests
    
        - Retrievals (expedited)
          Monthly cost depends on usage
            -$0.03 per GB
    
        - Select data scanned (expedited)
          Monthly cost depends on usage
            -$0.02 per GB
    
        - Select data returned (expedited)
          Monthly cost depends on usage
            -$0.03 per GB
    
        - Select data scanned (bulk)
          Monthly cost depends on usage
            -$0.001 per GB
    
        - Select data returned (bulk)
          Monthly cost depends on usage
            -$0.0025 per GB
    
        - Early delete (within 90 days)
          Monthly cost depends on usage
            -$0.0036 per GB

+ module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]
  Monthly cost depends on usage

    + Standard
    
        + Storage
          Monthly cost depends on usage
            +$0.023 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.005 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.0007 per GB

    + One zone - infrequent access
    
        + Storage
          Monthly cost depends on usage
            +$0.01 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.01 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.001 per 1k requests
    
        + Lifecycle transition
          Monthly cost depends on usage
            +$0.01 per 1k requests
    
        + Retrievals
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.01 per GB

    + Glacier flexible retrieval
    
        + Storage
          Monthly cost depends on usage
            +$0.0036 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Lifecycle transition
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + Retrieval requests (standard)
          Monthly cost depends on usage
            +$0.03 per 1k requests
    
        + Retrievals (standard)
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Select data scanned (standard)
          Monthly cost depends on usage
            +$0.008 per GB
    
        + Select data returned (standard)
          Monthly cost depends on usage
            +$0.01 per GB
    
        + Retrieval requests (expedited)
          Monthly cost depends on usage
            +$10.00 per 1k requests
    
        + Retrievals (expedited)
          Monthly cost depends on usage
            +$0.03 per GB
    
        + Select data scanned (expedited)
          Monthly cost depends on usage
            +$0.02 per GB
    
        + Select data returned (expedited)
          Monthly cost depends on usage
            +$0.03 per GB
    
        + Select data scanned (bulk)
          Monthly cost depends on usage
            +$0.001 per GB
    
        + Select data returned (bulk)
          Monthly cost depends on usage
            +$0.0025 per GB
    
        + Early delete (within 90 days)
          Monthly cost depends on usage
            +$0.0036 per GB

Monthly cost change for binbashar/le-tf-infra-aws/apps-devstg/us-east-1/storage/s3-bucket-demo-files -- (Module path: apps-devstg/us-east-1/storage/s3-bucket-demo-files --)
Amount:  $0.00 ($0.00 → $0.00)

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

The following projects have no cost estimate changes: binbashar/le-tf-infra-aws/apps-devstg/global/base-identities (Module path: apps-devstg/global/base-identities), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/backups -- (Module path: apps-devstg/us-east-1/backups --), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/base-network (Module path: apps-devstg/us-east-1/base-network), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/base-tf-backend (Module path: apps-devstg/us-east-1/base-tf-backend), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/cdn-s3-frontend -- (Module path: apps-devstg/us-east-1/cdn-s3-frontend --), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/databases-aurora (Module path: apps-devstg/us-east-1/databases-aurora), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/databases-mysql -- (Module path: apps-devstg/us-east-1/databases-mysql --), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/databases-pgsql -- (Module path: apps-devstg/us-east-1/databases-pgsql --), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/ec2-fleet-ansible -- (Module path: apps-devstg/us-east-1/ec2-fleet-ansible --), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-demoapps/cluster (Module path: apps-devstg/us-east-1/k8s-eks-demoapps/cluster), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-demoapps/identities (Module path: apps-devstg/us-east-1/k8s-eks-demoapps/identities), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-demoapps/k8s-resources (Module path: apps-devstg/us-east-1/k8s-eks-demoapps/k8s-resources), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-demoapps/k8s-workloads (Module path: apps-devstg/us-east-1/k8s-eks-demoapps/k8s-workloads), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-demoapps/network (Module path: apps-devstg/us-east-1/k8s-eks-demoapps/network), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-v1.17/cluster (Module path: apps-devstg/us-east-1/k8s-eks-v1.17/cluster), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-v1.17/identities (Module path: apps-devstg/us-east-1/k8s-eks-v1.17/identities), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-v1.17/k8s-resources (Module path: apps-devstg/us-east-1/k8s-eks-v1.17/k8s-resources), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-v1.17/k8s-workloads (Module path: apps-devstg/us-east-1/k8s-eks-v1.17/k8s-workloads), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-eks-v1.17/network (Module path: apps-devstg/us-east-1/k8s-eks-v1.17/network), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-kind/k8s-resources (Module path: apps-devstg/us-east-1/k8s-kind/k8s-resources), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-kops --/1-prerequisites (Module path: apps-devstg/us-east-1/k8s-kops --/1-prerequisites), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/k8s-kops --/2-kops (Module path: apps-devstg/us-east-1/k8s-kops --/2-kops), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/notifications (Module path: apps-devstg/us-east-1/notifications), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/security-audit (Module path: apps-devstg/us-east-1/security-audit), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/security-base (Module path: apps-devstg/us-east-1/security-base), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/security-certs (Module path: apps-devstg/us-east-1/security-certs), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/security-compliance -- (Module path: apps-devstg/us-east-1/security-compliance --), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/security-firewall -- (Module path: apps-devstg/us-east-1/security-firewall --), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/security-keys (Module path: apps-devstg/us-east-1/security-keys), binbashar/le-tf-infra-aws/apps-devstg/us-east-1/tools-cloud-nuke (Module path: apps-devstg/us-east-1/tools-cloud-nuke), binbashar/le-tf-infra-aws/apps-devstg/us-east-2/k8s-eks-v1.17/cluster (Module path: apps-devstg/us-east-2/k8s-eks-v1.17/cluster), binbashar/le-tf-infra-aws/apps-devstg/us-east-2/k8s-eks-v1.17/identities (Module path: apps-devstg/us-east-2/k8s-eks-v1.17/identities), binbashar/le-tf-infra-aws/apps-devstg/us-east-2/k8s-eks-v1.17/k8s-resources (Module path: apps-devstg/us-east-2/k8s-eks-v1.17/k8s-resources), binbashar/le-tf-infra-aws/apps-devstg/us-east-2/k8s-eks-v1.17/k8s-workloads (Module path: apps-devstg/us-east-2/k8s-eks-v1.17/k8s-workloads), binbashar/le-tf-infra-aws/apps-devstg/us-east-2/k8s-eks-v1.17/network (Module path: apps-devstg/us-east-2/k8s-eks-v1.17/network), binbashar/le-tf-infra-aws/apps-devstg/us-east-2/security-compliance -- (Module path: apps-devstg/us-east-2/security-compliance --), binbashar/le-tf-infra-aws/apps-devstg/us-east-2/security-keys (Module path: apps-devstg/us-east-2/security-keys), binbashar/le-tf-infra-aws/apps-prd/global/base-identities (Module path: apps-prd/global/base-identities), binbashar/le-tf-infra-aws/apps-prd/us-east-1/backups -- (Module path: apps-prd/us-east-1/backups --), binbashar/le-tf-infra-aws/apps-prd/us-east-1/base-network (Module path: apps-prd/us-east-1/base-network), binbashar/le-tf-infra-aws/apps-prd/us-east-1/base-tf-backend (Module path: apps-prd/us-east-1/base-tf-backend), binbashar/le-tf-infra-aws/apps-prd/us-east-1/cdn-s3-frontend -- (Module path: apps-prd/us-east-1/cdn-s3-frontend --), binbashar/le-tf-infra-aws/apps-prd/us-east-1/ec2-fleet -- (Module path: apps-prd/us-east-1/ec2-fleet --), binbashar/le-tf-infra-aws/apps-prd/us-east-1/notifications (Module path: apps-prd/us-east-1/notifications), binbashar/le-tf-infra-aws/apps-prd/us-east-1/security-audit (Module path: apps-prd/us-east-1/security-audit), binbashar/le-tf-infra-aws/apps-prd/us-east-1/security-base (Module path: apps-prd/us-east-1/security-base), binbashar/le-tf-infra-aws/apps-prd/us-east-1/security-certs (Module path: apps-prd/us-east-1/security-certs), binbashar/le-tf-infra-aws/apps-prd/us-east-1/security-compliance -- (Module path: apps-prd/us-east-1/security-compliance --), binbashar/le-tf-infra-aws/apps-prd/us-east-1/security-keys (Module path: apps-prd/us-east-1/security-keys), binbashar/le-tf-infra-aws/management/global/base-identities (Module path: management/global/base-identities), binbashar/le-tf-infra-aws/management/global/cost-mgmt (Module path: management/global/cost-mgmt), binbashar/le-tf-infra-aws/management/global/organizations (Module path: management/global/organizations), binbashar/le-tf-infra-aws/management/global/sso (Module path: management/global/sso), binbashar/le-tf-infra-aws/management/us-east-1/backups (Module path: management/us-east-1/backups), binbashar/le-tf-infra-aws/management/us-east-1/base-tf-backend (Module path: management/us-east-1/base-tf-backend), binbashar/le-tf-infra-aws/management/us-east-1/firewall-manager (Module path: management/us-east-1/firewall-manager), binbashar/le-tf-infra-aws/management/us-east-1/notifications (Module path: management/us-east-1/notifications), binbashar/le-tf-infra-aws/management/us-east-1/security-audit (Module path: management/us-east-1/security-audit), binbashar/le-tf-infra-aws/management/us-east-1/security-base (Module path: management/us-east-1/security-base), binbashar/le-tf-infra-aws/management/us-east-1/security-compliance (Module path: management/us-east-1/security-compliance), binbashar/le-tf-infra-aws/management/us-east-1/security-keys (Module path: management/us-east-1/security-keys), binbashar/le-tf-infra-aws/management/us-east-1/security-monitoring (Module path: management/us-east-1/security-monitoring), binbashar/le-tf-infra-aws/management/us-east-2/security-monitoring -- (Module path: management/us-east-2/security-monitoring --), binbashar/le-tf-infra-aws/network/global/base-identities (Module path: network/global/base-identities), binbashar/le-tf-infra-aws/network/us-east-1/base-network (Module path: network/us-east-1/base-network), binbashar/le-tf-infra-aws/network/us-east-1/base-tf-backend (Module path: network/us-east-1/base-tf-backend), binbashar/le-tf-infra-aws/network/us-east-1/network-firewall (Module path: network/us-east-1/network-firewall), binbashar/le-tf-infra-aws/network/us-east-1/notifications (Module path: network/us-east-1/notifications), binbashar/le-tf-infra-aws/network/us-east-1/security-audit (Module path: network/us-east-1/security-audit), binbashar/le-tf-infra-aws/network/us-east-1/security-base (Module path: network/us-east-1/security-base), binbashar/le-tf-infra-aws/network/us-east-1/security-compliance -- (Module path: network/us-east-1/security-compliance --), binbashar/le-tf-infra-aws/network/us-east-1/security-keys (Module path: network/us-east-1/security-keys), binbashar/le-tf-infra-aws/network/us-east-1/transit-gateway (Module path: network/us-east-1/transit-gateway), binbashar/le-tf-infra-aws/network/us-east-2/base-network (Module path: network/us-east-2/base-network), binbashar/le-tf-infra-aws/network/us-east-2/network-firewall (Module path: network/us-east-2/network-firewall), binbashar/le-tf-infra-aws/network/us-east-2/security-compliance -- (Module path: network/us-east-2/security-compliance --), binbashar/le-tf-infra-aws/network/us-east-2/security-keys (Module path: network/us-east-2/security-keys), binbashar/le-tf-infra-aws/network/us-east-2/transit-gateway (Module path: network/us-east-2/transit-gateway), binbashar/le-tf-infra-aws/security/global/base-identities (Module path: security/global/base-identities), binbashar/le-tf-infra-aws/security/us-east-1/base-tf-backend (Module path: security/us-east-1/base-tf-backend), binbashar/le-tf-infra-aws/security/us-east-1/firewall-manager (Module path: security/us-east-1/firewall-manager), binbashar/le-tf-infra-aws/security/us-east-1/notifications (Module path: security/us-east-1/notifications), binbashar/le-tf-infra-aws/security/us-east-1/security-audit (Module path: security/us-east-1/security-audit), binbashar/le-tf-infra-aws/security/us-east-1/security-base (Module path: security/us-east-1/security-base), binbashar/le-tf-infra-aws/security/us-east-1/security-compliance -- (Module path: security/us-east-1/security-compliance --), binbashar/le-tf-infra-aws/security/us-east-1/security-keys (Module path: security/us-east-1/security-keys), binbashar/le-tf-infra-aws/security/us-east-1/security-monitoring (Module path: security/us-east-1/security-monitoring), binbashar/le-tf-infra-aws/security/us-east-2/security-audit (Module path: security/us-east-2/security-audit), binbashar/le-tf-infra-aws/security/us-east-2/security-compliance -- (Module path: security/us-east-2/security-compliance --), binbashar/le-tf-infra-aws/security/us-east-2/security-monitoring -- (Module path: security/us-east-2/security-monitoring --), binbashar/le-tf-infra-aws/shared/global/base-dns/binbash.com.ar (Module path: shared/global/base-dns/binbash.com.ar), binbashar/le-tf-infra-aws/shared/global/base-identities (Module path: shared/global/base-identities), binbashar/le-tf-infra-aws/shared/us-east-1/backups (Module path: shared/us-east-1/backups), binbashar/le-tf-infra-aws/shared/us-east-1/base-network (Module path: shared/us-east-1/base-network), binbashar/le-tf-infra-aws/shared/us-east-1/base-tf-backend (Module path: shared/us-east-1/base-tf-backend), binbashar/le-tf-infra-aws/shared/us-east-1/container-registry (Module path: shared/us-east-1/container-registry), binbashar/le-tf-infra-aws/shared/us-east-1/ec2-fleet -- (Module path: shared/us-east-1/ec2-fleet --), binbashar/le-tf-infra-aws/shared/us-east-1/ec2-fleet-bastions -- (Module path: shared/us-east-1/ec2-fleet-bastions --), binbashar/le-tf-infra-aws/shared/us-east-1/k8s-eks-demoapps/identities (Module path: shared/us-east-1/k8s-eks-demoapps/identities), binbashar/le-tf-infra-aws/shared/us-east-1/notifications (Module path: shared/us-east-1/notifications), binbashar/le-tf-infra-aws/shared/us-east-1/secrets-manager -- (Module path: shared/us-east-1/secrets-manager --), binbashar/le-tf-infra-aws/shared/us-east-1/security-audit (Module path: shared/us-east-1/security-audit), binbashar/le-tf-infra-aws/shared/us-east-1/security-base (Module path: shared/us-east-1/security-base), binbashar/le-tf-infra-aws/shared/us-east-1/security-compliance -- (Module path: shared/us-east-1/security-compliance --), binbashar/le-tf-infra-aws/shared/us-east-1/security-keys (Module path: shared/us-east-1/security-keys), binbashar/le-tf-infra-aws/shared/us-east-1/storage/backup-gdrive -- (Module path: shared/us-east-1/storage/backup-gdrive --), binbashar/le-tf-infra-aws/shared/us-east-1/storage/object-file-shares-for-users-list -- (Module path: shared/us-east-1/storage/object-file-shares-for-users-list --), binbashar/le-tf-infra-aws/shared/us-east-1/storage/object-file-shares-sftp-transfer-service -- (Module path: shared/us-east-1/storage/object-file-shares-sftp-transfer-service --), binbashar/le-tf-infra-aws/shared/us-east-1/tools-cloud-scheduler-stop-start (Module path: shared/us-east-1/tools-cloud-scheduler-stop-start), binbashar/le-tf-infra-aws/shared/us-east-1/tools-eskibana -- (Module path: shared/us-east-1/tools-eskibana --), binbashar/le-tf-infra-aws/shared/us-east-1/tools-github-selfhosted-runners (Module path: shared/us-east-1/tools-github-selfhosted-runners), binbashar/le-tf-infra-aws/shared/us-east-1/tools-jenkins -- (Module path: shared/us-east-1/tools-jenkins --), binbashar/le-tf-infra-aws/shared/us-east-1/tools-managedeskibana -- (Module path: shared/us-east-1/tools-managedeskibana --), binbashar/le-tf-infra-aws/shared/us-east-1/tools-prometheus -- (Module path: shared/us-east-1/tools-prometheus --), binbashar/le-tf-infra-aws/shared/us-east-1/tools-vault -- (Module path: shared/us-east-1/tools-vault --), binbashar/le-tf-infra-aws/shared/us-east-1/tools-vpn-server (Module path: shared/us-east-1/tools-vpn-server), binbashar/le-tf-infra-aws/shared/us-east-1/tools-webhooks -- (Module path: shared/us-east-1/tools-webhooks --), binbashar/le-tf-infra-aws/shared/us-east-2/base-network (Module path: shared/us-east-2/base-network), binbashar/le-tf-infra-aws/shared/us-east-2/container-registry (Module path: shared/us-east-2/container-registry), binbashar/le-tf-infra-aws/shared/us-east-2/security-compliance -- (Module path: shared/us-east-2/security-compliance --), binbashar/le-tf-infra-aws/shared/us-east-2/security-keys (Module path: shared/us-east-2/security-keys), binbashar/le-tf-infra-aws/shared/us-east-2/tools-eskibana -- (Module path: shared/us-east-2/tools-eskibana --), binbashar/le-tf-infra-aws/shared/us-east-2/tools-prometheus -- (Module path: shared/us-east-2/tools-prometheus --)
Run the following command to see their breakdown: infracost breakdown --path=/path/to/code

──────────────────────────────────
Key: ~ changed, + added, - removed

518 cloud resources were detected:
∙ 518 were estimated, 383 of which include usage-based costs, see https://infracost.io/usage-file

This comment will be updated when the cost estimate changes.

Is this comment useful? Yes, No, Other

@rodriguez-matias
Copy link
Contributor Author

TF COMMANDS

$ leverage terraform init

[11:51:16.700] INFO     Checking environment name definition in account.tfvars...
[11:51:16.714] INFO     ✔ OK
[11:51:16.727] INFO     Checking backend key...
[11:51:16.731] INFO     Found: 'apps-devstg/storage/s3-bucket-demo-files/terraform.tfstate'
[11:51:16.734] INFO     ✔ OK
[11:51:16.741] INFO     Checking backend.tfvars:
[11:51:16.743] INFO     Checking if profile starts with bb-apps-devstg...
[11:51:16.745] INFO     ✔ OK
[11:51:16.747] INFO     Checking if bucket starts with bb-apps-devstg...
[11:51:16.749] INFO     ✔ OK
[11:51:16.752] INFO     Checking if dynamodb table starts with bb-apps-devstg...
[11:51:16.754] INFO     ✔ OK
[14:51:18]    INFO	Attempting to get temporary credentials for apps-devstg account.
[14:51:22]    INFO	Using already configured temporary credentials.
[14:51:22]    INFO	Attempting to get temporary credentials for security account.
[14:51:25]    INFO	Using already configured temporary credentials.
Initializing modules...
Downloading git::https://github.com/binbashar/terraform-aws-s3-bucket.git?ref=v3.3.0 for log_bucket_demo_files...
- log_bucket_demo_files in .terraform/modules/log_bucket_demo_files
Downloading git::https://github.com/binbashar/terraform-aws-s3-bucket.git?ref=v3.3.0 for s3_bucket_demo_files...
- s3_bucket_demo_files in .terraform/modules/s3_bucket_demo_files
Downloading git::https://github.com/binbashar/terraform-aws-s3-bucket.git?ref=v3.3.0 for s3_bucket_demo_files_replica...
- s3_bucket_demo_files_replica in .terraform/modules/s3_bucket_demo_files_replica

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- terraform.io/builtin/terraform is built in to Terraform
- Finding hashicorp/aws versions matching ">= 4.5.0, ~> 4.10"...
- Installing hashicorp/aws v4.23.0...
- Installed hashicorp/aws v4.23.0 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

@rodriguez-matias
Copy link
Contributor Author

$ leverage terraform apply

[14:44:54]    INFO	Attempting to get temporary credentials for apps-devstg account.
[14:45:05]    INFO	Credentials for apps-devstg account written successfully.
[14:45:05]    INFO	Attempting to get temporary credentials for security account.
[14:45:20]    INFO	Credentials for security account written successfully.
Acquiring state lock. This may take a few moments...

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_iam_policy.replication will be created
  + resource "aws_iam_policy" "replication" {
      + arn       = (known after apply)
      + id        = (known after apply)
      + name      = "bb-apps-devstg-demo-files-s3-bucket-replication"
      + path      = "/"
      + policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = [
                          + "s3:ListBucket",
                          + "s3:GetReplicationConfiguration",
                          + "s3:GetObjectVersionForReplication",
                          + "s3:GetObjectVersionAcl",
                          + "s3:GetObjectVersionTagging",
                          + "s3:GetObjectRetention",
                          + "s3:GetObjectLegalHold",
                        ]
                      + Effect   = "Allow"
                      + Resource = [
                          + "arn:aws:s3:::bb-apps-devstg-demo-files",
                          + "arn:aws:s3:::bb-apps-devstg-demo-files/*",
                        ]
                    },
                  + {
                      + Action    = [
                          + "s3:ReplicateObject",
                          + "s3:ReplicateDelete",
                          + "s3:ReplicateTags",
                          + "s3:GetObjectVersionTagging",
                          + "s3:ObjectOwnerOverrideToBucketOwner",
                        ]
                      + Condition = {
                          + StringLikeIfExists = {
                              + "s3:x-amz-server-side-encryption"                = [
                                  + "aws:kms",
                                  + "AES256",
                                ]
                              + "s3:x-amz-server-side-encryption-aws-kms-key-id" = [
                                  + "arn:aws:kms:us-east-2:52XXXXXXXX4:key/c04XXXXXXXXXX-XXXXXXXXfb6e3",
                                ]
                            }
                        }
                      + Effect    = "Allow"
                      + Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-replica/*"
                    },
                  + {
                      + Action    = [
                          + "kms:Decrypt",
                        ]
                      + Condition = {
                          + StringLike = {
                              + "kms:EncryptionContext:aws:s3:arn" = [
                                  + "arn:aws:s3:::bb-apps-devstg-demo-files/*",
                                ]
                              + "kms:ViaService"                   = "s3.us-east-1.amazonaws.com"
                            }
                        }
                      + Effect    = "Allow"
                      + Resource  = [
                          + "arn:aws:kms:us-east-1:52XXXXXXXX4:key/63XXXXXe9-XXXXX-XXXX-XXXXX-cXXXXXXXX61b7",
                        ]
                    },
                  + {
                      + Action    = [
                          + "kms:Encrypt",
                        ]
                      + Condition = {
                          + StringLike = {
                              + "kms:EncryptionContext:aws:s3:arn" = [
                                  + "arn:aws:s3:::bb-apps-devstg-demo-files-replica/*",
                                ]
                              + "kms:ViaService"                   = "s3.us-east-2.amazonaws.com"
                            }
                        }
                      + Effect    = "Allow"
                      + Resource  = [
                          + "arn:aws:kms:us-east-2:52XXXXXXXX4:key/c04XXXXXXXXXX-XXXXXXXXfb6e3",
                        ]
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + policy_id = (known after apply)
      + tags_all  = (known after apply)
    }

  # aws_iam_policy_attachment.replication will be created
  + resource "aws_iam_policy_attachment" "replication" {
      + id         = (known after apply)
      + name       = "bb-apps-devstg-demo-files-s3-bucket-replication"
      + policy_arn = (known after apply)
      + roles      = [
          + "bb-apps-devstg-demo-files-s3-bucket-replication",
        ]
    }

  # aws_iam_role.replication will be created
  + resource "aws_iam_role" "replication" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "s3.amazonaws.com"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + force_detach_policies = false
      + id                    = (known after apply)
      + managed_policy_arns   = (known after apply)
      + max_session_duration  = 3600
      + name                  = "bb-apps-devstg-demo-files-s3-bucket-replication"
      + name_prefix           = (known after apply)
      + path                  = "/"
      + tags_all              = (known after apply)
      + unique_id             = (known after apply)

      + inline_policy {
          + name   = (known after apply)
          + policy = (known after apply)
        }
    }

  # module.log_bucket_demo_files.aws_s3_bucket.this[0] will be created
  + resource "aws_s3_bucket" "this" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "bb-apps-devstg-demo-files-logs"
      + bucket_domain_name          = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = true
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = false
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "Environment" = "apps-devstg"
          + "Terraform"   = "true"
        }
      + tags_all                    = {
          + "Environment" = "apps-devstg"
          + "Terraform"   = "true"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule {
          + allowed_headers = (known after apply)
          + allowed_methods = (known after apply)
          + allowed_origins = (known after apply)
          + expose_headers  = (known after apply)
          + max_age_seconds = (known after apply)
        }

      + grant {
          + id          = (known after apply)
          + permissions = (known after apply)
          + type        = (known after apply)
          + uri         = (known after apply)
        }

      + lifecycle_rule {
          + abort_incomplete_multipart_upload_days = (known after apply)
          + enabled                                = (known after apply)
          + id                                     = (known after apply)
          + prefix                                 = (known after apply)
          + tags                                   = (known after apply)

          + expiration {
              + date                         = (known after apply)
              + days                         = (known after apply)
              + expired_object_delete_marker = (known after apply)
            }

          + noncurrent_version_expiration {
              + days = (known after apply)
            }

          + noncurrent_version_transition {
              + days          = (known after apply)
              + storage_class = (known after apply)
            }

          + transition {
              + date          = (known after apply)
              + days          = (known after apply)
              + storage_class = (known after apply)
            }
        }

      + logging {
          + target_bucket = (known after apply)
          + target_prefix = (known after apply)
        }

      + object_lock_configuration {
          + object_lock_enabled = (known after apply)

          + rule {
              + default_retention {
                  + days  = (known after apply)
                  + mode  = (known after apply)
                  + years = (known after apply)
                }
            }
        }

      + replication_configuration {
          + role = (known after apply)

          + rules {
              + delete_marker_replication_status = (known after apply)
              + id                               = (known after apply)
              + prefix                           = (known after apply)
              + priority                         = (known after apply)
              + status                           = (known after apply)

              + destination {
                  + account_id         = (known after apply)
                  + bucket             = (known after apply)
                  + replica_kms_key_id = (known after apply)
                  + storage_class      = (known after apply)

                  + access_control_translation {
                      + owner = (known after apply)
                    }

                  + metrics {
                      + minutes = (known after apply)
                      + status  = (known after apply)
                    }

                  + replication_time {
                      + minutes = (known after apply)
                      + status  = (known after apply)
                    }
                }

              + filter {
                  + prefix = (known after apply)
                  + tags   = (known after apply)
                }

              + source_selection_criteria {
                  + sse_kms_encrypted_objects {
                      + enabled = (known after apply)
                    }
                }
            }
        }

      + server_side_encryption_configuration {
          + rule {
              + bucket_key_enabled = (known after apply)

              + apply_server_side_encryption_by_default {
                  + kms_master_key_id = (known after apply)
                  + sse_algorithm     = (known after apply)
                }
            }
        }

      + versioning {
          + enabled    = (known after apply)
          + mfa_delete = (known after apply)
        }

      + website {
          + error_document           = (known after apply)
          + index_document           = (known after apply)
          + redirect_all_requests_to = (known after apply)
          + routing_rules            = (known after apply)
        }
    }

  # module.log_bucket_demo_files.aws_s3_bucket_acl.this[0] will be created
  + resource "aws_s3_bucket_acl" "this" {
      + acl    = "log-delivery-write"
      + bucket = (known after apply)
      + id     = (known after apply)

      + access_control_policy {
          + grant {
              + permission = (known after apply)

              + grantee {
                  + display_name  = (known after apply)
                  + email_address = (known after apply)
                  + id            = (known after apply)
                  + type          = (known after apply)
                  + uri           = (known after apply)
                }
            }

          + owner {
              + display_name = (known after apply)
              + id           = (known after apply)
            }
        }
    }

  # module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0] will be created
  + resource "aws_s3_bucket_lifecycle_configuration" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + rule {
          + id     = "billing-objects-logs"
          + status = "Enabled"

          + expiration {
              + days                         = 365
              + expired_object_delete_marker = (known after apply)
            }

          + filter {
            }

          + noncurrent_version_expiration {
              + noncurrent_days = 180
            }

          + transition {
              + days          = 180
              + storage_class = "GLACIER"
            }
          + transition {
              + days          = 30
              + storage_class = "ONEZONE_IA"
            }
        }
    }

  # module.log_bucket_demo_files.aws_s3_bucket_policy.this[0] will be created
  + resource "aws_s3_bucket_policy" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)
      + policy = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "s3:*"
                      + Condition = {
                          + Bool = {
                              + "aws:SecureTransport" = [
                                  + "false",
                                ]
                            }
                        }
                      + Effect    = "Deny"
                      + Principal = {
                          + AWS = "*"
                        }
                      + Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-logs/*"
                      + Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # module.log_bucket_demo_files.aws_s3_bucket_public_access_block.this[0] will be created
  + resource "aws_s3_bucket_public_access_block" "this" {
      + block_public_acls       = true
      + block_public_policy     = true
      + bucket                  = (known after apply)
      + id                      = (known after apply)
      + ignore_public_acls      = true
      + restrict_public_buckets = true
    }

  # module.log_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0] will be created
  + resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + rule {
          + apply_server_side_encryption_by_default {
              + kms_master_key_id = "arn:aws:kms:us-east-1:52XXXXXXXX4:key/63XXXXXe9-XXXXX-XXXX-XXXXX-cXXXXXXXX61b7"
              + sse_algorithm     = "aws:kms"
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket.this[0] will be created
  + resource "aws_s3_bucket" "this" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "bb-apps-devstg-demo-files"
      + bucket_domain_name          = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = true
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = false
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "Environment" = "apps-devstg"
          + "Terraform"   = "true"
        }
      + tags_all                    = {
          + "Environment" = "apps-devstg"
          + "Terraform"   = "true"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule {
          + allowed_headers = (known after apply)
          + allowed_methods = (known after apply)
          + allowed_origins = (known after apply)
          + expose_headers  = (known after apply)
          + max_age_seconds = (known after apply)
        }

      + grant {
          + id          = (known after apply)
          + permissions = (known after apply)
          + type        = (known after apply)
          + uri         = (known after apply)
        }

      + lifecycle_rule {
          + abort_incomplete_multipart_upload_days = (known after apply)
          + enabled                                = (known after apply)
          + id                                     = (known after apply)
          + prefix                                 = (known after apply)
          + tags                                   = (known after apply)

          + expiration {
              + date                         = (known after apply)
              + days                         = (known after apply)
              + expired_object_delete_marker = (known after apply)
            }

          + noncurrent_version_expiration {
              + days = (known after apply)
            }

          + noncurrent_version_transition {
              + days          = (known after apply)
              + storage_class = (known after apply)
            }

          + transition {
              + date          = (known after apply)
              + days          = (known after apply)
              + storage_class = (known after apply)
            }
        }

      + logging {
          + target_bucket = (known after apply)
          + target_prefix = (known after apply)
        }

      + object_lock_configuration {
          + object_lock_enabled = (known after apply)

          + rule {
              + default_retention {
                  + days  = (known after apply)
                  + mode  = (known after apply)
                  + years = (known after apply)
                }
            }
        }

      + replication_configuration {
          + role = (known after apply)

          + rules {
              + delete_marker_replication_status = (known after apply)
              + id                               = (known after apply)
              + prefix                           = (known after apply)
              + priority                         = (known after apply)
              + status                           = (known after apply)

              + destination {
                  + account_id         = (known after apply)
                  + bucket             = (known after apply)
                  + replica_kms_key_id = (known after apply)
                  + storage_class      = (known after apply)

                  + access_control_translation {
                      + owner = (known after apply)
                    }

                  + metrics {
                      + minutes = (known after apply)
                      + status  = (known after apply)
                    }

                  + replication_time {
                      + minutes = (known after apply)
                      + status  = (known after apply)
                    }
                }

              + filter {
                  + prefix = (known after apply)
                  + tags   = (known after apply)
                }

              + source_selection_criteria {
                  + sse_kms_encrypted_objects {
                      + enabled = (known after apply)
                    }
                }
            }
        }

      + server_side_encryption_configuration {
          + rule {
              + bucket_key_enabled = (known after apply)

              + apply_server_side_encryption_by_default {
                  + kms_master_key_id = (known after apply)
                  + sse_algorithm     = (known after apply)
                }
            }
        }

      + versioning {
          + enabled    = (known after apply)
          + mfa_delete = (known after apply)
        }

      + website {
          + error_document           = (known after apply)
          + index_document           = (known after apply)
          + redirect_all_requests_to = (known after apply)
          + routing_rules            = (known after apply)
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_acl.this[0] will be created
  + resource "aws_s3_bucket_acl" "this" {
      + acl    = "private"
      + bucket = (known after apply)
      + id     = (known after apply)

      + access_control_policy {
          + grant {
              + permission = (known after apply)

              + grantee {
                  + display_name  = (known after apply)
                  + email_address = (known after apply)
                  + id            = (known after apply)
                  + type          = (known after apply)
                  + uri           = (known after apply)
                }
            }

          + owner {
              + display_name = (known after apply)
              + id           = (known after apply)
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0] will be created
  + resource "aws_s3_bucket_lifecycle_configuration" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + rule {
          + id     = "billing-objects"
          + status = "Enabled"

          + expiration {
              + days                         = 1825
              + expired_object_delete_marker = (known after apply)
            }

          + filter {
            }

          + noncurrent_version_expiration {
              + noncurrent_days = 1095
            }

          + transition {
              + days          = 365
              + storage_class = "GLACIER"
            }
          + transition {
              + days          = 90
              + storage_class = "ONEZONE_IA"
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_logging.this[0] will be created
  + resource "aws_s3_bucket_logging" "this" {
      + bucket        = (known after apply)
      + id            = (known after apply)
      + target_bucket = (known after apply)
      + target_prefix = "logs/"
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_policy.this[0] will be created
  + resource "aws_s3_bucket_policy" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)
      + policy = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "s3:PutObject"
                      + Condition = {
                          + StringEquals = {
                              + "s3:x-amz-acl"                                   = [
                                  + "bucket-owner-full-control",
                                ]
                              + "s3:x-amz-server-side-encryption-aws-kms-key-id" = [
                                  + "arn:aws:kms:us-east-1:52XXXXXXXX4:key/63XXXXXe9-XXXXX-XXXX-XXXXX-cXXXXXXXX61b7",
                                ]
                            }
                        }
                      + Effect    = "Allow"
                      + Principal = {
                          + AWS = "arn:aws:iam::900980591242:user/machine.s3.demo"
                        }
                      + Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/demo/*"
                      + Sid       = "AllowputObjectOwnerFullControlEncyrpted-demo-machine.s3.demo"
                    },
                  + {
                      + Action    = "s3:*"
                      + Effect    = "Allow"
                      + Principal = {
                          + AWS = "arn:aws:iam::52XXXXXXXX4:role/DevOps"
                        }
                      + Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/*"
                      + Sid       = "DevOpsRoleFullAccess"
                    },
                  + {
                      + Action    = "s3:*"
                      + Condition = {
                          + Bool = {
                              + "aws:SecureTransport" = [
                                  + "false",
                                ]
                            }
                        }
                      + Effect    = "Deny"
                      + Principal = {
                          + AWS = "*"
                        }
                      + Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/*"
                      + Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_public_access_block.this[0] will be created
  + resource "aws_s3_bucket_public_access_block" "this" {
      + block_public_acls       = true
      + block_public_policy     = true
      + bucket                  = (known after apply)
      + id                      = (known after apply)
      + ignore_public_acls      = true
      + restrict_public_buckets = true
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_replication_configuration.this[0] will be created
  + resource "aws_s3_bucket_replication_configuration" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)
      + role   = (known after apply)

      + rule {
          + id     = "ReplicationRule"
          + status = "Enabled"

          + delete_marker_replication {
              + status = "Disabled"
            }

          + destination {
              + account       = "52XXXXXXXX4"
              + bucket        = "arn:aws:s3:::bb-apps-devstg-demo-files-replica"
              + storage_class = "STANDARD"

              + access_control_translation {
                  + owner = "Destination"
                }

              + encryption_configuration {
                  + replica_kms_key_id = "arn:aws:kms:us-east-2:52XXXXXXXX4:key/c04XXXXXXXXXX-XXXXXXXXfb6e3"
                }
            }

          + filter {
            }

          + source_selection_criteria {

              + sse_kms_encrypted_objects {
                  + status = "Enabled"
                }
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0] will be created
  + resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + rule {
          + apply_server_side_encryption_by_default {
              + kms_master_key_id = "arn:aws:kms:us-east-1:52XXXXXXXX4:key/63XXXXXe9-XXXXX-XXXX-XXXXX-cXXXXXXXX61b7"
              + sse_algorithm     = "aws:kms"
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_versioning.this[0] will be created
  + resource "aws_s3_bucket_versioning" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + versioning_configuration {
          + mfa_delete = (known after apply)
          + status     = "Enabled"
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0] will be created
  + resource "aws_s3_bucket" "this" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "bb-apps-devstg-demo-files-replica"
      + bucket_domain_name          = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = true
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = false
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "Environment" = "apps-devstg"
          + "Terraform"   = "true"
        }
      + tags_all                    = {
          + "Environment" = "apps-devstg"
          + "Terraform"   = "true"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule {
          + allowed_headers = (known after apply)
          + allowed_methods = (known after apply)
          + allowed_origins = (known after apply)
          + expose_headers  = (known after apply)
          + max_age_seconds = (known after apply)
        }

      + grant {
          + id          = (known after apply)
          + permissions = (known after apply)
          + type        = (known after apply)
          + uri         = (known after apply)
        }

      + lifecycle_rule {
          + abort_incomplete_multipart_upload_days = (known after apply)
          + enabled                                = (known after apply)
          + id                                     = (known after apply)
          + prefix                                 = (known after apply)
          + tags                                   = (known after apply)

          + expiration {
              + date                         = (known after apply)
              + days                         = (known after apply)
              + expired_object_delete_marker = (known after apply)
            }

          + noncurrent_version_expiration {
              + days = (known after apply)
            }

          + noncurrent_version_transition {
              + days          = (known after apply)
              + storage_class = (known after apply)
            }

          + transition {
              + date          = (known after apply)
              + days          = (known after apply)
              + storage_class = (known after apply)
            }
        }

      + logging {
          + target_bucket = (known after apply)
          + target_prefix = (known after apply)
        }

      + object_lock_configuration {
          + object_lock_enabled = (known after apply)

          + rule {
              + default_retention {
                  + days  = (known after apply)
                  + mode  = (known after apply)
                  + years = (known after apply)
                }
            }
        }

      + replication_configuration {
          + role = (known after apply)

          + rules {
              + delete_marker_replication_status = (known after apply)
              + id                               = (known after apply)
              + prefix                           = (known after apply)
              + priority                         = (known after apply)
              + status                           = (known after apply)

              + destination {
                  + account_id         = (known after apply)
                  + bucket             = (known after apply)
                  + replica_kms_key_id = (known after apply)
                  + storage_class      = (known after apply)

                  + access_control_translation {
                      + owner = (known after apply)
                    }

                  + metrics {
                      + minutes = (known after apply)
                      + status  = (known after apply)
                    }

                  + replication_time {
                      + minutes = (known after apply)
                      + status  = (known after apply)
                    }
                }

              + filter {
                  + prefix = (known after apply)
                  + tags   = (known after apply)
                }

              + source_selection_criteria {
                  + sse_kms_encrypted_objects {
                      + enabled = (known after apply)
                    }
                }
            }
        }

      + server_side_encryption_configuration {
          + rule {
              + bucket_key_enabled = (known after apply)

              + apply_server_side_encryption_by_default {
                  + kms_master_key_id = (known after apply)
                  + sse_algorithm     = (known after apply)
                }
            }
        }

      + versioning {
          + enabled    = (known after apply)
          + mfa_delete = (known after apply)
        }

      + website {
          + error_document           = (known after apply)
          + index_document           = (known after apply)
          + redirect_all_requests_to = (known after apply)
          + routing_rules            = (known after apply)
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_acl.this[0] will be created
  + resource "aws_s3_bucket_acl" "this" {
      + acl    = "private"
      + bucket = (known after apply)
      + id     = (known after apply)

      + access_control_policy {
          + grant {
              + permission = (known after apply)

              + grantee {
                  + display_name  = (known after apply)
                  + email_address = (known after apply)
                  + id            = (known after apply)
                  + type          = (known after apply)
                  + uri           = (known after apply)
                }
            }

          + owner {
              + display_name = (known after apply)
              + id           = (known after apply)
            }
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0] will be created
  + resource "aws_s3_bucket_lifecycle_configuration" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + rule {
          + id     = "billing-objects"
          + status = "Enabled"

          + expiration {
              + days                         = 1825
              + expired_object_delete_marker = (known after apply)
            }

          + filter {
            }

          + noncurrent_version_expiration {
              + noncurrent_days = 1095
            }

          + transition {
              + days          = 365
              + storage_class = "GLACIER"
            }
          + transition {
              + days          = 90
              + storage_class = "ONEZONE_IA"
            }
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_policy.this[0] will be created
  + resource "aws_s3_bucket_policy" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)
      + policy = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "s3:*"
                      + Condition = {
                          + Bool = {
                              + "aws:SecureTransport" = [
                                  + "false",
                                ]
                            }
                        }
                      + Effect    = "Deny"
                      + Principal = {
                          + AWS = "*"
                        }
                      + Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-replica/*"
                      + Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_public_access_block.this[0] will be created
  + resource "aws_s3_bucket_public_access_block" "this" {
      + block_public_acls       = true
      + block_public_policy     = true
      + bucket                  = (known after apply)
      + id                      = (known after apply)
      + ignore_public_acls      = true
      + restrict_public_buckets = true
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_server_side_encryption_configuration.this[0] will be created
  + resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + rule {
          + apply_server_side_encryption_by_default {
              + kms_master_key_id = "arn:aws:kms:us-east-2:52XXXXXXXX4:key/c04XXXXXXXXXX-XXXXXXXXfb6e3"
              + sse_algorithm     = "aws:kms"
            }
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_versioning.this[0] will be created
  + resource "aws_s3_bucket_versioning" "this" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + versioning_configuration {
          + mfa_delete = (known after apply)
          + status     = "Enabled"
        }
    }

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

Changes to Outputs:
  + s3_bucket_demo_files_arn                        = (known after apply)
  + s3_bucket_demo_files_bucket_domain_name         = (known after apply)
  + s3_bucket_demo_files_bucket_log_domain_name     = (known after apply)
  + s3_bucket_demo_files_bucket_replica_domain_name = (known after apply)
  + s3_bucket_demo_files_id                         = (known after apply)
  + s3_bucket_demo_files_log_arn                    = (known after apply)
  + s3_bucket_demo_files_log_id                     = (known after apply)
  + s3_bucket_demo_files_log_region                 = (known after apply)
  + s3_bucket_demo_files_region                     = (known after apply)
  + s3_bucket_demo_files_replica_arn                = (known after apply)
  + s3_bucket_demo_files_replica_id                 = (known after apply)
  + s3_bucket_demo_files_replica_region             = (known after apply)

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

module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0]: Creating...
aws_iam_role.replication: Creating...
module.s3_bucket_demo_files.aws_s3_bucket.this[0]: Creating...
module.log_bucket_demo_files.aws_s3_bucket.this[0]: Creating...
aws_iam_policy.replication: Creating...
aws_iam_policy.replication: Creation complete after 2s [id=arn:aws:iam::52XXXXXXXX4:policy/bb-apps-devstg-demo-files-s3-bucket-replication]
aws_iam_role.replication: Creation complete after 3s [id=bb-apps-devstg-demo-files-s3-bucket-replication]
aws_iam_policy_attachment.replication: Creating...
aws_iam_policy_attachment.replication: Creation complete after 1s [id=bb-apps-devstg-demo-files-s3-bucket-replication]
module.log_bucket_demo_files.aws_s3_bucket.this[0]: Creation complete after 6s [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket.this[0]: Creation complete after 6s [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_policy.this[0]: Creating...
module.log_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_versioning.this[0]: Creating...
module.log_bucket_demo_files.aws_s3_bucket_acl.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_acl.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_policy.this[0]: Creating...
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Creating...
module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0]: Creation complete after 7s [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files_replica.aws_s3_bucket_server_side_encryption_configuration.this[0]: Creating...
module.s3_bucket_demo_files_replica.aws_s3_bucket_acl.this[0]: Creating...
module.log_bucket_demo_files.aws_s3_bucket_policy.this[0]: Creation complete after 0s [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files_replica.aws_s3_bucket_versioning.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_policy.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files_replica.aws_s3_bucket_policy.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files-logs]
module.log_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_acl.this[0]: Creation complete after 2s [id=bb-apps-devstg-demo-files,private]
module.log_bucket_demo_files.aws_s3_bucket_acl.this[0]: Creation complete after 2s [id=bb-apps-devstg-demo-files-logs,log-delivery-write]
module.s3_bucket_demo_files_replica.aws_s3_bucket_acl.this[0]: Creation complete after 2s [id=bb-apps-devstg-demo-files-replica,private]
module.s3_bucket_demo_files.aws_s3_bucket_logging.this[0]: Creating...
module.s3_bucket_demo_files_replica.aws_s3_bucket_server_side_encryption_configuration.this[0]: Creation complete after 2s [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files_replica.aws_s3_bucket_policy.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_logging.this[0]: Creation complete after 0s [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files_replica.aws_s3_bucket_public_access_block.this[0]: Creating...
module.s3_bucket_demo_files_replica.aws_s3_bucket_public_access_block.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_versioning.this[0]: Creation complete after 3s [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files.aws_s3_bucket_replication_configuration.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Creating...
module.s3_bucket_demo_files_replica.aws_s3_bucket_versioning.this[0]: Creation complete after 4s [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Creating...
module.s3_bucket_demo_files.aws_s3_bucket_replication_configuration.this[0]: Creation complete after 1s [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [10s elapsed]
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [10s elapsed]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [10s elapsed]
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [20s elapsed]
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [20s elapsed]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [20s elapsed]
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [30s elapsed]
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [30s elapsed]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Still creating... [30s elapsed]
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Creation complete after 34s [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Creation complete after 32s [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Creation complete after 34s [id=bb-apps-devstg-demo-files]
Releasing state lock. This may take a few moments...

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

Outputs:

s3_bucket_demo_files_arn = "arn:aws:s3:::bb-apps-devstg-demo-files"
s3_bucket_demo_files_bucket_domain_name = "bb-apps-devstg-demo-files.s3.amazonaws.com"
s3_bucket_demo_files_bucket_log_domain_name = "bb-apps-devstg-demo-files-logs.s3.amazonaws.com"
s3_bucket_demo_files_bucket_replica_domain_name = "bb-apps-devstg-demo-files-replica.s3.amazonaws.com"
s3_bucket_demo_files_id = "bb-apps-devstg-demo-files"
s3_bucket_demo_files_log_arn = "arn:aws:s3:::bb-apps-devstg-demo-files-logs"
s3_bucket_demo_files_log_id = "bb-apps-devstg-demo-files-logs"
s3_bucket_demo_files_log_region = "us-east-1"
s3_bucket_demo_files_region = "us-east-1"
s3_bucket_demo_files_replica_arn = "arn:aws:s3:::bb-apps-devstg-demo-files-replica"
s3_bucket_demo_files_replica_id = "bb-apps-devstg-demo-files-replica"
s3_bucket_demo_files_replica_region = "us-east-2"

@rodriguez-matias
Copy link
Contributor Author

$ leverage terraform destroy

[14:48:33]    INFO	Attempting to get temporary credentials for apps-devstg account.
[14:48:36]    INFO	Using already configured temporary credentials.
[14:48:36]    INFO	Attempting to get temporary credentials for security account.
[14:48:38]    INFO	Using already configured temporary credentials.
Acquiring state lock. This may take a few moments...
aws_iam_policy.replication: Refreshing state... [id=arn:aws:iam::52XXXXXXXXX4:policy/bb-apps-devstg-demo-files-s3-bucket-replication]
module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-replica]
module.log_bucket_demo_files.aws_s3_bucket.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
aws_iam_role.replication: Refreshing state... [id=bb-apps-devstg-demo-files-s3-bucket-replication]
aws_iam_policy_attachment.replication: Refreshing state... [id=bb-apps-devstg-demo-files-s3-bucket-replication]
module.s3_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files.aws_s3_bucket_acl.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files,private]
module.log_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket_versioning.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_acl.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-logs,log-delivery-write]
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket_policy.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_policy.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files_replica.aws_s3_bucket_server_side_encryption_configuration.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files_replica.aws_s3_bucket_acl.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-replica,private]
module.s3_bucket_demo_files_replica.aws_s3_bucket_versioning.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files_replica.aws_s3_bucket_policy.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket_logging.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files_replica.aws_s3_bucket_public_access_block.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files.aws_s3_bucket_replication_configuration.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Refreshing state... [id=bb-apps-devstg-demo-files-replica]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.replication will be destroyed
  - resource "aws_iam_policy" "replication" {
      - arn       = "arn:aws:iam::52XXXXXXXXX4:policy/bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - id        = "arn:aws:iam::52XXXXXXXXX4:policy/bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - name      = "bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - path      = "/" -> null
      - policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = [
                          - "s3:ListBucket",
                          - "s3:GetReplicationConfiguration",
                          - "s3:GetObjectVersionForReplication",
                          - "s3:GetObjectVersionAcl",
                          - "s3:GetObjectVersionTagging",
                          - "s3:GetObjectRetention",
                          - "s3:GetObjectLegalHold",
                        ]
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:s3:::bb-apps-devstg-demo-files",
                          - "arn:aws:s3:::bb-apps-devstg-demo-files/*",
                        ]
                    },
                  - {
                      - Action    = [
                          - "s3:ReplicateObject",
                          - "s3:ReplicateDelete",
                          - "s3:ReplicateTags",
                          - "s3:GetObjectVersionTagging",
                          - "s3:ObjectOwnerOverrideToBucketOwner",
                        ]
                      - Condition = {
                          - StringLikeIfExists = {
                              - "s3:x-amz-server-side-encryption"                = [
                                  - "aws:kms",
                                  - "AES256",
                                ]
                              - "s3:x-amz-server-side-encryption-aws-kms-key-id" = [
                                  - "arn:aws:kms:us-east-2:52XXXXXXXXX4:key/c0XXXXX-XXXX-XXXX-XXXXXe3",
                                ]
                            }
                        }
                      - Effect    = "Allow"
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-replica/*"
                    },
                  - {
                      - Action    = [
                          - "kms:Decrypt",
                        ]
                      - Condition = {
                          - StringLike = {
                              - "kms:EncryptionContext:aws:s3:arn" = [
                                  - "arn:aws:s3:::bb-apps-devstg-demo-files/*",
                                ]
                              - "kms:ViaService"                   = "s3.us-east-1.amazonaws.com"
                            }
                        }
                      - Effect    = "Allow"
                      - Resource  = [
                          - "arn:aws:kms:us-east-1:52XXXXXXXXX4:key/63XXXX-XXXX-XXXX-XXXXb7",
                        ]
                    },
                  - {
                      - Action    = [
                          - "kms:Encrypt",
                        ]
                      - Condition = {
                          - StringLike = {
                              - "kms:EncryptionContext:aws:s3:arn" = [
                                  - "arn:aws:s3:::bb-apps-devstg-demo-files-replica/*",
                                ]
                              - "kms:ViaService"                   = "s3.us-east-2.amazonaws.com"
                            }
                        }
                      - Effect    = "Allow"
                      - Resource  = [
                          - "arn:aws:kms:us-east-2:52XXXXXXXXX4:key/c0XXXXX-XXXX-XXXX-XXXXXe3",
                        ]
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - policy_id = "ANPXXXXXXXXXUB7EO" -> null
      - tags      = {} -> null
      - tags_all  = {} -> null
    }

  # aws_iam_policy_attachment.replication will be destroyed
  - resource "aws_iam_policy_attachment" "replication" {
      - groups     = [] -> null
      - id         = "bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - name       = "bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - policy_arn = "arn:aws:iam::52XXXXXXXXX4:policy/bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - roles      = [
          - "bb-apps-devstg-demo-files-s3-bucket-replication",
        ] -> null
      - users      = [] -> null
    }

  # aws_iam_role.replication will be destroyed
  - resource "aws_iam_role" "replication" {
      - arn                   = "arn:aws:iam::52XXXXXXXXX4:role/bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - Service = "s3.amazonaws.com"
                        }
                      - Sid       = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2022-07-23T14:45:51Z" -> null
      - force_detach_policies = false -> null
      - id                    = "bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - managed_policy_arns   = [
          - "arn:aws:iam::52XXXXXXXXX4:policy/bb-apps-devstg-demo-files-s3-bucket-replication",
        ] -> null
      - max_session_duration  = 3600 -> null
      - name                  = "bb-apps-devstg-demo-files-s3-bucket-replication" -> null
      - path                  = "/" -> null
      - tags                  = {} -> null
      - tags_all              = {} -> null
      - unique_id             = "AROAXXXXXXXXXQ2LJ" -> null

      - inline_policy {}
    }

  # module.log_bucket_demo_files.aws_s3_bucket.this[0] will be destroyed
  - resource "aws_s3_bucket" "this" {
      - arn                         = "arn:aws:s3:::bb-apps-devstg-demo-files-logs" -> null
      - bucket                      = "bb-apps-devstg-demo-files-logs" -> null
      - bucket_domain_name          = "bb-apps-devstg-demo-files-logs.s3.amazonaws.com" -> null
      - bucket_regional_domain_name = "bb-apps-devstg-demo-files-logs.s3.amazonaws.com" -> null
      - force_destroy               = true -> null
      - hosted_zone_id              = "Z3AXXXXXXXXSTF" -> null
      - id                          = "bb-apps-devstg-demo-files-logs" -> null
      - object_lock_enabled         = false -> null
      - policy                      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = "false"
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = {
                          - AWS = "*"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-logs/*"
                      - Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - region                      = "us-east-1" -> null
      - request_payer               = "BucketOwner" -> null
      - tags                        = {
          - "Environment" = "apps-devstg"
          - "Terraform"   = "true"
        } -> null
      - tags_all                    = {
          - "Environment" = "apps-devstg"
          - "Terraform"   = "true"
        } -> null

      - grant {
          - permissions = [
              - "READ_ACP",
              - "WRITE",
            ] -> null
          - type        = "Group" -> null
          - uri         = "http://acs.amazonaws.com/groups/s3/LogDelivery" -> null
        }
      - grant {
          - id          = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
          - permissions = [
              - "FULL_CONTROL",
            ] -> null
          - type        = "CanonicalUser" -> null
        }

      - lifecycle_rule {
          - abort_incomplete_multipart_upload_days = 0 -> null
          - enabled                                = true -> null
          - id                                     = "billing-objects-logs" -> null
          - tags                                   = {} -> null

          - expiration {
              - days                         = 365 -> null
              - expired_object_delete_marker = false -> null
            }

          - noncurrent_version_expiration {
              - days = 180 -> null
            }

          - transition {
              - days          = 180 -> null
              - storage_class = "GLACIER" -> null
            }
          - transition {
              - days          = 30 -> null
              - storage_class = "ONEZONE_IA" -> null
            }
        }

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - kms_master_key_id = "arn:aws:kms:us-east-1:52XXXXXXXXX4:key/63XXXX-XXXX-XXXX-XXXXb7" -> null
                  - sse_algorithm     = "aws:kms" -> null
                }
            }
        }

      - versioning {
          - enabled    = false -> null
          - mfa_delete = false -> null
        }
    }

  # module.log_bucket_demo_files.aws_s3_bucket_acl.this[0] will be destroyed
  - resource "aws_s3_bucket_acl" "this" {
      - acl    = "log-delivery-write" -> null
      - bucket = "bb-apps-devstg-demo-files-logs" -> null
      - id     = "bb-apps-devstg-demo-files-logs,log-delivery-write" -> null

      - access_control_policy {
          - grant {
              - permission = "READ_ACP" -> null

              - grantee {
                  - type = "Group" -> null
                  - uri  = "http://acs.amazonaws.com/groups/s3/LogDelivery" -> null
                }
            }
          - grant {
              - permission = "WRITE" -> null

              - grantee {
                  - type = "Group" -> null
                  - uri  = "http://acs.amazonaws.com/groups/s3/LogDelivery" -> null
                }
            }
          - grant {
              - permission = "FULL_CONTROL" -> null

              - grantee {
                  - display_name = "aws+apps-devstg" -> null
                  - id           = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
                  - type         = "CanonicalUser" -> null
                }
            }

          - owner {
              - display_name = "aws+apps-devstg" -> null
              - id           = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
            }
        }
    }

  # module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0] will be destroyed
  - resource "aws_s3_bucket_lifecycle_configuration" "this" {
      - bucket = "bb-apps-devstg-demo-files-logs" -> null
      - id     = "bb-apps-devstg-demo-files-logs" -> null

      - rule {
          - id     = "billing-objects-logs" -> null
          - status = "Enabled" -> null

          - expiration {
              - days                         = 365 -> null
              - expired_object_delete_marker = false -> null
            }

          - filter {
            }

          - noncurrent_version_expiration {
              - noncurrent_days = 180 -> null
            }

          - transition {
              - days          = 180 -> null
              - storage_class = "GLACIER" -> null
            }
          - transition {
              - days          = 30 -> null
              - storage_class = "ONEZONE_IA" -> null
            }
        }
    }

  # module.log_bucket_demo_files.aws_s3_bucket_policy.this[0] will be destroyed
  - resource "aws_s3_bucket_policy" "this" {
      - bucket = "bb-apps-devstg-demo-files-logs" -> null
      - id     = "bb-apps-devstg-demo-files-logs" -> null
      - policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = [
                                  - "false",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = {
                          - AWS = "*"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-logs/*"
                      - Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # module.log_bucket_demo_files.aws_s3_bucket_public_access_block.this[0] will be destroyed
  - resource "aws_s3_bucket_public_access_block" "this" {
      - block_public_acls       = true -> null
      - block_public_policy     = true -> null
      - bucket                  = "bb-apps-devstg-demo-files-logs" -> null
      - id                      = "bb-apps-devstg-demo-files-logs" -> null
      - ignore_public_acls      = true -> null
      - restrict_public_buckets = true -> null
    }

  # module.log_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0] will be destroyed
  - resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
      - bucket = "bb-apps-devstg-demo-files-logs" -> null
      - id     = "bb-apps-devstg-demo-files-logs" -> null

      - rule {
          - bucket_key_enabled = false -> null

          - apply_server_side_encryption_by_default {
              - kms_master_key_id = "arn:aws:kms:us-east-1:52XXXXXXXXX4:key/63XXXX-XXXX-XXXX-XXXXb7" -> null
              - sse_algorithm     = "aws:kms" -> null
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket.this[0] will be destroyed
  - resource "aws_s3_bucket" "this" {
      - arn                         = "arn:aws:s3:::bb-apps-devstg-demo-files" -> null
      - bucket                      = "bb-apps-devstg-demo-files" -> null
      - bucket_domain_name          = "bb-apps-devstg-demo-files.s3.amazonaws.com" -> null
      - bucket_regional_domain_name = "bb-apps-devstg-demo-files.s3.amazonaws.com" -> null
      - force_destroy               = true -> null
      - hosted_zone_id              = "Z3AXXXXXXXXSTF" -> null
      - id                          = "bb-apps-devstg-demo-files" -> null
      - object_lock_enabled         = false -> null
      - policy                      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:PutObject"
                      - Condition = {
                          - StringEquals = {
                              - "s3:x-amz-acl"                                   = "bucket-owner-full-control"
                              - "s3:x-amz-server-side-encryption-aws-kms-key-id" = "arn:aws:kms:us-east-1:52XXXXXXXXX4:key/63XXXX-XXXX-XXXX-XXXXb7"
                            }
                        }
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::90XXXXXXXXX2:user/machine.s3.demo"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/demo/*"
                      - Sid       = "AllowputObjectOwnerFullControlEncyrpted-demo-machine.s3.demo"
                    },
                  - {
                      - Action    = "s3:*"
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::52XXXXXXXXX4:role/DevOps"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/*"
                      - Sid       = "DevOpsRoleFullAccess"
                    },
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = "false"
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = {
                          - AWS = "*"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/*"
                      - Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - region                      = "us-east-1" -> null
      - request_payer               = "BucketOwner" -> null
      - tags                        = {
          - "Environment" = "apps-devstg"
          - "Terraform"   = "true"
        } -> null
      - tags_all                    = {
          - "Environment" = "apps-devstg"
          - "Terraform"   = "true"
        } -> null

      - grant {
          - id          = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
          - permissions = [
              - "FULL_CONTROL",
            ] -> null
          - type        = "CanonicalUser" -> null
        }

      - lifecycle_rule {
          - abort_incomplete_multipart_upload_days = 0 -> null
          - enabled                                = true -> null
          - id                                     = "billing-objects" -> null
          - tags                                   = {} -> null

          - expiration {
              - days                         = 1825 -> null
              - expired_object_delete_marker = false -> null
            }

          - noncurrent_version_expiration {
              - days = 1095 -> null
            }

          - transition {
              - days          = 365 -> null
              - storage_class = "GLACIER" -> null
            }
          - transition {
              - days          = 90 -> null
              - storage_class = "ONEZONE_IA" -> null
            }
        }

      - logging {
          - target_bucket = "bb-apps-devstg-demo-files-logs" -> null
          - target_prefix = "logs/" -> null
        }

      - replication_configuration {
          - role = "arn:aws:iam::52XXXXXXXXX4:role/bb-apps-devstg-demo-files-s3-bucket-replication" -> null

          - rules {
              - id       = "ReplicationRule" -> null
              - priority = 0 -> null
              - status   = "Enabled" -> null

              - destination {
                  - account_id         = "52XXXXXXXXX4" -> null
                  - bucket             = "arn:aws:s3:::bb-apps-devstg-demo-files-replica" -> null
                  - replica_kms_key_id = "arn:aws:kms:us-east-2:52XXXXXXXXX4:key/c0XXXXX-XXXX-XXXX-XXXXXe3" -> null
                  - storage_class      = "STANDARD" -> null

                  - access_control_translation {
                      - owner = "Destination" -> null
                    }
                }

              - filter {}

              - source_selection_criteria {
                  - sse_kms_encrypted_objects {
                      - enabled = true -> null
                    }
                }
            }
        }

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - kms_master_key_id = "arn:aws:kms:us-east-1:52XXXXXXXXX4:key/63XXXX-XXXX-XXXX-XXXXb7" -> null
                  - sse_algorithm     = "aws:kms" -> null
                }
            }
        }

      - versioning {
          - enabled    = true -> null
          - mfa_delete = false -> null
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_acl.this[0] will be destroyed
  - resource "aws_s3_bucket_acl" "this" {
      - acl    = "private" -> null
      - bucket = "bb-apps-devstg-demo-files" -> null
      - id     = "bb-apps-devstg-demo-files,private" -> null

      - access_control_policy {
          - grant {
              - permission = "FULL_CONTROL" -> null

              - grantee {
                  - display_name = "aws+apps-devstg" -> null
                  - id           = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
                  - type         = "CanonicalUser" -> null
                }
            }

          - owner {
              - display_name = "aws+apps-devstg" -> null
              - id           = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0] will be destroyed
  - resource "aws_s3_bucket_lifecycle_configuration" "this" {
      - bucket = "bb-apps-devstg-demo-files" -> null
      - id     = "bb-apps-devstg-demo-files" -> null

      - rule {
          - id     = "billing-objects" -> null
          - status = "Enabled" -> null

          - expiration {
              - days                         = 1825 -> null
              - expired_object_delete_marker = false -> null
            }

          - filter {
            }

          - noncurrent_version_expiration {
              - noncurrent_days = 1095 -> null
            }

          - transition {
              - days          = 365 -> null
              - storage_class = "GLACIER" -> null
            }
          - transition {
              - days          = 90 -> null
              - storage_class = "ONEZONE_IA" -> null
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_logging.this[0] will be destroyed
  - resource "aws_s3_bucket_logging" "this" {
      - bucket        = "bb-apps-devstg-demo-files" -> null
      - id            = "bb-apps-devstg-demo-files" -> null
      - target_bucket = "bb-apps-devstg-demo-files-logs" -> null
      - target_prefix = "logs/" -> null
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_policy.this[0] will be destroyed
  - resource "aws_s3_bucket_policy" "this" {
      - bucket = "bb-apps-devstg-demo-files" -> null
      - id     = "bb-apps-devstg-demo-files" -> null
      - policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:PutObject"
                      - Condition = {
                          - StringEquals = {
                              - "s3:x-amz-acl"                                   = [
                                  - "bucket-owner-full-control",
                                ]
                              - "s3:x-amz-server-side-encryption-aws-kms-key-id" = [
                                  - "arn:aws:kms:us-east-1:52XXXXXXXXX4:key/63XXXX-XXXX-XXXX-XXXXb7",
                                ]
                            }
                        }
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::90XXXXXXXXX2:user/machine.s3.demo"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/demo/*"
                      - Sid       = "AllowputObjectOwnerFullControlEncyrpted-demo-machine.s3.demo"
                    },
                  - {
                      - Action    = "s3:*"
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::52XXXXXXXXX4:role/DevOps"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/*"
                      - Sid       = "DevOpsRoleFullAccess"
                    },
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = [
                                  - "false",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = {
                          - AWS = "*"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files/*"
                      - Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_public_access_block.this[0] will be destroyed
  - resource "aws_s3_bucket_public_access_block" "this" {
      - block_public_acls       = true -> null
      - block_public_policy     = true -> null
      - bucket                  = "bb-apps-devstg-demo-files" -> null
      - id                      = "bb-apps-devstg-demo-files" -> null
      - ignore_public_acls      = true -> null
      - restrict_public_buckets = true -> null
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_replication_configuration.this[0] will be destroyed
  - resource "aws_s3_bucket_replication_configuration" "this" {
      - bucket = "bb-apps-devstg-demo-files" -> null
      - id     = "bb-apps-devstg-demo-files" -> null
      - role   = "arn:aws:iam::52XXXXXXXXX4:role/bb-apps-devstg-demo-files-s3-bucket-replication" -> null

      - rule {
          - id       = "ReplicationRule" -> null
          - priority = 0 -> null
          - status   = "Enabled" -> null

          - delete_marker_replication {
              - status = "Disabled" -> null
            }

          - destination {
              - account       = "52XXXXXXXXX4" -> null
              - bucket        = "arn:aws:s3:::bb-apps-devstg-demo-files-replica" -> null
              - storage_class = "STANDARD" -> null

              - access_control_translation {
                  - owner = "Destination" -> null
                }

              - encryption_configuration {
                  - replica_kms_key_id = "arn:aws:kms:us-east-2:52XXXXXXXXX4:key/c0XXXXX-XXXX-XXXX-XXXXXe3" -> null
                }
            }

          - filter {
            }

          - source_selection_criteria {

              - sse_kms_encrypted_objects {
                  - status = "Enabled" -> null
                }
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0] will be destroyed
  - resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
      - bucket = "bb-apps-devstg-demo-files" -> null
      - id     = "bb-apps-devstg-demo-files" -> null

      - rule {
          - bucket_key_enabled = false -> null

          - apply_server_side_encryption_by_default {
              - kms_master_key_id = "arn:aws:kms:us-east-1:52XXXXXXXXX4:key/63XXXX-XXXX-XXXX-XXXXb7" -> null
              - sse_algorithm     = "aws:kms" -> null
            }
        }
    }

  # module.s3_bucket_demo_files.aws_s3_bucket_versioning.this[0] will be destroyed
  - resource "aws_s3_bucket_versioning" "this" {
      - bucket = "bb-apps-devstg-demo-files" -> null
      - id     = "bb-apps-devstg-demo-files" -> null

      - versioning_configuration {
          - status = "Enabled" -> null
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0] will be destroyed
  - resource "aws_s3_bucket" "this" {
      - arn                         = "arn:aws:s3:::bb-apps-devstg-demo-files-replica" -> null
      - bucket                      = "bb-apps-devstg-demo-files-replica" -> null
      - bucket_domain_name          = "bb-apps-devstg-demo-files-replica.s3.amazonaws.com" -> null
      - bucket_regional_domain_name = "bb-apps-devstg-demo-files-replica.s3.us-east-2.amazonaws.com" -> null
      - force_destroy               = true -> null
      - hosted_zone_id              = "Z2XXXXXXXXXXGLX" -> null
      - id                          = "bb-apps-devstg-demo-files-replica" -> null
      - object_lock_enabled         = false -> null
      - policy                      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = "false"
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = {
                          - AWS = "*"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-replica/*"
                      - Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - region                      = "us-east-2" -> null
      - request_payer               = "BucketOwner" -> null
      - tags                        = {
          - "Environment" = "apps-devstg"
          - "Terraform"   = "true"
        } -> null
      - tags_all                    = {
          - "Environment" = "apps-devstg"
          - "Terraform"   = "true"
        } -> null

      - grant {
          - id          = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
          - permissions = [
              - "FULL_CONTROL",
            ] -> null
          - type        = "CanonicalUser" -> null
        }

      - lifecycle_rule {
          - abort_incomplete_multipart_upload_days = 0 -> null
          - enabled                                = true -> null
          - id                                     = "billing-objects" -> null
          - tags                                   = {} -> null

          - expiration {
              - days                         = 1825 -> null
              - expired_object_delete_marker = false -> null
            }

          - noncurrent_version_expiration {
              - days = 1095 -> null
            }

          - transition {
              - days          = 365 -> null
              - storage_class = "GLACIER" -> null
            }
          - transition {
              - days          = 90 -> null
              - storage_class = "ONEZONE_IA" -> null
            }
        }

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - kms_master_key_id = "arn:aws:kms:us-east-2:52XXXXXXXXX4:key/c0XXXXX-XXXX-XXXX-XXXXXe3" -> null
                  - sse_algorithm     = "aws:kms" -> null
                }
            }
        }

      - versioning {
          - enabled    = true -> null
          - mfa_delete = false -> null
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_acl.this[0] will be destroyed
  - resource "aws_s3_bucket_acl" "this" {
      - acl    = "private" -> null
      - bucket = "bb-apps-devstg-demo-files-replica" -> null
      - id     = "bb-apps-devstg-demo-files-replica,private" -> null

      - access_control_policy {
          - grant {
              - permission = "FULL_CONTROL" -> null

              - grantee {
                  - id   = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
                  - type = "CanonicalUser" -> null
                }
            }

          - owner {
              - id = "3a99800XXXXXXXXXXXXXXXXX545538a" -> null
            }
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0] will be destroyed
  - resource "aws_s3_bucket_lifecycle_configuration" "this" {
      - bucket = "bb-apps-devstg-demo-files-replica" -> null
      - id     = "bb-apps-devstg-demo-files-replica" -> null

      - rule {
          - id     = "billing-objects" -> null
          - status = "Enabled" -> null

          - expiration {
              - days                         = 1825 -> null
              - expired_object_delete_marker = false -> null
            }

          - filter {
            }

          - noncurrent_version_expiration {
              - noncurrent_days = 1095 -> null
            }

          - transition {
              - days          = 365 -> null
              - storage_class = "GLACIER" -> null
            }
          - transition {
              - days          = 90 -> null
              - storage_class = "ONEZONE_IA" -> null
            }
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_policy.this[0] will be destroyed
  - resource "aws_s3_bucket_policy" "this" {
      - bucket = "bb-apps-devstg-demo-files-replica" -> null
      - id     = "bb-apps-devstg-demo-files-replica" -> null
      - policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = [
                                  - "false",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = {
                          - AWS = "*"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-demo-files-replica/*"
                      - Sid       = "EnforceSSlRequestsOnly"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_public_access_block.this[0] will be destroyed
  - resource "aws_s3_bucket_public_access_block" "this" {
      - block_public_acls       = true -> null
      - block_public_policy     = true -> null
      - bucket                  = "bb-apps-devstg-demo-files-replica" -> null
      - id                      = "bb-apps-devstg-demo-files-replica" -> null
      - ignore_public_acls      = true -> null
      - restrict_public_buckets = true -> null
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_server_side_encryption_configuration.this[0] will be destroyed
  - resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
      - bucket = "bb-apps-devstg-demo-files-replica" -> null
      - id     = "bb-apps-devstg-demo-files-replica" -> null

      - rule {
          - bucket_key_enabled = false -> null

          - apply_server_side_encryption_by_default {
              - kms_master_key_id = "arn:aws:kms:us-east-2:52XXXXXXXXX4:key/c0XXXXX-XXXX-XXXX-XXXXXe3" -> null
              - sse_algorithm     = "aws:kms" -> null
            }
        }
    }

  # module.s3_bucket_demo_files_replica.aws_s3_bucket_versioning.this[0] will be destroyed
  - resource "aws_s3_bucket_versioning" "this" {
      - bucket = "bb-apps-devstg-demo-files-replica" -> null
      - id     = "bb-apps-devstg-demo-files-replica" -> null

      - versioning_configuration {
          - status = "Enabled" -> null
        }
    }

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

Changes to Outputs:
  - s3_bucket_demo_files_arn                        = "arn:aws:s3:::bb-apps-devstg-demo-files" -> null
  - s3_bucket_demo_files_bucket_domain_name         = "bb-apps-devstg-demo-files.s3.amazonaws.com" -> null
  - s3_bucket_demo_files_bucket_log_domain_name     = "bb-apps-devstg-demo-files-logs.s3.amazonaws.com" -> null
  - s3_bucket_demo_files_bucket_replica_domain_name = "bb-apps-devstg-demo-files-replica.s3.amazonaws.com" -> null
  - s3_bucket_demo_files_id                         = "bb-apps-devstg-demo-files" -> null
  - s3_bucket_demo_files_log_arn                    = "arn:aws:s3:::bb-apps-devstg-demo-files-logs" -> null
  - s3_bucket_demo_files_log_id                     = "bb-apps-devstg-demo-files-logs" -> null
  - s3_bucket_demo_files_log_region                 = "us-east-1" -> null
  - s3_bucket_demo_files_region                     = "us-east-1" -> null
  - s3_bucket_demo_files_replica_arn                = "arn:aws:s3:::bb-apps-devstg-demo-files-replica" -> null
  - s3_bucket_demo_files_replica_id                 = "bb-apps-devstg-demo-files-replica" -> null
  - s3_bucket_demo_files_replica_region             = "us-east-2" -> null

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

module.s3_bucket_demo_files_replica.aws_s3_bucket_acl.this[0]: Destroying... [id=bb-apps-devstg-demo-files-replica,private]
module.s3_bucket_demo_files_replica.aws_s3_bucket_public_access_block.this[0]: Destroying... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Destroying... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files_replica.aws_s3_bucket_server_side_encryption_configuration.this[0]: Destroying... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files_replica.aws_s3_bucket_acl.this[0]: Destruction complete after 0s
module.log_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Destroying... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket_logging.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
module.log_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Destroying... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files.aws_s3_bucket_acl.this[0]: Destroying... [id=bb-apps-devstg-demo-files,private]
module.s3_bucket_demo_files.aws_s3_bucket_acl.this[0]: Destruction complete after 0s
aws_iam_policy_attachment.replication: Destroying... [id=bb-apps-devstg-demo-files-s3-bucket-replication]
module.s3_bucket_demo_files_replica.aws_s3_bucket_lifecycle_configuration.this[0]: Destruction complete after 1s
module.log_bucket_demo_files.aws_s3_bucket_acl.this[0]: Destroying... [id=bb-apps-devstg-demo-files-logs,log-delivery-write]
module.log_bucket_demo_files.aws_s3_bucket_acl.this[0]: Destruction complete after 0s
module.s3_bucket_demo_files.aws_s3_bucket_replication_configuration.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
aws_iam_policy_attachment.replication: Destruction complete after 1s
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Destroying... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files.aws_s3_bucket_logging.this[0]: Destruction complete after 2s
module.log_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Destruction complete after 2s
module.s3_bucket_demo_files_replica.aws_s3_bucket_versioning.this[0]: Destroying... [id=bb-apps-devstg-demo-files-replica]
aws_iam_policy.replication: Destroying... [id=arn:aws:iam::52XXXXXXXXX4:policy/bb-apps-devstg-demo-files-s3-bucket-replication]
module.s3_bucket_demo_files_replica.aws_s3_bucket_public_access_block.this[0]: Destruction complete after 2s
module.log_bucket_demo_files.aws_s3_bucket_policy.this[0]: Destroying... [id=bb-apps-devstg-demo-files-logs]
module.log_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Destruction complete after 2s
module.log_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Destruction complete after 1s
module.s3_bucket_demo_files_replica.aws_s3_bucket_policy.this[0]: Destroying... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_replication_configuration.this[0]: Destruction complete after 1s
aws_iam_role.replication: Destroying... [id=bb-apps-devstg-demo-files-s3-bucket-replication]
module.s3_bucket_demo_files.aws_s3_bucket_lifecycle_configuration.this[0]: Destruction complete after 2s
module.s3_bucket_demo_files.aws_s3_bucket_versioning.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files_replica.aws_s3_bucket_versioning.this[0]: Destruction complete after 0s
aws_iam_policy.replication: Destruction complete after 0s
module.log_bucket_demo_files.aws_s3_bucket_policy.this[0]: Destruction complete after 0s
module.log_bucket_demo_files.aws_s3_bucket.this[0]: Destroying... [id=bb-apps-devstg-demo-files-logs]
module.s3_bucket_demo_files_replica.aws_s3_bucket_server_side_encryption_configuration.this[0]: Destruction complete after 2s
module.s3_bucket_demo_files.aws_s3_bucket_versioning.this[0]: Destruction complete after 0s
module.s3_bucket_demo_files.aws_s3_bucket_server_side_encryption_configuration.this[0]: Destruction complete after 2s
module.log_bucket_demo_files.aws_s3_bucket.this[0]: Destruction complete after 0s
module.s3_bucket_demo_files_replica.aws_s3_bucket_policy.this[0]: Destruction complete after 1s
module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0]: Destroying... [id=bb-apps-devstg-demo-files-replica]
module.s3_bucket_demo_files.aws_s3_bucket_public_access_block.this[0]: Destruction complete after 3s
module.s3_bucket_demo_files.aws_s3_bucket_policy.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files_replica.aws_s3_bucket.this[0]: Destruction complete after 0s
aws_iam_role.replication: Destruction complete after 1s
module.s3_bucket_demo_files.aws_s3_bucket_policy.this[0]: Destruction complete after 0s
module.s3_bucket_demo_files.aws_s3_bucket.this[0]: Destroying... [id=bb-apps-devstg-demo-files]
module.s3_bucket_demo_files.aws_s3_bucket.this[0]: Destruction complete after 1s
Releasing state lock. This may take a few moments...

Destroy complete! Resources: 25 destroyed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants