Skip to content

Commit

Permalink
fix!: change the app link between resources with .id instead of .name…
Browse files Browse the repository at this point in the history
… to comply with the updated docs of Scalingo provider
  • Loading branch information
josephpage committed Aug 18, 2023
1 parent 58c5cf1 commit 349027d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addons.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "scalingo_addon" "addons" {
for_each = { for index, addon in var.addons : addon.provider => addon }

app = scalingo_app.app.name
app = scalingo_app.app.id
provider_id = each.value.provider
plan = each.value.plan
database_features = each.value.database_features
Expand Down
4 changes: 2 additions & 2 deletions app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "scalingo_app" "app" {
resource "scalingo_container_type" "containers" {
for_each = var.containers

app = scalingo_app.app.name
app = scalingo_app.app.id
name = each.key
amount = each.value.amount
size = each.value.size
Expand All @@ -29,7 +29,7 @@ resource "scalingo_container_type" "containers" {
resource "scalingo_autoscaler" "autoscalers" {
for_each = { for k, v in var.containers : k => v if v.autoscaler != null }

app = scalingo_app.app.name
app = scalingo_app.app.id
container_type = each.key
metric = each.value.autoscaler.metric
target = each.value.autoscaler.target
Expand Down
4 changes: 2 additions & 2 deletions domains.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "scalingo_domain" "canonical_domain" {
for_each = toset(var.domain != null ? [var.domain] : [])

app = scalingo_app.app.name
app = scalingo_app.app.id
canonical = true
common_name = var.domain

Expand All @@ -13,7 +13,7 @@ resource "scalingo_domain" "canonical_domain" {
resource "scalingo_domain" "domain_aliases" {
for_each = toset(var.domain_aliases)

app = scalingo_app.app.name
app = scalingo_app.app.id
canonical = false
common_name = each.key
}
2 changes: 1 addition & 1 deletion log_drains.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
resource "scalingo_log_drain" "log_drain" {
for_each = { for log_drain in var.log_drains : log_drain.type => log_drain }

app = scalingo_app.app.name
app = scalingo_app.app.id

type = each.value.type
url = sensitive(each.value.url)
Expand Down

0 comments on commit 349027d

Please sign in to comment.