widdix / mastodon-on-aws

Host your own Mastodon instance on AWS
https://cloudonaut.io/mastodon-on-aws/
136 stars 27 forks source link

Update of HostedZone fails #39

Open sibezza opened 1 year ago

sibezza commented 1 year ago

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

michaelwittig commented 1 year ago

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'
  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.

sibezza commented 1 year ago

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?

michaelwittig commented 1 year ago

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

austinmw commented 4 days ago

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