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

reformatting terraform #14

Merged
merged 3 commits into from
Mar 29, 2024
Merged

reformatting terraform #14

merged 3 commits into from
Mar 29, 2024

Conversation

amavrogiannis
Copy link
Owner

No description provided.

@amavrogiannis
Copy link
Owner Author

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Terraform Plan 📖success

Show Plan

terraform
Acquiring state lock. This may take a few moments...
module.testalexmav_web.data.aws_acm_certificate.this: Reading...
module.testalexmav_web.aws_cloudfront_origin_access_identity.this: Refreshing state... [id=E3PH0ZJX23X72P]
module.testalexmav_web.aws_s3_bucket.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_acm_certificate.this: Read complete after 1s [id=arn:aws:acm:eu-west-1:582037776064:certificate/9cd3e3fc-efde-40d5-b3a0-5bdcb06f3f71]
module.testalexmav_web.aws_s3_bucket_public_access_block.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_s3_bucket_ownership_controls.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_iam_policy_document.this_policy: Reading...
module.testalexmav_web.aws_s3_bucket_website_configuration.this[0]: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_s3_bucket_server_side_encryption_configuration.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_iam_policy_document.this_policy: Read complete after 0s [id=588178092]
module.testalexmav_web.aws_s3_bucket_policy.this[0]: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_cloudfront_distribution.this: Refreshing state... [id=ELGFDLL8OIR5F]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.testalexmav_web.aws_cloudfront_distribution.this has been deleted
  - resource "aws_cloudfront_distribution" "this" {
      - domain_name                    = "dnbuxrum3jpxr.cloudfront.net" -> null
        id                             = "ELGFDLL8OIR5F"
        tags                           = {
            "Environment"   = "Development"
            "Service_Group" = "Test_Website"
        }
        # (20 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }


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:
  + create

Terraform will perform the following actions:

  # module.testalexmav_web.aws_cloudfront_distribution.this will be created
  + resource "aws_cloudfront_distribution" "this" {
      + aliases                         = [
          + "test.alexmav.co.uk",
        ]
      + arn                             = (known after apply)
      + caller_reference                = (known after apply)
      + comment                         = "Managed Terraform Resource"
      + continuous_deployment_policy_id = (known after apply)
      + default_root_object             = "index.html"
      + domain_name                     = (known after apply)
      + enabled                         = true
      + etag                            = (known after apply)
      + hosted_zone_id                  = (known after apply)
      + http_version                    = "http2"
      + id                              = (known after apply)
      + in_progress_validation_batches  = (known after apply)
      + is_ipv6_enabled                 = true
      + last_modified_time              = (known after apply)
      + price_class                     = "PriceClass_100"
      + retain_on_delete                = false
      + staging                         = false
      + status                          = (known after apply)
      + tags                            = {
          + "Environment"   = "Development"
          + "Service_Group" = "Test_Website"
        }
      + tags_all                        = {
          + "Environment"   = "Development"
          + "Service_Group" = "Test_Website"
          + "Terraform"     = "TRUE"
        }
      + trusted_key_groups              = (known after apply)
      + trusted_signers                 = (known after apply)
      + wait_for_deployment             = true

      + default_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = false
          + default_ttl            = 1800
          + max_ttl                = 3600
          + min_ttl                = 0
          + target_origin_id       = "Application"
          + trusted_key_groups     = (known after apply)
          + trusted_signers        = (known after apply)
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward           = "none"
                  + whitelisted_names = (known after apply)
                }
            }
        }

      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + compress               = true
          + default_ttl            = 600
          + max_ttl                = 3600
          + min_ttl                = 0
          + path_pattern           = "/content/immutable/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = [
                  + "Origin",
                ]
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }
      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = true
          + default_ttl            = 3600
          + max_ttl                = 86400
          + min_ttl                = 0
          + path_pattern           = "/content/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }

      + origin {
          + connection_attempts = 3
          + connection_timeout  = 10
          + domain_name         = "test.alexmav.co.uk.s3.eu-west-1.amazonaws.com"
          + origin_id           = "Application"

          + s3_origin_config {
              + origin_access_identity = "origin-access-identity/cloudfront/E3PH0ZJX23X72P"
            }
        }

      + restrictions {
          + geo_restriction {
              + locations        = [
                  + "AF",
                  + "BA",
                  + "BI",
                  + "BY",
                  + "CD",
                  + "GN",
                  + "GW",
                  + "HT",
                  + "IR",
                  + "KP",
                  + "LB",
                  + "LY",
                  + "NI",
                  + "RU",
                  + "SD",
                  + "SO",
                  + "SS",
                  + "VE",
                  + "YE",
                ]
              + restriction_type = "blacklist"
            }
        }

      + viewer_certificate {
          + acm_certificate_arn            = "arn:aws:acm:eu-west-1:582037776064:certificate/9cd3e3fc-efde-40d5-b3a0-5bdcb06f3f71"
          + cloudfront_default_certificate = false
          + minimum_protocol_version       = "TLSv1.2_2021"
          + ssl_support_method             = "sni-only"
        }
    }

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

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

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

*Pushed by: @amavrogiannis, Action: `pull_request`*

@amavrogiannis
Copy link
Owner Author

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Terraform Plan 📖success

Show Plan

terraform
Acquiring state lock. This may take a few moments...
module.cvalexmav_web.data.aws_acm_certificate.this: Reading...
module.cvalexmav_web.aws_cloudfront_origin_access_identity.this: Refreshing state... [id=E3N5JSK2MAVPB4]
module.cvalexmav_web.aws_s3_bucket.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_acm_certificate.this: Read complete after 1s [id=arn:aws:acm:eu-west-1:582037776064:certificate/9cd3e3fc-efde-40d5-b3a0-5bdcb06f3f71]
module.cvalexmav_web.aws_s3_bucket_public_access_block.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_s3_bucket_ownership_controls.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_s3_bucket_server_side_encryption_configuration.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_s3_bucket_website_configuration.this[0]: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_iam_policy_document.this_policy: Reading...
module.cvalexmav_web.data.aws_iam_policy_document.this_policy: Read complete after 0s [id=2599627922]
module.cvalexmav_web.aws_s3_bucket_policy.this[0]: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_cloudfront_distribution.this: Refreshing state... [id=E35XS7VNMG54Q7]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.cvalexmav_web.aws_cloudfront_distribution.this has been deleted
  - resource "aws_cloudfront_distribution" "this" {
      - domain_name                    = "d3qc8zf8d07fr7.cloudfront.net" -> null
        id                             = "E35XS7VNMG54Q7"
        tags                           = {
            "Environment"   = "Production"
            "Service_Group" = "CV_Website"
        }
        # (20 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }


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:
  + create

Terraform will perform the following actions:

  # module.cvalexmav_web.aws_cloudfront_distribution.this will be created
  + resource "aws_cloudfront_distribution" "this" {
      + aliases                         = [
          + "cv.alexmav.co.uk",
        ]
      + arn                             = (known after apply)
      + caller_reference                = (known after apply)
      + comment                         = "Managed Terraform Resource"
      + continuous_deployment_policy_id = (known after apply)
      + default_root_object             = "index.html"
      + domain_name                     = (known after apply)
      + enabled                         = true
      + etag                            = (known after apply)
      + hosted_zone_id                  = (known after apply)
      + http_version                    = "http2"
      + id                              = (known after apply)
      + in_progress_validation_batches  = (known after apply)
      + is_ipv6_enabled                 = true
      + last_modified_time              = (known after apply)
      + price_class                     = "PriceClass_100"
      + retain_on_delete                = false
      + staging                         = false
      + status                          = (known after apply)
      + tags                            = {
          + "Environment"   = "Production"
          + "Service_Group" = "CV_Website"
        }
      + tags_all                        = {
          + "Environment"   = "Production"
          + "Service_Group" = "CV_Website"
          + "Terraform"     = "TRUE"
        }
      + trusted_key_groups              = (known after apply)
      + trusted_signers                 = (known after apply)
      + wait_for_deployment             = true

      + default_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = false
          + default_ttl            = 1800
          + max_ttl                = 3600
          + min_ttl                = 0
          + target_origin_id       = "Application"
          + trusted_key_groups     = (known after apply)
          + trusted_signers        = (known after apply)
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward           = "none"
                  + whitelisted_names = (known after apply)
                }
            }
        }

      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + compress               = true
          + default_ttl            = 600
          + max_ttl                = 3600
          + min_ttl                = 0
          + path_pattern           = "/content/immutable/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = [
                  + "Origin",
                ]
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }
      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = true
          + default_ttl            = 3600
          + max_ttl                = 86400
          + min_ttl                = 0
          + path_pattern           = "/content/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }

      + origin {
          + connection_attempts = 3
          + connection_timeout  = 10
          + domain_name         = "cv.alexmav.co.uk.s3.eu-west-1.amazonaws.com"
          + origin_id           = "Application"

          + s3_origin_config {
              + origin_access_identity = "origin-access-identity/cloudfront/E3N5JSK2MAVPB4"
            }
        }

      + restrictions {
          + geo_restriction {
              + locations        = [
                  + "AF",
                  + "BA",
                  + "BI",
                  + "BY",
                  + "CD",
                  + "GN",
                  + "GW",
                  + "HT",
                  + "IR",
                  + "KP",
                  + "LB",
                  + "LY",
                  + "NI",
                  + "RU",
                  + "SD",
                  + "SO",
                  + "SS",
                  + "VE",
                  + "YE",
                ]
              + restriction_type = "blacklist"
            }
        }

      + viewer_certificate {
          + acm_certificate_arn            = "arn:aws:acm:eu-west-1:582037776064:certificate/9cd3e3fc-efde-40d5-b3a0-5bdcb06f3f71"
          + cloudfront_default_certificate = false
          + minimum_protocol_version       = "TLSv1.2_2021"
          + ssl_support_method             = "sni-only"
        }
    }

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

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

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

*Pushed by: @amavrogiannis, Action: `pull_request`*

@amavrogiannis
Copy link
Owner Author

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Terraform Plan 📖success

Show Plan

terraform
Acquiring state lock. This may take a few moments...
module.cvalexmav_web.data.aws_acm_certificate.this: Reading...
module.cvalexmav_web.aws_cloudfront_origin_access_identity.this: Refreshing state... [id=E3N5JSK2MAVPB4]
module.cvalexmav_web.aws_s3_bucket.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_acm_certificate.this: Read complete after 1s [id=arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5]
module.cvalexmav_web.aws_s3_bucket_ownership_controls.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_iam_policy_document.this_policy: Reading...
module.cvalexmav_web.aws_s3_bucket_server_side_encryption_configuration.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_s3_bucket_public_access_block.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_iam_policy_document.this_policy: Read complete after 0s [id=2599627922]
module.cvalexmav_web.aws_s3_bucket_website_configuration.this[0]: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_s3_bucket_policy.this[0]: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_cloudfront_distribution.this: Refreshing state... [id=E35XS7VNMG54Q7]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.cvalexmav_web.aws_cloudfront_distribution.this has been deleted
  - resource "aws_cloudfront_distribution" "this" {
      - domain_name                    = "d3qc8zf8d07fr7.cloudfront.net" -> null
        id                             = "E35XS7VNMG54Q7"
        tags                           = {
            "Environment"   = "Production"
            "Service_Group" = "CV_Website"
        }
        # (20 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }


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:
  + create

Terraform will perform the following actions:

  # module.cvalexmav_web.aws_cloudfront_distribution.this will be created
  + resource "aws_cloudfront_distribution" "this" {
      + aliases                         = [
          + "cv.alexmav.co.uk",
        ]
      + arn                             = (known after apply)
      + caller_reference                = (known after apply)
      + comment                         = "Managed Terraform Resource"
      + continuous_deployment_policy_id = (known after apply)
      + default_root_object             = "index.html"
      + domain_name                     = (known after apply)
      + enabled                         = true
      + etag                            = (known after apply)
      + hosted_zone_id                  = (known after apply)
      + http_version                    = "http2"
      + id                              = (known after apply)
      + in_progress_validation_batches  = (known after apply)
      + is_ipv6_enabled                 = true
      + last_modified_time              = (known after apply)
      + price_class                     = "PriceClass_100"
      + retain_on_delete                = false
      + staging                         = false
      + status                          = (known after apply)
      + tags                            = {
          + "Environment"   = "Production"
          + "Service_Group" = "CV_Website"
        }
      + tags_all                        = {
          + "Environment"   = "Production"
          + "Service_Group" = "CV_Website"
          + "Terraform"     = "TRUE"
        }
      + trusted_key_groups              = (known after apply)
      + trusted_signers                 = (known after apply)
      + wait_for_deployment             = true

      + default_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = false
          + default_ttl            = 1800
          + max_ttl                = 3600
          + min_ttl                = 0
          + target_origin_id       = "Application"
          + trusted_key_groups     = (known after apply)
          + trusted_signers        = (known after apply)
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward           = "none"
                  + whitelisted_names = (known after apply)
                }
            }
        }

      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + compress               = true
          + default_ttl            = 600
          + max_ttl                = 3600
          + min_ttl                = 0
          + path_pattern           = "/content/immutable/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = [
                  + "Origin",
                ]
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }
      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = true
          + default_ttl            = 3600
          + max_ttl                = 86400
          + min_ttl                = 0
          + path_pattern           = "/content/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }

      + origin {
          + connection_attempts = 3
          + connection_timeout  = 10
          + domain_name         = "cv.alexmav.co.uk.s3.eu-west-1.amazonaws.com"
          + origin_id           = "Application"

          + s3_origin_config {
              + origin_access_identity = "origin-access-identity/cloudfront/E3N5JSK2MAVPB4"
            }
        }

      + restrictions {
          + geo_restriction {
              + locations        = [
                  + "AF",
                  + "BA",
                  + "BI",
                  + "BY",
                  + "CD",
                  + "GN",
                  + "GW",
                  + "HT",
                  + "IR",
                  + "KP",
                  + "LB",
                  + "LY",
                  + "NI",
                  + "RU",
                  + "SD",
                  + "SO",
                  + "SS",
                  + "VE",
                  + "YE",
                ]
              + restriction_type = "blacklist"
            }
        }

      + viewer_certificate {
          + acm_certificate_arn            = "arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5"
          + cloudfront_default_certificate = false
          + minimum_protocol_version       = "TLSv1.2_2021"
          + ssl_support_method             = "sni-only"
        }
    }

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

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

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

*Pushed by: @amavrogiannis, Action: `pull_request`*

@amavrogiannis
Copy link
Owner Author

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Terraform Plan 📖success

Show Plan

terraform
Acquiring state lock. This may take a few moments...
module.testalexmav_web.data.aws_acm_certificate.this: Reading...
module.testalexmav_web.aws_cloudfront_origin_access_identity.this: Refreshing state... [id=E3PH0ZJX23X72P]
module.testalexmav_web.aws_s3_bucket.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_acm_certificate.this: Read complete after 1s [id=arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5]
module.testalexmav_web.aws_s3_bucket_ownership_controls.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_s3_bucket_website_configuration.this[0]: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_s3_bucket_server_side_encryption_configuration.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_s3_bucket_public_access_block.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_iam_policy_document.this_policy: Reading...
module.testalexmav_web.data.aws_iam_policy_document.this_policy: Read complete after 0s [id=588178092]
module.testalexmav_web.aws_s3_bucket_policy.this[0]: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_cloudfront_distribution.this: Refreshing state... [id=ELGFDLL8OIR5F]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.testalexmav_web.aws_cloudfront_distribution.this has been deleted
  - resource "aws_cloudfront_distribution" "this" {
      - domain_name                    = "dnbuxrum3jpxr.cloudfront.net" -> null
        id                             = "ELGFDLL8OIR5F"
        tags                           = {
            "Environment"   = "Development"
            "Service_Group" = "Test_Website"
        }
        # (20 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }


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:
  + create

Terraform will perform the following actions:

  # module.testalexmav_web.aws_cloudfront_distribution.this will be created
  + resource "aws_cloudfront_distribution" "this" {
      + aliases                         = [
          + "test.alexmav.co.uk",
        ]
      + arn                             = (known after apply)
      + caller_reference                = (known after apply)
      + comment                         = "Managed Terraform Resource"
      + continuous_deployment_policy_id = (known after apply)
      + default_root_object             = "index.html"
      + domain_name                     = (known after apply)
      + enabled                         = true
      + etag                            = (known after apply)
      + hosted_zone_id                  = (known after apply)
      + http_version                    = "http2"
      + id                              = (known after apply)
      + in_progress_validation_batches  = (known after apply)
      + is_ipv6_enabled                 = true
      + last_modified_time              = (known after apply)
      + price_class                     = "PriceClass_100"
      + retain_on_delete                = false
      + staging                         = false
      + status                          = (known after apply)
      + tags                            = {
          + "Environment"   = "Development"
          + "Service_Group" = "Test_Website"
        }
      + tags_all                        = {
          + "Environment"   = "Development"
          + "Service_Group" = "Test_Website"
          + "Terraform"     = "TRUE"
        }
      + trusted_key_groups              = (known after apply)
      + trusted_signers                 = (known after apply)
      + wait_for_deployment             = true

      + default_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = false
          + default_ttl            = 1800
          + max_ttl                = 3600
          + min_ttl                = 0
          + target_origin_id       = "Application"
          + trusted_key_groups     = (known after apply)
          + trusted_signers        = (known after apply)
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward           = "none"
                  + whitelisted_names = (known after apply)
                }
            }
        }

      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + compress               = true
          + default_ttl            = 600
          + max_ttl                = 3600
          + min_ttl                = 0
          + path_pattern           = "/content/immutable/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = [
                  + "Origin",
                ]
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }
      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = true
          + default_ttl            = 3600
          + max_ttl                = 86400
          + min_ttl                = 0
          + path_pattern           = "/content/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }

      + origin {
          + connection_attempts = 3
          + connection_timeout  = 10
          + domain_name         = "test.alexmav.co.uk.s3.eu-west-1.amazonaws.com"
          + origin_id           = "Application"

          + s3_origin_config {
              + origin_access_identity = "origin-access-identity/cloudfront/E3PH0ZJX23X72P"
            }
        }

      + restrictions {
          + geo_restriction {
              + locations        = [
                  + "AF",
                  + "BA",
                  + "BI",
                  + "BY",
                  + "CD",
                  + "GN",
                  + "GW",
                  + "HT",
                  + "IR",
                  + "KP",
                  + "LB",
                  + "LY",
                  + "NI",
                  + "RU",
                  + "SD",
                  + "SO",
                  + "SS",
                  + "VE",
                  + "YE",
                ]
              + restriction_type = "blacklist"
            }
        }

      + viewer_certificate {
          + acm_certificate_arn            = "arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5"
          + cloudfront_default_certificate = false
          + minimum_protocol_version       = "TLSv1.2_2021"
          + ssl_support_method             = "sni-only"
        }
    }

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

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

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

*Pushed by: @amavrogiannis, Action: `pull_request`*

@amavrogiannis
Copy link
Owner Author

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Terraform Plan 📖success

Show Plan

terraform
module.testalexmav_web.data.aws_acm_certificate.this: Reading...
module.testalexmav_web.aws_cloudfront_origin_access_identity.this: Refreshing state... [id=E3PH0ZJX23X72P]
module.testalexmav_web.aws_s3_bucket.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_acm_certificate.this: Read complete after 0s [id=arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5]
module.testalexmav_web.aws_s3_bucket_ownership_controls.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_s3_bucket_public_access_block.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_s3_bucket_website_configuration.this[0]: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_iam_policy_document.this_policy: Reading...
module.testalexmav_web.aws_s3_bucket_server_side_encryption_configuration.this: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.data.aws_iam_policy_document.this_policy: Read complete after 0s [id=588178092]
module.testalexmav_web.aws_s3_bucket_policy.this[0]: Refreshing state... [id=test.alexmav.co.uk]
module.testalexmav_web.aws_cloudfront_distribution.this: Refreshing state... [id=ELGFDLL8OIR5F]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.testalexmav_web.aws_cloudfront_distribution.this has been deleted
  - resource "aws_cloudfront_distribution" "this" {
      - domain_name                    = "dnbuxrum3jpxr.cloudfront.net" -> null
        id                             = "ELGFDLL8OIR5F"
        tags                           = {
            "Environment"   = "Development"
            "Service_Group" = "Test_Website"
        }
        # (20 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }


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:
  + create

Terraform will perform the following actions:

  # module.testalexmav_web.aws_cloudfront_distribution.this will be created
  + resource "aws_cloudfront_distribution" "this" {
      + aliases                         = [
          + "test.alexmav.co.uk",
        ]
      + arn                             = (known after apply)
      + caller_reference                = (known after apply)
      + comment                         = "Managed Terraform Resource"
      + continuous_deployment_policy_id = (known after apply)
      + default_root_object             = "index.html"
      + domain_name                     = (known after apply)
      + enabled                         = true
      + etag                            = (known after apply)
      + hosted_zone_id                  = (known after apply)
      + http_version                    = "http2"
      + id                              = (known after apply)
      + in_progress_validation_batches  = (known after apply)
      + is_ipv6_enabled                 = true
      + last_modified_time              = (known after apply)
      + price_class                     = "PriceClass_100"
      + retain_on_delete                = false
      + staging                         = false
      + status                          = (known after apply)
      + tags                            = {
          + "Environment"   = "Development"
          + "Service_Group" = "Test_Website"
        }
      + tags_all                        = {
          + "Environment"   = "Development"
          + "Service_Group" = "Test_Website"
          + "Terraform"     = "TRUE"
        }
      + trusted_key_groups              = (known after apply)
      + trusted_signers                 = (known after apply)
      + wait_for_deployment             = true

      + default_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = false
          + default_ttl            = 1800
          + max_ttl                = 3600
          + min_ttl                = 0
          + target_origin_id       = "Application"
          + trusted_key_groups     = (known after apply)
          + trusted_signers        = (known after apply)
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward           = "none"
                  + whitelisted_names = (known after apply)
                }
            }
        }

      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + compress               = true
          + default_ttl            = 600
          + max_ttl                = 3600
          + min_ttl                = 0
          + path_pattern           = "/content/immutable/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = [
                  + "Origin",
                ]
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }
      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = true
          + default_ttl            = 3600
          + max_ttl                = 7200
          + min_ttl                = 0
          + path_pattern           = "/content/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }

      + origin {
          + connection_attempts = 3
          + connection_timeout  = 10
          + domain_name         = "test.alexmav.co.uk.s3.eu-west-1.amazonaws.com"
          + origin_id           = "Application"

          + s3_origin_config {
              + origin_access_identity = "origin-access-identity/cloudfront/E3PH0ZJX23X72P"
            }
        }

      + restrictions {
          + geo_restriction {
              + locations        = [
                  + "AF",
                  + "BA",
                  + "BI",
                  + "BY",
                  + "CD",
                  + "GN",
                  + "GW",
                  + "HT",
                  + "IR",
                  + "KP",
                  + "LB",
                  + "LY",
                  + "NI",
                  + "RU",
                  + "SD",
                  + "SO",
                  + "SS",
                  + "VE",
                  + "YE",
                ]
              + restriction_type = "blacklist"
            }
        }

      + viewer_certificate {
          + acm_certificate_arn            = "arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5"
          + cloudfront_default_certificate = false
          + minimum_protocol_version       = "TLSv1.2_2021"
          + ssl_support_method             = "sni-only"
        }
    }

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

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

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

*Pushed by: @amavrogiannis, Action: `pull_request`*

@amavrogiannis
Copy link
Owner Author

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Terraform Plan 📖success

Show Plan

terraform
Acquiring state lock. This may take a few moments...
module.cvalexmav_web.data.aws_acm_certificate.this: Reading...
module.cvalexmav_web.aws_cloudfront_origin_access_identity.this: Refreshing state... [id=E3N5JSK2MAVPB4]
module.cvalexmav_web.aws_s3_bucket.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_acm_certificate.this: Read complete after 1s [id=arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5]
module.cvalexmav_web.aws_s3_bucket_public_access_block.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_s3_bucket_ownership_controls.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_iam_policy_document.this_policy: Reading...
module.cvalexmav_web.aws_s3_bucket_server_side_encryption_configuration.this: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_s3_bucket_website_configuration.this[0]: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.data.aws_iam_policy_document.this_policy: Read complete after 0s [id=2599627922]
module.cvalexmav_web.aws_s3_bucket_policy.this[0]: Refreshing state... [id=cv.alexmav.co.uk]
module.cvalexmav_web.aws_cloudfront_distribution.this: Refreshing state... [id=E35XS7VNMG54Q7]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.cvalexmav_web.aws_cloudfront_distribution.this has been deleted
  - resource "aws_cloudfront_distribution" "this" {
      - domain_name                    = "d3qc8zf8d07fr7.cloudfront.net" -> null
        id                             = "E35XS7VNMG54Q7"
        tags                           = {
            "Environment"   = "Production"
            "Service_Group" = "CV_Website"
        }
        # (20 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }


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:
  + create

Terraform will perform the following actions:

  # module.cvalexmav_web.aws_cloudfront_distribution.this will be created
  + resource "aws_cloudfront_distribution" "this" {
      + aliases                         = [
          + "cv.alexmav.co.uk",
        ]
      + arn                             = (known after apply)
      + caller_reference                = (known after apply)
      + comment                         = "Managed Terraform Resource"
      + continuous_deployment_policy_id = (known after apply)
      + default_root_object             = "index.html"
      + domain_name                     = (known after apply)
      + enabled                         = true
      + etag                            = (known after apply)
      + hosted_zone_id                  = (known after apply)
      + http_version                    = "http2"
      + id                              = (known after apply)
      + in_progress_validation_batches  = (known after apply)
      + is_ipv6_enabled                 = true
      + last_modified_time              = (known after apply)
      + price_class                     = "PriceClass_100"
      + retain_on_delete                = false
      + staging                         = false
      + status                          = (known after apply)
      + tags                            = {
          + "Environment"   = "Production"
          + "Service_Group" = "CV_Website"
        }
      + tags_all                        = {
          + "Environment"   = "Production"
          + "Service_Group" = "CV_Website"
          + "Terraform"     = "TRUE"
        }
      + trusted_key_groups              = (known after apply)
      + trusted_signers                 = (known after apply)
      + wait_for_deployment             = true

      + default_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = false
          + default_ttl            = 1800
          + max_ttl                = 3600
          + min_ttl                = 0
          + target_origin_id       = "Application"
          + trusted_key_groups     = (known after apply)
          + trusted_signers        = (known after apply)
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward           = "none"
                  + whitelisted_names = (known after apply)
                }
            }
        }

      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + compress               = true
          + default_ttl            = 600
          + max_ttl                = 3600
          + min_ttl                = 0
          + path_pattern           = "/content/immutable/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = [
                  + "Origin",
                ]
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }
      + ordered_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
            ]
          + compress               = true
          + default_ttl            = 3600
          + max_ttl                = 7200
          + min_ttl                = 0
          + path_pattern           = "/content/*"
          + target_origin_id       = "Application"
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = (known after apply)
              + query_string            = false
              + query_string_cache_keys = (known after apply)

              + cookies {
                  + forward = "none"
                }
            }
        }

      + origin {
          + connection_attempts = 3
          + connection_timeout  = 10
          + domain_name         = "cv.alexmav.co.uk.s3.eu-west-1.amazonaws.com"
          + origin_id           = "Application"

          + s3_origin_config {
              + origin_access_identity = "origin-access-identity/cloudfront/E3N5JSK2MAVPB4"
            }
        }

      + restrictions {
          + geo_restriction {
              + locations        = [
                  + "AF",
                  + "BA",
                  + "BI",
                  + "BY",
                  + "CD",
                  + "GN",
                  + "GW",
                  + "HT",
                  + "IR",
                  + "KP",
                  + "LB",
                  + "LY",
                  + "NI",
                  + "RU",
                  + "SD",
                  + "SO",
                  + "SS",
                  + "VE",
                  + "YE",
                ]
              + restriction_type = "blacklist"
            }
        }

      + viewer_certificate {
          + acm_certificate_arn            = "arn:aws:acm:eu-west-1:582037776064:certificate/d2471f08-8bad-43dd-963b-7fcd88fa29d5"
          + cloudfront_default_certificate = false
          + minimum_protocol_version       = "TLSv1.2_2021"
          + ssl_support_method             = "sni-only"
        }
    }

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

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

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

*Pushed by: @amavrogiannis, Action: `pull_request`*

@amavrogiannis amavrogiannis merged commit 1e8141c into main Mar 29, 2024
3 checks passed
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.

1 participant