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

Add force destroy flag and rename spotify bucket #74

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

kevinsunny1996
Copy link
Owner

No description provided.

@kevinsunny1996 kevinsunny1996 self-assigned this Dec 8, 2023
Copy link

github-actions bot commented Dec 8, 2023

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖failure

Show Plan

terraform

Pushed by: @kevinsunny1996, Action: pull_request

Copy link

github-actions bot commented Dec 8, 2023

Infracost report

💰 Monthly cost will not change

Project Cost change New monthly cost
kevinsunny1996/aggregator-terraform-infra/terraform $0 $0
Cost details
──────────────────────────────────
Project: kevinsunny1996/aggregator-terraform-infra/terraform

- module.flyte_gcs_backend.google_storage_bucket.buckets["flyte-storage-backend"]
  Monthly cost depends on usage

    - Storage (standard)
      Monthly cost depends on usage
        -$0.02 per GiB

    - Object adds, bucket/object list (class A)
      Monthly cost depends on usage
        -$0.05 per 10k operations

    - Object gets, retrieve bucket/object metadata (class B)
      Monthly cost depends on usage
        -$0.004 per 10k operations

    - Network egress
    
        - Data transfer in same continent
          Monthly cost depends on usage
            -$0.02 per GB
    
        - Data transfer to worldwide excluding Asia, Australia (first 1TB)
          Monthly cost depends on usage
            -$0.12 per GB
    
        - Data transfer to Asia excluding China, but including Hong Kong (first 1TB)
          Monthly cost depends on usage
            -$0.12 per GB
    
        - Data transfer to China excluding Hong Kong (first 1TB)
          Monthly cost depends on usage
            -$0.23 per GB
    
        - Data transfer to Australia (first 1TB)
          Monthly cost depends on usage
            -$0.19 per GB

+ module.gcs_api_extract.google_storage_bucket.buckets["rawg-api-extracts"]
  Monthly cost depends on usage

    + Storage (standard)
      Monthly cost depends on usage
        +$0.02 per GiB

    + Object adds, bucket/object list (class A)
      Monthly cost depends on usage
        +$0.05 per 10k operations

    + Object gets, retrieve bucket/object metadata (class B)
      Monthly cost depends on usage
        +$0.004 per 10k operations

    + Network egress
    
        + Data transfer in same continent
          Monthly cost depends on usage
            +$0.02 per GB
    
        + Data transfer to worldwide excluding Asia, Australia (first 1TB)
          Monthly cost depends on usage
            +$0.12 per GB
    
        + Data transfer to Asia excluding China, but including Hong Kong (first 1TB)
          Monthly cost depends on usage
            +$0.12 per GB
    
        + Data transfer to China excluding Hong Kong (first 1TB)
          Monthly cost depends on usage
            +$0.23 per GB
    
        + Data transfer to Australia (first 1TB)
          Monthly cost depends on usage
            +$0.19 per GB

- module.gcs_api_extract.google_storage_bucket.buckets["spotify-web-api-extracts"]
  Monthly cost depends on usage

    - Storage (standard)
      Monthly cost depends on usage
        -$0.02 per GiB

    - Object adds, bucket/object list (class A)
      Monthly cost depends on usage
        -$0.05 per 10k operations

    - Object gets, retrieve bucket/object metadata (class B)
      Monthly cost depends on usage
        -$0.004 per 10k operations

    - Network egress
    
        - Data transfer in same continent
          Monthly cost depends on usage
            -$0.02 per GB
    
        - Data transfer to worldwide excluding Asia, Australia (first 1TB)
          Monthly cost depends on usage
            -$0.12 per GB
    
        - Data transfer to Asia excluding China, but including Hong Kong (first 1TB)
          Monthly cost depends on usage
            -$0.12 per GB
    
        - Data transfer to China excluding Hong Kong (first 1TB)
          Monthly cost depends on usage
            -$0.23 per GB
    
        - Data transfer to Australia (first 1TB)
          Monthly cost depends on usage
            -$0.19 per GB

Monthly cost change for kevinsunny1996/aggregator-terraform-infra/terraform
Amount:  $0.00 ($0.00 → $0.00)

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

11 cloud resources were detected:
∙ 1 was estimated, it includes usage-based costs, see https://infracost.io/usage-file
∙ 10 were free, rerun with --show-skipped to see details
This comment will be updated when code changes.

@kevinsunny1996 kevinsunny1996 added the infra Terraform related infra changes label Dec 8, 2023
Copy link

github-actions bot commented Dec 8, 2023

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖``

Terraform Plan 📖success

Show Plan

terraform
module.flyte_gcs_backend.random_id.bucket_suffix: Refreshing state... [id=FsY]
module.gcs_api_extract.random_id.bucket_suffix: Refreshing state... [id=i_k]
data.google_client_config.default: Reading...
google_project_service.composer_api: Refreshing state... [id=exemplary-tide-379122/composer.googleapis.com]
google_project_service.compute_api: Refreshing state... [id=exemplary-tide-379122/compute.googleapis.com]
module.flyte_gcs_backend.google_storage_bucket.buckets["flyte-storage-backend"]: Refreshing state... [id=pricing-aggregator-us-east1-flyte-storage-backend]
module.flyte_gcs_backend.google_storage_bucket_iam_binding.admins["flyte-storage-backend"]: Refreshing state... [id=b/pricing-aggregator-us-east1-flyte-storage-backend/roles/storage.objectAdmin]
google_project_service.container_api: Refreshing state... [id=exemplary-tide-379122/container.googleapis.com]
google_project_service.cloud_sql_api: Refreshing state... [id=exemplary-tide-379122/sqladmin.googleapis.com]
google_project_service.secret_mgr_api: Refreshing state... [id=exemplary-tide-379122/secretmanager.googleapis.com]
google_service_account.airflow_user_sa: Refreshing state... [id=projects/exemplary-tide-379122/serviceAccounts/[email protected]]
module.gcs_api_extract.google_storage_bucket.buckets["spotify-web-api-extracts"]: Refreshing state... [id=pricing-aggregator-us-east1-spotify-web-api-extracts]
data.google_client_config.default: Read complete after 0s [id=projects/"exemplary-tide-379122"/regions/"us-east1"/zones/<null>]
module.gcs_api_extract.google_storage_bucket_iam_binding.admins["spotify-web-api-extracts"]: Refreshing state... [id=b/pricing-aggregator-us-east1-spotify-web-api-extracts/roles/storage.objectAdmin]
google_project_iam_binding.gsm_access: Refreshing state... [id=exemplary-tide-379122/roles/secretmanager.secretAccessor]
google_project_iam_binding.bq_access: Refreshing state... [id=exemplary-tide-379122/roles/bigquery.dataEditor]
google_project_iam_binding.gcs_access: Refreshing state... [id=exemplary-tide-379122/roles/storage.objectAdmin]

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

Terraform will perform the following actions:

  # module.flyte_gcs_backend.google_storage_bucket.buckets["flyte-storage-backend"] will be destroyed
  # (because google_storage_bucket.buckets is not in configuration)
  - resource "google_storage_bucket" "buckets" {
      - default_event_based_hold    = false -> null
      - force_destroy               = false -> null
      - id                          = "pricing-aggregator-us-east1-flyte-storage-backend" -> null
      - labels                      = {
          - "name"              = "pricing-aggregator-us-east1-flyte-storage-backend"
          - "project_name"      = "pricing-aggregator"
          - "project_workspace" = (sensitive value)
        } -> null
      - location                    = "US-EAST1" -> null
      - name                        = "pricing-aggregator-us-east1-flyte-storage-backend" -> null
      - project                     = (sensitive value) -> null
      - public_access_prevention    = "inherited" -> null
      - requester_pays              = false -> null
      - self_link                   = "https://www.googleapis.com/storage/v1/b/pricing-aggregator-us-east1-flyte-storage-backend" -> null
      - storage_class               = "STANDARD" -> null
      - uniform_bucket_level_access = true -> null
      - url                         = "gs://pricing-aggregator-us-east1-flyte-storage-backend" -> null

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

  # module.flyte_gcs_backend.google_storage_bucket_iam_binding.admins["flyte-storage-backend"] will be destroyed
  # (because google_storage_bucket_iam_binding.admins is not in configuration)
  - resource "google_storage_bucket_iam_binding" "admins" {
      - bucket  = "b/pricing-aggregator-us-east1-flyte-storage-backend" -> null
      - id      = "b/pricing-aggregator-us-east1-flyte-storage-backend/roles/storage.objectAdmin" -> null
      - members = [] -> null
      - role    = "roles/storage.objectAdmin" -> null
    }

  # module.flyte_gcs_backend.random_id.bucket_suffix will be destroyed
  # (because random_id.bucket_suffix is not in configuration)
  - resource "random_id" "bucket_suffix" {
      - b64_std     = "FsY=" -> null
      - b64_url     = "FsY" -> null
      - byte_length = 2 -> null
      - dec         = "5830" -> null
      - hex         = "16c6" -> null
      - id          = "FsY" -> null
    }

  # module.gcs_api_extract.google_storage_bucket.buckets["rawg-api-extracts"] will be created
  + resource "google_storage_bucket" "buckets" {
      + default_event_based_hold    = false
      + force_destroy               = false
      + id                          = (known after apply)
      + labels                      = {
          + "name"              = "pricing-aggregator-us-east1-rawg-api-extracts"
          + "project_name"      = "pricing-aggregator"
          + "project_workspace" = (sensitive value)
        }
      + location                    = "US-EAST1"
      + name                        = "pricing-aggregator-us-east1-rawg-api-extracts"
      + project                     = (sensitive value)
      + public_access_prevention    = (known after apply)
      + self_link                   = (known after apply)
      + storage_class               = "STANDARD"
      + uniform_bucket_level_access = true
      + url                         = (known after apply)

      + versioning {
          + enabled = false
        }
    }

  # module.gcs_api_extract.google_storage_bucket.buckets["spotify-web-api-extracts"] will be destroyed
  # (because key ["spotify-web-api-extracts"] is not in for_each map)
  - resource "google_storage_bucket" "buckets" {
      - default_event_based_hold    = false -> null
      - force_destroy               = false -> null
      - id                          = "pricing-aggregator-us-east1-spotify-web-api-extracts" -> null
      - labels                      = {
          - "name"              = "pricing-aggregator-us-east1-spotify-web-api-extracts"
          - "project_name"      = "pricing-aggregator"
          - "project_workspace" = (sensitive value)
        } -> null
      - location                    = "US-EAST1" -> null
      - name                        = "pricing-aggregator-us-east1-spotify-web-api-extracts" -> null
      - project                     = (sensitive value) -> null
      - public_access_prevention    = "inherited" -> null
      - requester_pays              = false -> null
      - self_link                   = "https://www.googleapis.com/storage/v1/b/pricing-aggregator-us-east1-spotify-web-api-extracts" -> null
      - storage_class               = "STANDARD" -> null
      - uniform_bucket_level_access = true -> null
      - url                         = "gs://pricing-aggregator-us-east1-spotify-web-api-extracts" -> null

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

  # module.gcs_api_extract.google_storage_bucket_iam_binding.admins["rawg-api-extracts"] will be created
  + resource "google_storage_bucket_iam_binding" "admins" {
      + bucket = "pricing-aggregator-us-east1-rawg-api-extracts"
      + etag   = (known after apply)
      + id     = (known after apply)
      + role   = "roles/storage.objectAdmin"
    }

  # module.gcs_api_extract.google_storage_bucket_iam_binding.admins["spotify-web-api-extracts"] will be destroyed
  # (because key ["spotify-web-api-extracts"] is not in for_each map)
  - resource "google_storage_bucket_iam_binding" "admins" {
      - bucket  = "b/pricing-aggregator-us-east1-spotify-web-api-extracts" -> null
      - id      = "b/pricing-aggregator-us-east1-spotify-web-api-extracts/roles/storage.objectAdmin" -> null
      - members = [] -> null
      - role    = "roles/storage.objectAdmin" -> null
    }

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

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

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

Pushed by: @kevinsunny1996, Action: pull_request

@kevinsunny1996 kevinsunny1996 merged commit 2951fd0 into main Dec 8, 2023
5 of 6 checks passed
@kevinsunny1996 kevinsunny1996 deleted the build/rename_spotify_gcs_and_clean_up branch March 15, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Terraform related infra changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant