Closed extronics closed 3 months ago
FWIW I was able to reproduce this same behavior.
Are you able to share more specific repro steps? I have been unable to reproduce this by moving env groups and services in and out of environments.
Are you able to share more specific repro steps? I have been unable to reproduce this by moving env groups and services in and out of environments.
This terraform code applies cleanly:
resource "render_project" "test_repro" {
name = "test-repro"
environments = {
"test" : {
name : "test",
protected_status : "unprotected"
}
}
}
resource "render_web_service" "test_repro" {
name = "test-repro"
environment_id = render_project.test_repro.environments.test.id
plan = "starter"
region = "ohio"
start_command = "gunicorn app:app"
runtime_source = {
native_runtime = {
branch = "master"
repo_url = "https://github.com/render-examples/flask-hello-world"
build_command = "pip install -r requirements.txt"
runtime = "python"
}
}
}
resource "render_env_group" "test_repro" {
name = "test-repro"
environment_id = render_project.test_repro.environments.test.id
}
resource "render_env_group_link" "test_repro" {
env_group_id = render_env_group.test_repro.id
service_ids = [render_web_service.test_repro.id]
}
Trivial changes e.g.
- build_command = "pip install -r requirements.txt"
+ build_command = "pip install -r requirements.txt "
will trigger the error on the next terraform apply
, and then further applies are clean.
The issue has been fixed in v0.2.1.
@danlamanna Your test case runs into a separate issue where the Render API will trim the white space from the start command, which results in an inconsistent result after apply
error. We'll work on getting a fix out for that.
When using environment groups and linking services to them, somethings a
terraform apply
fails with a message like this:The services updates anyways however and a subsequent
terraform apply
shows no differences between tf files and the infrastructure state.