You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There for the last cloudfront config will overwrite them all causing each s3-website to have the same configuration.
I think the way to resolve this would be to prefix the sub component names with the component name in the project. The same way we handled the config files
s3cloudfront1-cloudfront
s3cloudfront2-cloudfront
The text was updated successfully, but these errors were encountered:
@Guslington@toshke yeah I tried to modified the s3-cloudfront component to use the component_name as part of the component name for cloudfront component
I just ran into this problem using the s3-cloudfront component. My solution was a bit hacky, but it was to give the CloudFront component a custom name, and then give config block a matching name so that they link. For example, using this config in my project:
# defaultsbucket_name: frontend.${EnvironmentName}.${DnsDomain}cloudfront_component_name: cloudfrontcomponents:
cloudfront: # This must match 'cloudfront_component_name'config:
...
The issue is when you use the same component multiple times that is referencing an upstream component.
For example take a project that manages 2 s3-websites that includes the
s3-cloudfront
component twice.The
s3-cloudfront
component inlines thecloudfront
component with the name hardcoded tocloudfront
. https://github.com/theonestack/hl-component-s3-cloudfront/blob/master/s3-cloudfront.cfhighlander.rb#L11There for the last cloudfront config will overwrite them all causing each s3-website to have the same configuration.
I think the way to resolve this would be to prefix the sub component names with the component name in the project. The same way we handled the config files
The text was updated successfully, but these errors were encountered: