I am trying to add an origin to my already existing Cloudfront distribution(created outside of Cloudformation).
Looking at the AWS::CloudFront::DistributionOrigin block in the AWS docs , I could not find any property where I could specify an already existing Cloudfront distribution Id/ARN to add my origin to.
AWS::CloudFront::DistributionOrigin
{
"CustomOriginConfig" : CustomOriginConfig,
"DomainName" : String,
"Id" : String, (this is the Origin Id)
"OriginCustomHeaders" : [ OriginCustomHeader, ... ],
"OriginPath" : String,
"S3OriginConfig" : S3OriginConfig
}
The console let's me add an origin easily to an already existing distribution and I feel the same should have been possible through Cloudformation. Is there a way I can update my existing Cloudfront distribution with a new origin through Cloudformation ?
The answer is: there's no way. As you can see in documentation AWS::CloudFront::Distribution Origin - Distribution Origin
is part of Distribution - it is not standalone resource.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.