Repository: getmoto/moto

Issue:
Cloudfront Distribution not able to destroyed with newer versions of AWS Terraform provider
# Problem
I am unable to destroy a CloudFront distribution using Terraform AWS provider version 5.19.0+.  Version 5.18.1 and below works as expected. [Here is the link to the changelog for aws provider version 5.19.0](https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.19.0) where I believe something was changed in the provider that moto is no longer able to handle properly.

# Reproduction
providers.tf
```hcl
terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      # version = "5.18.1" # with this line uncommented, the destroy works
    }
  }
}

provider "aws" {
  region                      = "us-east-1"
  s3_use_path_style           = true
  skip_credentials_validation = true
  skip_metadata_api_check     = true
  skip_requesting_account_id  = true

  endpoints {
    s3         = "http://localhost:5000"
    cloudfront = "http://localhost:5000"
  }

  access_key = "my-access-key"
  secret_key = "my-secret-key"
}

```
cloudfront.tf
```hcl
resource "aws_s3_bucket" "bucket" {
  bucket = "test-bucket"
}

module "cloudfront" {
  source  = "terraform-aws-modules/cloudfront/aws"
  version = "3.2.1"

  default_cache_behavior = {
    target_origin_id       = "s3-bucket"
    viewer_protocol_policy = "allow-all"
  }

  origin = {
    s3-bucket = {
      domain_name = aws_s3_bucket.bucket.bucket_domain_name
    }
  }
}
```
Error
```shell
│ Error: disabling CloudFront Distribution (AFCASYTSHBT50): InvalidOrigin: The specified origin server does not exist or is not valid.
│       status code: 400, request id: 30c0dedb-92b1-4e2b-9be4-1188e3ed86ab
```
# Expectation
I expect that I can use newer versions of the AWS provider to destroy cloudfront distributions.

# Current Setup
```yaml
services:
  moto-server:
    image: motoserver/moto:latest
    ports:
      - 5000:5000
 ```


Discussion:

Resolving patch:
diff --git a/moto/cloudfront/exceptions.py b/moto/cloudfront/exceptions.py
--- a/moto/cloudfront/exceptions.py
+++ b/moto/cloudfront/exceptions.py
@@ -33,14 +33,6 @@ def __init__(self) -> None:
         )
 
 
-class InvalidOriginServer(CloudFrontException):
-    def __init__(self) -> None:
-        super().__init__(
-            "InvalidOrigin",
-            message="The specified origin server does not exist or is not valid.",
-        )
-
-
 class DomainNameNotAnS3Bucket(CloudFrontException):
     def __init__(self) -> None:
         super().__init__(
diff --git a/moto/cloudfront/models.py b/moto/cloudfront/models.py
--- a/moto/cloudfront/models.py
+++ b/moto/cloudfront/models.py
@@ -12,7 +12,6 @@
     DistributionAlreadyExists,
     DomainNameNotAnS3Bucket,
     InvalidIfMatchVersion,
-    InvalidOriginServer,
     NoSuchDistribution,
     NoSuchOriginAccessControl,
     OriginDoesNotExist,
@@ -121,9 +120,6 @@ def __init__(self, origin: Dict[str, Any]):
         self.connection_attempts = origin.get("ConnectionAttempts") or 3
         self.connection_timeout = origin.get("ConnectionTimeout") or 10
 
-        if "S3OriginConfig" not in origin and "CustomOriginConfig" not in origin:
-            raise InvalidOriginServer
-
         if "S3OriginConfig" in origin:
             # Very rough validation
             if not self.domain_name.endswith("amazonaws.com"):


Test patch:
diff --git a/.github/workflows/tests_terraform_examples.yml b/.github/workflows/tests_terraform_examples.yml
--- a/.github/workflows/tests_terraform_examples.yml
+++ b/.github/workflows/tests_terraform_examples.yml
@@ -11,7 +11,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        service: ["acm", "route53"]
+        service: ["acm", "cloudfront", "route53"]
 
     steps:
     - uses: actions/checkout@v4
diff --git a/tests/test_cloudfront/test_cloudfront_distributions.py b/tests/test_cloudfront/test_cloudfront_distributions.py
--- a/tests/test_cloudfront/test_cloudfront_distributions.py
+++ b/tests/test_cloudfront/test_cloudfront_distributions.py
@@ -368,36 +368,6 @@ def test_get_distribution_config_with_mismatched_originid():
     )
 
 
-@mock_aws
-def test_create_origin_without_origin_config():
-    client = boto3.client("cloudfront", region_name="us-west-1")
-
-    with pytest.raises(ClientError) as exc:
-        client.create_distribution(
-            DistributionConfig={
-                "CallerReference": "ref",
-                "Origins": {
-                    "Quantity": 1,
-                    "Items": [{"Id": "origin1", "DomainName": "https://getmoto.org"}],
-                },
-                "DefaultCacheBehavior": {
-                    "TargetOriginId": "origin1",
-                    "ViewerProtocolPolicy": "allow-all",
-                },
-                "Comment": "an optional comment that's not actually optional",
-                "Enabled": False,
-            }
-        )
-
-    metadata = exc.value.response["ResponseMetadata"]
-    assert metadata["HTTPStatusCode"] == 400
-    err = exc.value.response["Error"]
-    assert err["Code"] == "InvalidOrigin"
-    assert (
-        err["Message"] == "The specified origin server does not exist or is not valid."
-    )
-
-
 @mock_aws
 def test_create_distribution_with_invalid_s3_bucket():
     client = boto3.client("cloudfront", region_name="us-west-1")