Skip to content

IAM policy for Google Cloud Healthcare DICOM store

\~> Warning: These resources are in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

Three different resources help you manage your IAM policy for Healthcare DICOM store. Each of these resources serves a different use case:

  • googleHealthcareDicomStoreIamPolicy: Authoritative. Sets the IAM policy for the DICOM store and replaces any existing policy already attached.
  • googleHealthcareDicomStoreIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the DICOM store are preserved.
  • googleHealthcareDicomStoreIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the DICOM store are preserved.

\~> Note: googleHealthcareDicomStoreIamPolicy cannot be used in conjunction with googleHealthcareDicomStoreIamBinding and googleHealthcareDicomStoreIamMember or they will fight over what your policy should be.

\~> Note: googleHealthcareDicomStoreIamBinding resources can be used in conjunction with googleHealthcareDicomStoreIamMember resources only if they do not grant privilege to the same role.

googleHealthcareDicomStoreIamPolicy

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const dataGoogleIamPolicyAdmin =
  new google.dataGoogleIamPolicy.DataGoogleIamPolicy(this, "admin", {
    binding: [
      {
        members: ["user:jane@example.com"],
        role: "roles/editor",
      },
    ],
  });
new google.healthcareDicomStoreIamPolicy.HealthcareDicomStoreIamPolicy(
  this,
  "dicom_store",
  {
    dicom_store_id: "your-dicom-store-id",
    policy_data: dataGoogleIamPolicyAdmin.policyData,
  }
);

googleHealthcareDicomStoreIamBinding

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.healthcareDicomStoreIamBinding.HealthcareDicomStoreIamBinding(
  this,
  "dicom_store",
  {
    dicom_store_id: "your-dicom-store-id",
    members: ["user:jane@example.com"],
    role: "roles/editor",
  }
);

googleHealthcareDicomStoreIamMember

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.healthcareDicomStoreIamMember.HealthcareDicomStoreIamMember(
  this,
  "dicom_store",
  {
    dicom_store_id: "your-dicom-store-id",
    member: "user:jane@example.com",
    role: "roles/editor",
  }
);

Argument Reference

The following arguments are supported:

  • dicomStoreId - (Required) The DICOM store ID, in the form {projectId}/{locationName}/{datasetName}/{dicomStoreName} or {locationName}/{datasetName}/{dicomStoreName}. In the second form, the provider's project setting will be used as a fallback.

  • member/members - (Required) Identities that will be granted the privilege in role. Each entry can have one of the following values:

    • allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
    • allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
    • user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
    • serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
    • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
    • domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • role - (Required) The role that should be applied. Only one googleHealthcareDicomStoreIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parentName}/roles/{roleName}.

  • policyData - (Required only by googleHealthcareDicomStoreIamPolicy) The policy data generated by a googleIamPolicy data source.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • etag - (Computed) The etag of the DICOM store's IAM policy.

Import

IAM member imports use space-delimited identifiers; the resource in question, the role, and the account. This member resource can be imported using the dicomStoreId, role, and account e.g.

$ terraform import google_healthcare_dicom_store_iam_member.dicom_store_iam "your-project-id/location-name/dataset-name/dicom-store-name roles/viewer user:foo@example.com"

IAM binding imports use space-delimited identifiers; the resource in question and the role. This binding resource can be imported using the dicomStoreId and role, e.g.

$ terraform import google_healthcare_dicom_store_iam_binding.dicom_store_iam "your-project-id/location-name/dataset-name/dicom-store-name roles/viewer"

IAM policy imports use the identifier of the resource in question. This policy resource can be imported using the dicomStoreId, role, and account e.g.

$ terraform import google_healthcare_dicom_store_iam_policy.dicom_store_iam your-project-id/location-name/dataset-name/dicom-store-name