-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix: unable to unset auto_deploy_by_custom_glob property of environme… #720
Changes from all commits
3aa0852
0921969
531dd91
3c7d9e5
c1e38a1
9b488b3
726e269
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,36 @@ resource "env0_project" "test_project" { | |
force_destroy = true | ||
} | ||
|
||
data "env0_template" "github_template_for_environment" { | ||
name = "Github Integrated Template" | ||
} | ||
|
||
resource "env0_template" "template" { | ||
name = "Template for environment resource-${random_string.random.result}" | ||
type = "terraform" | ||
repository = "https://github.com/env0/templates" | ||
path = "misc/null-resource" | ||
terraform_version = "0.15.1" | ||
repository = data.env0_template.github_template_for_environment.repository | ||
github_installation_id = data.env0_template.github_template_for_environment.github_installation_id | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how did it work until now without installation id? is it required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Up until now it wasn't a github repo (even if the URL was set to github). |
||
name = "Template for environment resource-${random_string.random.result}" | ||
type = "terraform" | ||
path = "misc/null-resource" | ||
terraform_version = "0.15.1" | ||
} | ||
|
||
resource "env0_template_project_assignment" "assignment" { | ||
template_id = env0_template.template.id | ||
project_id = env0_project.test_project.id | ||
} | ||
|
||
resource "env0_environment" "auto_glob_envrironment" { | ||
depends_on = [env0_template_project_assignment.assignment] | ||
name = "environment-auto-glob-${random_string.random.result}" | ||
project_id = env0_project.test_project.id | ||
template_id = env0_template.template.id | ||
auto_deploy_by_custom_glob = var.second_run ? "" : "//*" | ||
auto_deploy_on_path_changes_only = true | ||
approve_plan_automatically = true | ||
deploy_on_push = true | ||
force_destroy = true | ||
} | ||
|
||
resource "env0_environment" "example" { | ||
depends_on = [env0_template_project_assignment.assignment] | ||
force_destroy = true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a
TODO
in the file. if it's something that won't happen, remove it. if it's something that needs addressing, please open an issue and attach link so we'll know what's that about... let's keep the tests tidy as wellThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open an issue. But the change may first need to be made in org itself. Have an environment with state access.
(I don't think it's simple to set it up... but might be wrong...).