如何从Terraform中的特定帐户禁用部署

时间:2019-06-20 14:28:58

标签: terraform terraform-provider-aws

这是我的允许某些帐户ID进行部署的配置。

provider "aws" {
  #shared_credentials_file = "$HOME/.aws/credentials"
  region                  = "${var.region}"
  #profile = "customprofile"
  allowed_account_ids=["164*******65"] 
}

这工作正常,但是我已经配置了多个帐户,并且我想禁止某些帐户ID,而是每次allowed_acccount_ids个字段都进行更新。

谢谢。

1 个答案:

答案 0 :(得分:2)

您可以将forbidden_account_ids用作黑名单,而不是通过allowed_account_ids将帐户列入白名单。