Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend AtlantisProject config for generating #351

Open
1 task done
Frezyy123 opened this issue Sep 5, 2024 · 0 comments
Open
1 task done

Extend AtlantisProject config for generating #351

Frezyy123 opened this issue Sep 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Frezyy123
Copy link

Feature Request

  • I'd be willing to implement this feature

Describe the idea
I would like to extend AtlantisProject type for changing options such as RepoLocks and SilencePRComments in generated projects
https://www.runatlantis.io/docs/repo-level-atlantis-yaml#repolocks

// config.go
type AtlantisProject struct {
        .......
        RepoLocks RepoLocksConfig `json:"repo_locks,omitempty"`

	// silence_pr_comments silences all comments on PRs for this project
	SilencePRComments []string `json:"silence_pr_comments,omitempty"`
}
type RepoLocksConfig struct {
	// The mode of the repo to lock
	Mode string `json:"mode"`
}

// generate.go
 	project := &AtlantisProject{
		Dir:               filepath.ToSlash(relativeSourceDir),
		Workflow:          workflow,
		TerraformVersion:  terraformVersion,
		ApplyRequirements: applyRequirements,
		RepoLocks: RepoLocksConfig{
		     Mode: "disabled",  // parsed from arguments
		}
		SilencePRComments: []string{"apply"},  // parsed from arguments
		Autoplan: AutoplanConfig{
			Enabled:      resolvedAutoPlan,
			WhenModified: uniqueStrings(relativeDependencies),
		},
	}

terragrunt-atlantis-config --silence-pr-comments plan --repo-locks disabled

Why is this helpful?
It will helps to manage project configuration for terragrunt repositories with atlantis

What alternatives exist today?
Bash scripts in pre/post workflow hook

@Almenon Almenon added the enhancement New feature or request label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants