Declarative control of Squarespace resource constructs, via declastruct.
Declare the structures you want. Plan to see the changes required. Apply to make it so 🪄
npm install -s declastruct-squarespacedeclare the resources you wish to have - and what state you wish them to be in
import { UnexpectedCodePathError } from 'helpful-errors';
export const getProviders = async (): Promise<DeclastructProvider[]> => [
getDeclastructAwsProvider(
{},
{
log: console,
},
),
];
export const getResources = async (): Promise<DomainEntity<any>[]> => {
// declare the resources you wish to construct
};plan how to achieve the wish of resources you've declared
this will emit a plan that declares the changes required in order to fulfill the wish
npx declastruct plan --wish provision/github/resources.ts --output provision/github/.temp/plan.jsonapply the plan to fulfill the wish
this will apply only the changes declared in the plan - and only if this plan is still applicable
npx declastruct apply --plan provision/github/.temp/plan.json