rename iam variables in artifact registry

This commit is contained in:
Ludovico Magnocavallo 2020-11-04 16:56:57 +01:00
parent 25e1b8ac46
commit bf23199724
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ module "docker_artifact_registry" {
location = "europe-west1"
format = "DOCKER"
id = "myregistry"
iam_members = {
iam = {
"roles/artifactregistry.admin" = ["group:cicd@example.com"]
}
}
@ -28,7 +28,7 @@ module "docker_artifact_registry" {
| project_id | Registry project id. | <code title="">string</code> | ✓ | |
| *description* | An optional description for the repository | <code title="">string</code> | | <code title="">Terraform-managed registry</code> |
| *format* | Repository format. One of DOCKER or UNSPECIFIED | <code title="">string</code> | | <code title="">DOCKER</code> |
| *iam_members* | Map of member lists used to set authoritative bindings, keyed by role. | <code title="map&#40;set&#40;string&#41;&#41;">map(set(string))</code> | | <code title="">{}</code> |
| *iam* | IAM bindings in {ROLE => [MEMBERS]} format. | <code title="map&#40;list&#40;string&#41;&#41;">map(list(string))</code> | | <code title="">{}</code> |
| *labels* | Labels to be attached to the registry. | <code title="map&#40;string&#41;">map(string)</code> | | <code title="">{}</code> |
| *location* | Registry location. Use `gcloud beta artifacts locations list' to get valid values | <code title="">string</code> | | <code title=""></code> |

View File

@ -26,7 +26,7 @@ resource "google_artifact_registry_repository" "registry" {
resource "google_artifact_registry_repository_iam_binding" "bindings" {
provider = google-beta
for_each = var.iam_members
for_each = var.iam
project = var.project_id
location = google_artifact_registry_repository.registry.location
repository = google_artifact_registry_repository.registry.name

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
variable "iam_members" {
description = "Map of member lists used to set authoritative bindings, keyed by role."
type = map(set(string))
variable "iam" {
description = "IAM bindings in {ROLE => [MEMBERS]} format."
type = map(list(string))
default = {}
}