Skip to content

Restore generic dreadgoad.yaml defaults - #417

Merged
mkultraWasHere merged 3 commits into
mainfrom
fix/generic-dreadgoad-config
Aug 5, 2026
Merged

Restore generic dreadgoad.yaml defaults#417
mkultraWasHere merged 3 commits into
mainfrom
fix/generic-dreadgoad-config

Conversation

@mkultraWasHere

@mkultraWasHere mkultraWasHere commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

dreadgoad.yaml is the template every user starts from, but #344 committed a working copy from a one-off deployment. This reverts the deployment-specific values.

Changed

  • env: back to staging
  • provider: back to aws; the hardcoded region is commented out again
  • idle_timeout: 36001200

Removed

  • The bespoke per-deployment environment block
  • Variant overrides (variant/variant_source/variant_target/variant_name) that Variant generator fixes + Azure provisioning support #344 grafted onto the shared staging and test environments — staging is variant: false and test is CIDR-only again

Fixed

Two pre-existing template bugs, both surfaced in review:

  • instance_profile was hardcoded to WarpgateImageBuilderInstanceProfile, an IAM profile no Terraform in this repo creates. ami build stamps any non-empty value onto every AMI target (ami.go:260-262) and no warpgate template sets one itself, so a new user's build pointed at a profile absent from their account. Now commented out, restoring viper.SetDefault("instance_profile", "") — which is what makes the instance factory create its own profile (iam.tf:37).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reverts dreadgoad.yaml back to a generic, non-deployment-specific starter configuration by restoring default environment/provider values and removing the Azure dreadindex-specific environment and variant overrides.

Changes:

  • Set default env to staging and provider to aws, and reverted the pinned region to a commented template value.
  • Reduced idle_timeout from 3600 to 1200.
  • Removed the dreadindex environment block and GOAD-dreadindex variant overrides from staging and test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dreadgoad.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

dreadgoad.yaml:5

  • instance_profile is hardcoded to WarpgateImageBuilderInstanceProfile, but that identifier isn’t defined or referenced anywhere else in the repo. Since ami build passes cfg.InstanceProfile through when no flag is set, this template default can cause AWS Image Builder runs to fail for new users unless they happen to have an IAM instance profile with that exact name. Consider leaving it empty (or commented out) so the default matches viper.SetDefault("instance_profile", "").
instance_profile: WarpgateImageBuilderInstanceProfile  # IAM instance profile for EC2 Image Builder

@mkultraWasHere

mkultraWasHere commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Re: the suppressed comment on dreadgoad.yaml:5 (instance_profile) — confirmed and fixed in b888b93, now commented out.

The name appears nowhere else in the repo except a struct-plumbing assertion in config_test.go:288; no Terraform creates it. Meanwhile modules/terraform-aws-instance-factory/iam.tf:37 creates a profile precisely when the value is empty, and none of the six warpgate-templates/*/warpgate.yaml set instance_profile_name, so the template value was the only source feeding ami.go:260-262. Commenting it out restores the viper.SetDefault("instance_profile", "") behavior.

mkultraWasHere and others added 3 commits August 4, 2026 23:36
PR #344 committed a working dreadgoad.yaml from a one-off deployment:
env, provider and region pinned to that deployment, a bespoke
environment block, and variant overrides grafted onto the shared
staging and test environments. The checked-in config is a template
every user starts from, so it should not carry one deployment's state.

Restores env: staging, provider: aws, the commented-out region, and
idle_timeout: 1200, and drops the deployment-specific variant blocks.
Keeps azure in the provider comment list, since that provider support
is real.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The comment described the top-level region as an override defaulting to
the inventory. Both halves were wrong: ResolveRegion treats it as the
lowest-precedence fallback behind --region/DREADGOAD_REGION and the
active environment's region, and the inventory is only consulted by
ResolveRegionWithInventory, which just two SSM-adjacent call sites use.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
WarpgateImageBuilderInstanceProfile is a Dreadnode-specific IAM profile
that no Terraform in this repo creates, yet the template shipped it as
an active default. ami build resolves flag -> cfg.InstanceProfile -> ""
and stamps any non-empty value onto every AMI target, and none of the
warpgate templates set one themselves, so a new user's build pointed at
a profile that does not exist in their account.

Commenting it out restores viper's "" default, which lets the instance
factory create its own profile. Anyone who needs the named profile can
uncomment it or pass --instance-profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mkultraWasHere
mkultraWasHere force-pushed the fix/generic-dreadgoad-config branch from 33d9cc4 to b888b93 Compare August 5, 2026 03:36
@mkultraWasHere
mkultraWasHere added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit e2746c6 Aug 5, 2026
9 checks passed
@mkultraWasHere
mkultraWasHere deleted the fix/generic-dreadgoad-config branch August 5, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants