AccessApprovalSettings

class AccessApprovalSettings : KotlinCustomResource

Access Approval enables you to require your explicit approval whenever Google support and engineering need to access your customer content. To get more information about OrganizationSettings, see:

Example Usage

Organization Access Approval Full

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.AccessApprovalSettings;
import com.pulumi.gcp.organizations.AccessApprovalSettingsArgs;
import com.pulumi.gcp.organizations.inputs.AccessApprovalSettingsEnrolledServiceArgs;
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) {
var organizationAccessApproval = new AccessApprovalSettings("organizationAccessApproval", AccessApprovalSettingsArgs.builder()
.enrolledServices(
AccessApprovalSettingsEnrolledServiceArgs.builder()
.cloudProduct("appengine.googleapis.com")
.build(),
AccessApprovalSettingsEnrolledServiceArgs.builder()
.cloudProduct("dataflow.googleapis.com")
.enrollmentLevel("BLOCK_ALL")
.build())
.notificationEmails(
"testuser@example.com",
"example.user@example.com")
.organizationId("123456789")
.build());
}
}

Organization Access Approval Active Key Version

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
import com.pulumi.gcp.kms.CryptoKey;
import com.pulumi.gcp.kms.CryptoKeyArgs;
import com.pulumi.gcp.kms.inputs.CryptoKeyVersionTemplateArgs;
import com.pulumi.gcp.accessapproval.AccessapprovalFunctions;
import com.pulumi.gcp.accessapproval.inputs.GetOrganizationServiceAccountArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMMember;
import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs;
import com.pulumi.gcp.kms.KmsFunctions;
import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyVersionArgs;
import com.pulumi.gcp.organizations.AccessApprovalSettings;
import com.pulumi.gcp.organizations.AccessApprovalSettingsArgs;
import com.pulumi.gcp.organizations.inputs.AccessApprovalSettingsEnrolledServiceArgs;
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) {
var myProject = new Project("myProject", ProjectArgs.builder()
.projectId("your-project-id")
.orgId("123456789")
.build());
var keyRing = new KeyRing("keyRing", KeyRingArgs.builder()
.location("global")
.project(myProject.projectId())
.build());
var cryptoKey = new CryptoKey("cryptoKey", CryptoKeyArgs.builder()
.keyRing(keyRing.id())
.purpose("ASYMMETRIC_SIGN")
.versionTemplate(CryptoKeyVersionTemplateArgs.builder()
.algorithm("EC_SIGN_P384_SHA384")
.build())
.build());
final var serviceAccount = AccessapprovalFunctions.getOrganizationServiceAccount(GetOrganizationServiceAccountArgs.builder()
.organizationId("123456789")
.build());
var iam = new CryptoKeyIAMMember("iam", CryptoKeyIAMMemberArgs.builder()
.cryptoKeyId(cryptoKey.id())
.role("roles/cloudkms.signerVerifier")
.member(String.format("serviceAccount:%s", serviceAccount.applyValue(getOrganizationServiceAccountResult -> getOrganizationServiceAccountResult.accountEmail())))
.build());
final var cryptoKeyVersion = KmsFunctions.getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs.builder()
.cryptoKey(cryptoKey.id())
.build());
var organizationAccessApproval = new AccessApprovalSettings("organizationAccessApproval", AccessApprovalSettingsArgs.builder()
.organizationId("123456789")
.activeKeyVersion(cryptoKeyVersion.applyValue(getKMSCryptoKeyVersionResult -> getKMSCryptoKeyVersionResult).applyValue(cryptoKeyVersion -> cryptoKeyVersion.applyValue(getKMSCryptoKeyVersionResult -> getKMSCryptoKeyVersionResult.name())))
.enrolledServices(AccessApprovalSettingsEnrolledServiceArgs.builder()
.cloudProduct("all")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(iam)
.build());
}
}

Import

OrganizationSettings can be imported using any of these accepted formats

$ pulumi import gcp:organizations/accessApprovalSettings:AccessApprovalSettings default organizations/{{organization_id}}/accessApprovalSettings
$ pulumi import gcp:organizations/accessApprovalSettings:AccessApprovalSettings default {{organization_id}}

Properties

Link copied to clipboard
val activeKeyVersion: Output<String>?

The asymmetric crypto key version to use for signing approval requests. Empty active_key_version indicates that a Google-managed key should be used for signing.

Link copied to clipboard

This field will always be unset for the organization since organizations do not have ancestors.

Link copied to clipboard

This field will always be unset for the organization since organizations do not have ancestors.

Link copied to clipboard

A list of Google Cloud Services for which the given resource has Access Approval enrolled. Access requests for the resource given by name against any of these services contained here will be required to have explicit approval. Enrollment can be done for individual services. A maximum of 10 enrolled services will be enforced, to be expanded as the set of supported services is expanded. Structure is documented below.

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

If the field is true, that indicates that there is some configuration issue with the active_key_version configured on this Organization (e.g. it doesn't exist or the Access Approval service account doesn't have the correct permissions on it, etc.).

Link copied to clipboard
val name: Output<String>

The resource name of the settings. Format is "organizations/{organization_id}/accessApprovalSettings"

Link copied to clipboard

A list of email addresses to which notifications relating to approval requests should be sent. Notifications relating to a resource will be sent to all emails in the settings of ancestor resources of that resource. A maximum of 50 email addresses are allowed.

Link copied to clipboard
val organizationId: Output<String>

ID of the organization of the access approval settings.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>