[Sentry][Terraform]MembersとTeamsの作成をloopとflatten処理によるfor_each/Localsで行う

[Azure][Terraform]Sentryの設定

https://developer.hashicorp.com/terraform/language/meta-arguments/for_each

https://developer.hashicorp.com/terraform/language/values/locals

https://developer.hashicorp.com/terraform/language/functions/flatten

https://registry.terraform.io/providers/jianyuan/sentry/latest/docs/resources/team

https://registry.terraform.io/providers/jianyuan/sentry/latest/docs/resources/organization_member

https://registry.terraform.io/providers/jianyuan/sentry/latest/docs/resources/team_member

  • team_member.tf

  • import

sentry_team_memberではteamの指定が一つしかできないため、複数指定したい場合はfor_each(ループ)、locals(変数)、flatten(配列の入れ子構造の平坦化)を利用して別リソース名として定義すれば可能。

ProjectsのTerraform化は以下。

[Sentry][Terraform]Projectsのfor_eachとLocals化

Was this helpful?

0 / 0

コメントを残す