mastodon-on-aws icon indicating copy to clipboard operation
mastodon-on-aws copied to clipboard

Update of HostedZone fails

Open sibezza opened this issue 2 years ago • 3 comments

Initial CF stack deployment completed successfully, following the instructions in your README. We initially attached Route53 to a subdomain of an existing TLD while we appraised Mastodon itself. We now want to move it to its own TLD, and attempted to do so by updating the stack using the existing template, and just changing the domain name. The nested stack 'mastodon-on-aws-HostedZone' update failed with the following error: Export mastodon-on-aws-HostedZone-JBF4DGI244BG-Id cannot be updated as it is in use by mastodon-on-aws-Certificate-5JU2DVO0L8TX and mastodon-on-aws-Record-11NDK0SP12680

sibezza avatar Jun 10 '23 10:06 sibezza

Hi @sibezza Changing the DomainName is not possible out of the box. What you could do (without loosing data) is this:

  1. Open the CloudFormation template (mastodon.yml) in an text editor, uncomment the following resources:

Example:

Resources:
  Secret:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      # [...]
#  HostedZone:
#    Type: 'AWS::CloudFormation::Stack'
#    Properties:
#      Parameters:
#        Name: !Ref DomainName
#      TemplateURL: './node_modules/@cfn-modules/route53-hosted-zone-public/module.yml'
  • HostedZone
  • Certificate
  • AlbListener
  • Target
  • WebService
  • StreamingApiTarget
  • StreamingApiService
  • Record
  • Dkim1Record
  • Dkim2Record
  • Dkim3Record
  1. Update the stack with the new DomainName parameter and the modified template. Wait for the update to finish.

  2. Revert the changes to the template and update the stack with the original template. Wait for the update to finish.

michaelwittig avatar Jun 12 '23 09:06 michaelwittig

Thank you for your suggestion, although this fails for me. The issue I have is with the format of the TemplateURL. Having checked out and edited the mastodon.yaml locally as suggested, I then attempted to update the stack by uploading the revised template. It failed almost immediately on Alerting, Cluster, Bucket, and AlbAccessLogBucket with TemplateURL must be a supported URL which I'm guessing is due to their relative paths?

sibezza avatar Jun 15 '23 22:06 sibezza

Sorry, the "packaged" template that you have to modify can be found here https://s3.eu-central-1.amazonaws.com/mastodon-on-aws-cloudformation/latest/quickstart.yml

michaelwittig avatar Jun 16 '23 08:06 michaelwittig

I also get TemplateURL must be a supported URL errors, any idea why?

austinmw avatar Jun 29 '24 15:06 austinmw

@austinmw Which CloudFormation template do you use to create the stack?

andreaswittig avatar Jul 04 '24 18:07 andreaswittig

Looks like I was getting that due to missing node dependencies from #45

austinmw avatar Jul 05 '24 20:07 austinmw

Issue seems to be caused by not using the packaged template.

andreaswittig avatar Jul 12 '24 09:07 andreaswittig