ServiceIdentity

Example Usage

Service Identity Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.projects.ServiceIdentity;
import com.pulumi.gcp.projects.ServiceIdentityArgs;
import com.pulumi.gcp.projects.IAMMember;
import com.pulumi.gcp.projects.IAMMemberArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var project = OrganizationsFunctions.getProject();
var hcSa = new ServiceIdentity("hcSa", ServiceIdentityArgs.builder()
.project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
.service("healthcare.googleapis.com")
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var hcSaBqJobuser = new IAMMember("hcSaBqJobuser", IAMMemberArgs.builder()
.project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
.role("roles/bigquery.jobUser")
.member(hcSa.email().applyValue(email -> String.format("serviceAccount:%s", email)))
.build());
}
}

Import

This resource does not support import.

Properties

Link copied to clipboard
val email: Output<String>

The email address of the Google managed service account.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val service: Output<String>

The service to generate identity for.

Link copied to clipboard
val urn: Output<String>