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

State Sync 🔄 #88

Merged
merged 5 commits into from
Jul 28, 2024
Merged

State Sync 🔄 #88

merged 5 commits into from
Jul 28, 2024

Conversation

GrantBirki
Copy link
Member

@GrantBirki GrantBirki commented Jul 28, 2024

This pull request goes through our production cloudflare state and sync it to match what is in this repo so we don't have version drift. In the future, we should really try to make changes through this repo as much as possible vs by hand so we have everything in version control.

@GrantBirki GrantBirki requested a review from a team as a code owner July 28, 2024 22:49
Copy link

👋 Thanks for opening a pull request!

If you are new, please check out the deployment process to understand how to deploy this pull request. A trimmed down summary will be listed below:

  1. 🧪 Run a noop deployment with .noop as a comment on this PR

  2. 👀 Observe the CI and noop output on this pull request to ensure it is passing and doing what it is supposed to do

  3. ✔️ Obtain an approval/review on this pull request

  4. 🚀 Branch deploy your pull request to production with .deploy

    If anything goes wrong, rollback with .deploy main

  5. 🎉 Merge!

@GrantBirki
Copy link
Member Author

.noop

Copy link

Deployment Triggered 🚀

GrantBirki, started a noop deployment to production

You can watch the progress here 🔗

noop: state-sync

Copy link

Deployment Results ✅

GrantBirki successfully noop deployed branch state-sync to production

Show Results
Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply":

  # cloudflare_record.api has changed
  ~ resource "cloudflare_record" "api" {
        id              = "5a6f0c44f89893d479067808915a429f"
      ~ modified_on     = "2023-01-30T17:08:19.058913Z" -> "2024-07-03T16:09:43.964251Z"
        name            = "api"
      ~ proxied         = false -> true
      ~ value           = "ecp.map.fastly.net" -> "api.hideout-api.workers.dev"
        # (8 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # cloudflare_record.assets has changed
  ~ resource "cloudflare_record" "assets" {
        id              = "fa9d45fc579f68883bce2b2e2bf4e378"
      ~ modified_on     = "2022-03-21T02:56:18.994874Z" -> "2024-07-28T22:22:27.035229Z"
        name            = "assets"
      ~ value           = "assets.thehideout.io.s3-website-us-east-1.amazonaws.com" -> "assets.tarkov.dev.s3-website-us-east-1.amazonaws.com"
        # (9 unchanged attributes hidden)
    }

  # cloudflare_record.cache has changed
  ~ resource "cloudflare_record" "cache" {
        id              = "65105596207eb686b256c9bb9cd17e23"
      ~ modified_on     = "2024-03-10T23:56:22.608818Z" -> "2024-04-18T03:41:56.18794Z"
        name            = "cache"
      ~ value           = "20.124.115.39" -> "135.148.148.174"
        # (9 unchanged attributes hidden)
    }

  # cloudflare_record.dev_api has changed
  ~ resource "cloudflare_record" "dev_api" {
        id              = "74b67d1043f9099b4ee38d467d24c3c2"
      ~ modified_on     = "2023-01-30T14:45:18.887592Z" -> "2024-07-02T15:35:41.683206Z"
        name            = "dev-api"
      ~ proxied         = false -> true
      ~ value           = "ecp.map.fastly.net" -> "api-development.hideout-api.workers.dev"
        # (8 unchanged attributes hidden)
    }

  # cloudflare_record.status has changed
  ~ resource "cloudflare_record" "status" {
        id              = "8b78ff4373eb3ed0fedc73ee511c4168"
      ~ modified_on     = "2022-06-17T03:28:07.66226Z" -> "2024-07-25T18:41:16.411141Z"
        name            = "status"
      ~ value           = "20.228.137.173" -> "96.230.1.240"
        # (9 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # cloudflare_ruleset.cache_rules has changed
  ~ resource "cloudflare_ruleset" "cache_rules" {
        id      = "6510b58fb0ac44c9984077e55eb158d0"
        name    = "default"
        # (3 unchanged attributes hidden)

      ~ rules {
            id          = "e74e07fd83864267a0a3c394ffe7215a"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "0dd79c579a784d5191bc1509e1e189bd"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "6a4082afc7614e4c911dc7b07448065e"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      + rules {
          + action      = "set_cache_settings"
          + description = "player profiles"
          + enabled     = false
          + expression  = "(http.host eq \"assets.tarkov.dev\" and starts_with(http.request.uri.path, \"/profile/\"))"
          + id          = "d695a1efed064391a038e3bb85958553"

          + action_parameters {
              + automatic_https_rewrites   = false
              + bic                        = false
              + cache                      = true
              + cookie_fields              = []
              + disable_apps               = false
              + disable_railgun            = false
              + disable_zaraz              = false
              + email_obfuscation          = false
              + hotlink_protection         = false
              + increment                  = 0
              + mirage                     = false
              + opportunistic_encryption   = false
              + origin_error_page_passthru = false
              + phases                     = []
              + products                   = []
              + request_fields             = []
              + respect_strong_etags       = false
              + response_fields            = []
              + rocket_loader              = false
              + rules                      = {}
              + rulesets                   = []
              + server_side_excludes       = false
              + status_code                = 0
              + sxg                        = false

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

              + edge_ttl {
                  + default = 86400
                  + mode    = "override_origin"
                }
            }
        }
      + rules {
          + action      = "set_cache_settings"
          + description = "players domain caching"
          + enabled     = true
          + expression  = "(http.host eq \"players.tarkov.dev\")"
          + id          = "c8e0ce843012463f8e3a5524404ab4ef"

          + action_parameters {
              + automatic_https_rewrites   = false
              + bic                        = false
              + cache                      = true
              + cookie_fields              = []
              + disable_apps               = false
              + disable_railgun            = false
              + disable_zaraz              = false
              + email_obfuscation          = false
              + hotlink_protection         = false
              + increment                  = 0
              + mirage                     = false
              + opportunistic_encryption   = false
              + origin_error_page_passthru = false
              + phases                     = []
              + products                   = []
              + request_fields             = []
              + respect_strong_etags       = false
              + response_fields            = []
              + rocket_loader              = false
              + rules                      = {}
              + rulesets                   = []
              + server_side_excludes       = false
              + status_code                = 0
              + sxg                        = false

              + browser_ttl {
                  + default = 2678400
                  + mode    = "override_origin"
                }

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

              + edge_ttl {
                  + default = 16070400
                  + mode    = "override_origin"
                }
            }
        }
        # (3 unchanged blocks hidden)
    }

  # cloudflare_ruleset.security_response_headers has changed
  ~ resource "cloudflare_ruleset" "security_response_headers" {
        id          = "99896b7130154c279bd0dd1d94f109ec"
        name        = "Security Response Headers"
        # (4 unchanged attributes hidden)

      ~ rules {
          ~ expression  = "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\")" -> "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\" and not http.host contains \"player\")"
            id          = "f26d12a2a0fc41c58557f094dfa437fc"
            # (3 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }
      + rules {
          + action      = "rewrite"
          + description = "Add CORS header to player API"
          + enabled     = true
          + expression  = "(http.host eq \"player.tarkov.dev\")"
          + id          = "ac6a375d53e94563bf21ab95b7664d9a"

          + action_parameters {
              + automatic_https_rewrites   = false
              + bic                        = false
              + cache                      = false
              + cookie_fields              = []
              + disable_apps               = false
              + disable_railgun            = false
              + disable_zaraz              = false
              + email_obfuscation          = false
              + hotlink_protection         = false
              + increment                  = 0
              + mirage                     = false
              + opportunistic_encryption   = false
              + origin_error_page_passthru = false
              + phases                     = []
              + products                   = []
              + request_fields             = []
              + respect_strong_etags       = false
              + response_fields            = []
              + rocket_loader              = false
              + rules                      = {}
              + rulesets                   = []
              + server_side_excludes       = false
              + status_code                = 0
              + sxg                        = false

              + headers {
                  + name      = "Access-Control-Allow-Origin"
                  + operation = "set"
                  + value     = "*"
                }
            }
        }
    }

Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

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

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # cloudflare_ruleset.cache_rules will be updated in-place
  ~ resource "cloudflare_ruleset" "cache_rules" {
        id      = "6510b58fb0ac44c9984077e55eb158d0"
        name    = "default"
        # (3 unchanged attributes hidden)

      ~ rules {
            id          = "e74e07fd83864267a0a3c394ffe7215a"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              - cache_key {
                  - cache_by_device_type       = false -> null
                  - cache_deception_armor      = false -> null
                  - ignore_query_strings_order = false -> null

                  - custom_key {

                      - query_string {
                          - exclude = [
                              - "*",
                            ] -> null
                          - include = [] -> null
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "0dd79c579a784d5191bc1509e1e189bd"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              - cache_key {
                  - cache_by_device_type       = false -> null
                  - cache_deception_armor      = false -> null
                  - ignore_query_strings_order = false -> null

                  - custom_key {

                      - query_string {
                          - exclude = [
                              - "*",
                            ] -> null
                          - include = [] -> null
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "6a4082afc7614e4c911dc7b07448065e"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              - cache_key {
                  - cache_by_device_type       = false -> null
                  - cache_deception_armor      = false -> null
                  - ignore_query_strings_order = false -> null

                  - custom_key {

                      - query_string {
                          - exclude = [
                              - "*",
                            ] -> null
                          - include = [] -> null
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      - rules {
          - action      = "set_cache_settings" -> null
          - description = "player profiles" -> null
          - enabled     = false -> null
          - expression  = "(http.host eq \"assets.tarkov.dev\" and starts_with(http.request.uri.path, \"/profile/\"))" -> null
          - id          = "d695a1efed064391a038e3bb85958553" -> null

          - action_parameters {
              - automatic_https_rewrites   = false -> null
              - bic                        = false -> null
              - cache                      = true -> null
              - cookie_fields              = [] -> null
              - disable_apps               = false -> null
              - disable_railgun            = false -> null
              - disable_zaraz              = false -> null
              - email_obfuscation          = false -> null
              - hotlink_protection         = false -> null
              - increment                  = 0 -> null
              - mirage                     = false -> null
              - opportunistic_encryption   = false -> null
              - origin_error_page_passthru = false -> null
              - phases                     = [] -> null
              - products                   = [] -> null
              - request_fields             = [] -> null
              - respect_strong_etags       = false -> null
              - response_fields            = [] -> null
              - rocket_loader              = false -> null
              - rules                      = {} -> null
              - rulesets                   = [] -> null
              - server_side_excludes       = false -> null
              - status_code                = 0 -> null
              - sxg                        = false -> null

              - cache_key {
                  - cache_by_device_type       = false -> null
                  - cache_deception_armor      = false -> null
                  - ignore_query_strings_order = false -> null

                  - custom_key {

                      - query_string {
                          - exclude = [
                              - "*",
                            ] -> null
                          - include = [] -> null
                        }
                    }
                }

              - edge_ttl {
                  - default = 86400 -> null
                  - mode    = "override_origin" -> null
                }
            }
        }
      - rules {
          - action      = "set_cache_settings" -> null
          - description = "players domain caching" -> null
          - enabled     = true -> null
          - expression  = "(http.host eq \"players.tarkov.dev\")" -> null
          - id          = "c8e0ce843012463f8e3a5524404ab4ef" -> null

          - action_parameters {
              - automatic_https_rewrites   = false -> null
              - bic                        = false -> null
              - cache                      = true -> null
              - cookie_fields              = [] -> null
              - disable_apps               = false -> null
              - disable_railgun            = false -> null
              - disable_zaraz              = false -> null
              - email_obfuscation          = false -> null
              - hotlink_protection         = false -> null
              - increment                  = 0 -> null
              - mirage                     = false -> null
              - opportunistic_encryption   = false -> null
              - origin_error_page_passthru = false -> null
              - phases                     = [] -> null
              - products                   = [] -> null
              - request_fields             = [] -> null
              - respect_strong_etags       = false -> null
              - response_fields            = [] -> null
              - rocket_loader              = false -> null
              - rules                      = {} -> null
              - rulesets                   = [] -> null
              - server_side_excludes       = false -> null
              - status_code                = 0 -> null
              - sxg                        = false -> null

              - browser_ttl {
                  - default = 2678400 -> null
                  - mode    = "override_origin" -> null
                }

              - cache_key {
                  - cache_by_device_type       = false -> null
                  - cache_deception_armor      = false -> null
                  - ignore_query_strings_order = false -> null

                  - custom_key {

                      - query_string {
                          - exclude = [
                              - "*",
                            ] -> null
                          - include = [] -> null
                        }
                    }
                }

              - edge_ttl {
                  - default = 16070400 -> null
                  - mode    = "override_origin" -> null
                }
            }
        }
        # (3 unchanged blocks hidden)
    }

  # cloudflare_ruleset.security_response_headers will be updated in-place
  ~ resource "cloudflare_ruleset" "security_response_headers" {
        id          = "99896b7130154c279bd0dd1d94f109ec"
        name        = "Security Response Headers"
        # (4 unchanged attributes hidden)

      ~ rules {
          ~ expression  = "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\" and not http.host contains \"player\")" -> "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\")"
            id          = "f26d12a2a0fc41c58557f094dfa437fc"
            # (3 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }
      - rules {
          - action      = "rewrite" -> null
          - description = "Add CORS header to player API" -> null
          - enabled     = true -> null
          - expression  = "(http.host eq \"player.tarkov.dev\")" -> null
          - id          = "ac6a375d53e94563bf21ab95b7664d9a" -> null

          - action_parameters {
              - automatic_https_rewrites   = false -> null
              - bic                        = false -> null
              - cache                      = false -> null
              - cookie_fields              = [] -> null
              - disable_apps               = false -> null
              - disable_railgun            = false -> null
              - disable_zaraz              = false -> null
              - email_obfuscation          = false -> null
              - hotlink_protection         = false -> null
              - increment                  = 0 -> null
              - mirage                     = false -> null
              - opportunistic_encryption   = false -> null
              - origin_error_page_passthru = false -> null
              - phases                     = [] -> null
              - products                   = [] -> null
              - request_fields             = [] -> null
              - respect_strong_etags       = false -> null
              - response_fields            = [] -> null
              - rocket_loader              = false -> null
              - rules                      = {} -> null
              - rulesets                   = [] -> null
              - server_side_excludes       = false -> null
              - status_code                = 0 -> null
              - sxg                        = false -> null

              - headers {
                  - name      = "Access-Control-Allow-Origin" -> null
                  - operation = "set" -> null
                  - value     = "*" -> null
                }
            }
        }
    }

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

@GrantBirki GrantBirki self-assigned this Jul 28, 2024
@GrantBirki
Copy link
Member Author

.noop

Copy link

Deployment Triggered 🚀

GrantBirki, started a noop deployment to production

You can watch the progress here 🔗

noop: state-sync

Copy link

Deployment Results ✅

GrantBirki successfully noop deployed branch state-sync to production

Show Results
Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply":

  # cloudflare_record.api has changed
  ~ resource "cloudflare_record" "api" {
        id              = "5a6f0c44f89893d479067808915a429f"
      ~ modified_on     = "2023-01-30T17:08:19.058913Z" -> "2024-07-03T16:09:43.964251Z"
        name            = "api"
      ~ proxied         = false -> true
      ~ value           = "ecp.map.fastly.net" -> "api.hideout-api.workers.dev"
        # (8 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # cloudflare_record.assets has changed
  ~ resource "cloudflare_record" "assets" {
        id              = "fa9d45fc579f68883bce2b2e2bf4e378"
      ~ modified_on     = "2022-03-21T02:56:18.994874Z" -> "2024-07-28T22:22:27.035229Z"
        name            = "assets"
      ~ value           = "assets.thehideout.io.s3-website-us-east-1.amazonaws.com" -> "assets.tarkov.dev.s3-website-us-east-1.amazonaws.com"
        # (9 unchanged attributes hidden)
    }

  # cloudflare_record.cache has changed
  ~ resource "cloudflare_record" "cache" {
        id              = "65105596207eb686b256c9bb9cd17e23"
      ~ modified_on     = "2024-03-10T23:56:22.608818Z" -> "2024-04-18T03:41:56.18794Z"
        name            = "cache"
      ~ value           = "20.124.115.39" -> "135.148.148.174"
        # (9 unchanged attributes hidden)
    }

  # cloudflare_record.dev_api has changed
  ~ resource "cloudflare_record" "dev_api" {
        id              = "74b67d1043f9099b4ee38d467d24c3c2"
      ~ modified_on     = "2023-01-30T14:45:18.887592Z" -> "2024-07-02T15:35:41.683206Z"
        name            = "dev-api"
      ~ proxied         = false -> true
      ~ value           = "ecp.map.fastly.net" -> "api-development.hideout-api.workers.dev"
        # (8 unchanged attributes hidden)
    }

  # cloudflare_record.status has changed
  ~ resource "cloudflare_record" "status" {
        id              = "8b78ff4373eb3ed0fedc73ee511c4168"
      ~ modified_on     = "2022-06-17T03:28:07.66226Z" -> "2024-07-25T18:41:16.411141Z"
        name            = "status"
      ~ value           = "20.228.137.173" -> "96.230.1.240"
        # (9 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # cloudflare_ruleset.cache_rules has changed
  ~ resource "cloudflare_ruleset" "cache_rules" {
        id      = "6510b58fb0ac44c9984077e55eb158d0"
        name    = "default"
        # (3 unchanged attributes hidden)

      ~ rules {
            id          = "e74e07fd83864267a0a3c394ffe7215a"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "0dd79c579a784d5191bc1509e1e189bd"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "6a4082afc7614e4c911dc7b07448065e"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      + rules {
          + action      = "set_cache_settings"
          + description = "players domain caching"
          + enabled     = true
          + expression  = "(http.host eq \"players.tarkov.dev\")"
          + id          = "c8e0ce843012463f8e3a5524404ab4ef"

          + action_parameters {
              + automatic_https_rewrites   = false
              + bic                        = false
              + cache                      = true
              + cookie_fields              = []
              + disable_apps               = false
              + disable_railgun            = false
              + disable_zaraz              = false
              + email_obfuscation          = false
              + hotlink_protection         = false
              + increment                  = 0
              + mirage                     = false
              + opportunistic_encryption   = false
              + origin_error_page_passthru = false
              + phases                     = []
              + products                   = []
              + request_fields             = []
              + respect_strong_etags       = false
              + response_fields            = []
              + rocket_loader              = false
              + rules                      = {}
              + rulesets                   = []
              + server_side_excludes       = false
              + status_code                = 0
              + sxg                        = false

              + browser_ttl {
                  + default = 86400
                  + mode    = "override_origin"
                }

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

              + edge_ttl {
                  + default = 86400
                  + mode    = "override_origin"
                }
            }
        }
        # (3 unchanged blocks hidden)
    }

  # cloudflare_ruleset.security_response_headers has changed
  ~ resource "cloudflare_ruleset" "security_response_headers" {
        id          = "99896b7130154c279bd0dd1d94f109ec"
        name        = "Security Response Headers"
        # (4 unchanged attributes hidden)

      ~ rules {
          ~ expression  = "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\")" -> "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\" and not http.host contains \"player\")"
            id          = "f26d12a2a0fc41c58557f094dfa437fc"
            # (3 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }
      + rules {
          + action      = "rewrite"
          + description = "Add CORS header to player API"
          + enabled     = true
          + expression  = "(http.host eq \"player.tarkov.dev\")"
          + id          = "ac6a375d53e94563bf21ab95b7664d9a"

          + action_parameters {
              + automatic_https_rewrites   = false
              + bic                        = false
              + cache                      = false
              + cookie_fields              = []
              + disable_apps               = false
              + disable_railgun            = false
              + disable_zaraz              = false
              + email_obfuscation          = false
              + hotlink_protection         = false
              + increment                  = 0
              + mirage                     = false
              + opportunistic_encryption   = false
              + origin_error_page_passthru = false
              + phases                     = []
              + products                   = []
              + request_fields             = []
              + respect_strong_etags       = false
              + response_fields            = []
              + rocket_loader              = false
              + rules                      = {}
              + rulesets                   = []
              + server_side_excludes       = false
              + status_code                = 0
              + sxg                        = false

              + headers {
                  + name      = "Access-Control-Allow-Origin"
                  + operation = "set"
                  + value     = "*"
                }
            }
        }
    }

Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

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

No changes. Your infrastructure matches the configuration.

Your configuration already matches the changes detected above. If you'd like
to update the Terraform state to match, create and apply a refresh-only plan:
  terraform apply -refresh-only

@GrantBirki
Copy link
Member Author

.deploy

Copy link

Deployment Triggered 🚀

GrantBirki, started a branch deployment to production

You can watch the progress here 🔗

Branch: state-sync

Copy link

Deployment Results ✅

GrantBirki successfully branch deployed branch state-sync to production

Show Results
Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply":

  # cloudflare_record.api has changed
  ~ resource "cloudflare_record" "api" {
        id              = "5a6f0c44f89893d479067808915a429f"
      ~ modified_on     = "2023-01-30T17:08:19.058913Z" -> "2024-07-03T16:09:43.964251Z"
        name            = "api"
      ~ proxied         = false -> true
      ~ value           = "ecp.map.fastly.net" -> "api.hideout-api.workers.dev"
        # (8 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # cloudflare_record.assets has changed
  ~ resource "cloudflare_record" "assets" {
        id              = "fa9d45fc579f68883bce2b2e2bf4e378"
      ~ modified_on     = "2022-03-21T02:56:18.994874Z" -> "2024-07-28T22:22:27.035229Z"
        name            = "assets"
      ~ value           = "assets.thehideout.io.s3-website-us-east-1.amazonaws.com" -> "assets.tarkov.dev.s3-website-us-east-1.amazonaws.com"
        # (9 unchanged attributes hidden)
    }

  # cloudflare_record.cache has changed
  ~ resource "cloudflare_record" "cache" {
        id              = "65105596207eb686b256c9bb9cd17e23"
      ~ modified_on     = "2024-03-10T23:56:22.608818Z" -> "2024-04-18T03:41:56.18794Z"
        name            = "cache"
      ~ value           = "20.124.115.39" -> "135.148.148.174"
        # (9 unchanged attributes hidden)
    }

  # cloudflare_record.dev_api has changed
  ~ resource "cloudflare_record" "dev_api" {
        id              = "74b67d1043f9099b4ee38d467d24c3c2"
      ~ modified_on     = "2023-01-30T14:45:18.887592Z" -> "2024-07-02T15:35:41.683206Z"
        name            = "dev-api"
      ~ proxied         = false -> true
      ~ value           = "ecp.map.fastly.net" -> "api-development.hideout-api.workers.dev"
        # (8 unchanged attributes hidden)
    }

  # cloudflare_record.status has changed
  ~ resource "cloudflare_record" "status" {
        id              = "8b78ff4373eb3ed0fedc73ee511c4168"
      ~ modified_on     = "2022-06-17T03:28:07.66226Z" -> "2024-07-25T18:41:16.411141Z"
        name            = "status"
      ~ value           = "20.228.137.173" -> "96.230.1.240"
        # (9 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # cloudflare_ruleset.cache_rules has changed
  ~ resource "cloudflare_ruleset" "cache_rules" {
        id      = "6510b58fb0ac44c9984077e55eb158d0"
        name    = "default"
        # (3 unchanged attributes hidden)

      ~ rules {
            id          = "e74e07fd83864267a0a3c394ffe7215a"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "0dd79c579a784d5191bc1509e1e189bd"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      ~ rules {
            id          = "6a4082afc7614e4c911dc7b07448065e"
            # (4 unchanged attributes hidden)

          ~ action_parameters {
                # (24 unchanged attributes hidden)

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

                # (2 unchanged blocks hidden)
            }
        }
      + rules {
          + action      = "set_cache_settings"
          + description = "players domain caching"
          + enabled     = true
          + expression  = "(http.host eq \"players.tarkov.dev\")"
          + id          = "c8e0ce843012463f8e3a5524404ab4ef"

          + action_parameters {
              + automatic_https_rewrites   = false
              + bic                        = false
              + cache                      = true
              + cookie_fields              = []
              + disable_apps               = false
              + disable_railgun            = false
              + disable_zaraz              = false
              + email_obfuscation          = false
              + hotlink_protection         = false
              + increment                  = 0
              + mirage                     = false
              + opportunistic_encryption   = false
              + origin_error_page_passthru = false
              + phases                     = []
              + products                   = []
              + request_fields             = []
              + respect_strong_etags       = false
              + response_fields            = []
              + rocket_loader              = false
              + rules                      = {}
              + rulesets                   = []
              + server_side_excludes       = false
              + status_code                = 0
              + sxg                        = false

              + browser_ttl {
                  + default = 86400
                  + mode    = "override_origin"
                }

              + cache_key {
                  + cache_by_device_type       = false
                  + cache_deception_armor      = false
                  + ignore_query_strings_order = false

                  + custom_key {

                      + query_string {
                          + exclude = [
                              + "*",
                            ]
                          + include = []
                        }
                    }
                }

              + edge_ttl {
                  + default = 86400
                  + mode    = "override_origin"
                }
            }
        }
        # (3 unchanged blocks hidden)
    }

  # cloudflare_ruleset.security_response_headers has changed
  ~ resource "cloudflare_ruleset" "security_response_headers" {
        id          = "99896b7130154c279bd0dd1d94f109ec"
        name        = "Security Response Headers"
        # (4 unchanged attributes hidden)

      ~ rules {
          ~ expression  = "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\")" -> "(not http.host contains \"api\" and not http.host contains \"manager\" and not http.host contains \"status\" and not http.host contains \"player\")"
            id          = "f26d12a2a0fc41c58557f094dfa437fc"
            # (3 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }
      + rules {
          + action      = "rewrite"
          + description = "Add CORS header to player API"
          + enabled     = true
          + expression  = "(http.host eq \"player.tarkov.dev\")"
          + id          = "ac6a375d53e94563bf21ab95b7664d9a"

          + action_parameters {
              + automatic_https_rewrites   = false
              + bic                        = false
              + cache                      = false
              + cookie_fields              = []
              + disable_apps               = false
              + disable_railgun            = false
              + disable_zaraz              = false
              + email_obfuscation          = false
              + hotlink_protection         = false
              + increment                  = 0
              + mirage                     = false
              + opportunistic_encryption   = false
              + origin_error_page_passthru = false
              + phases                     = []
              + products                   = []
              + request_fields             = []
              + respect_strong_etags       = false
              + response_fields            = []
              + rocket_loader              = false
              + rules                      = {}
              + rulesets                   = []
              + server_side_excludes       = false
              + status_code                = 0
              + sxg                        = false

              + headers {
                  + name      = "Access-Control-Allow-Origin"
                  + operation = "set"
                  + value     = "*"
                }
            }
        }
    }

Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

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

No changes. Your infrastructure matches the configuration.

Your configuration already matches the changes detected above. If you'd like
to update the Terraform state to match, create and apply a refresh-only plan:
  terraform apply -refresh-only

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

@GrantBirki GrantBirki merged commit 24b57a9 into main Jul 28, 2024
2 checks passed
@GrantBirki GrantBirki deleted the state-sync branch July 28, 2024 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants