KeystoresAliasesSelfSignedCert |
An Environment Keystore Alias for Self Signed Certificate Format in Apigee
To get more information about KeystoresAliasesSelfSignedCert, see:
* [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases/create)
* How-to Guides
* [Creating an environment](https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment)
## Example Usage
### Apigee Env Keystore Alias Self Signed Cert
```java
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.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.apigee.Organization;
import com.pulumi.gcp.apigee.OrganizationArgs;
import com.pulumi.gcp.apigee.Environment;
import com.pulumi.gcp.apigee.EnvironmentArgs;
import com.pulumi.gcp.apigee.EnvKeystore;
import com.pulumi.gcp.apigee.EnvKeystoreArgs;
import com.pulumi.gcp.apigee.KeystoresAliasesSelfSignedCert;
import com.pulumi.gcp.apigee.KeystoresAliasesSelfSignedCertArgs;
import com.pulumi.gcp.apigee.inputs.KeystoresAliasesSelfSignedCertSubjectArgs;
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 project = new Project("project", ProjectArgs.builder()
.projectId("my-project")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.build());
var apigee = new Service("apigee", ServiceArgs.builder()
.project(project.projectId())
.service("apigee.googleapis.com")
.build());
var servicenetworking = new Service("servicenetworking", ServiceArgs.builder()
.project(project.projectId())
.service("servicenetworking.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(apigee)
.build());
var compute = new Service("compute", ServiceArgs.builder()
.project(project.projectId())
.service("compute.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var apigeeNetwork = new Network("apigeeNetwork", NetworkArgs.builder()
.project(project.projectId())
.build(), CustomResourceOptions.builder()
.dependsOn(compute)
.build());
var apigeeRange = new GlobalAddress("apigeeRange", GlobalAddressArgs.builder()
.purpose("VPC_PEERING")
.addressType("INTERNAL")
.prefixLength(16)
.network(apigeeNetwork.id())
.project(project.projectId())
.build());
var apigeeVpcConnection = new Connection("apigeeVpcConnection", ConnectionArgs.builder()
.network(apigeeNetwork.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(apigeeRange.name())
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var apigeeOrg = new Organization("apigeeOrg", OrganizationArgs.builder()
.analyticsRegion("us-central1")
.projectId(project.projectId())
.authorizedNetwork(apigeeNetwork.id())
.build(), CustomResourceOptions.builder()
.dependsOn(
apigeeVpcConnection,
apigee)
.build());
var apigeeEnvironmentKeystoreSsAliasEnvironment = new Environment("apigeeEnvironmentKeystoreSsAliasEnvironment", EnvironmentArgs.builder()
.orgId(apigeeOrg.id())
.description("Apigee Environment")
.displayName("environment-1")
.build());
var apigeeEnvironmentKeystoreAlias = new EnvKeystore("apigeeEnvironmentKeystoreAlias", EnvKeystoreArgs.builder()
.envId(apigeeEnvironmentKeystoreSsAliasEnvironment.id())
.build());
var apigeeEnvironmentKeystoreSsAliasKeystoresAliasesSelfSignedCert = new KeystoresAliasesSelfSignedCert("apigeeEnvironmentKeystoreSsAliasKeystoresAliasesSelfSignedCert", KeystoresAliasesSelfSignedCertArgs.builder()
.environment(apigeeEnvironmentKeystoreSsAliasEnvironment.name())
.orgId(apigeeOrg.name())
.keystore(apigeeEnvironmentKeystoreAlias.name())
.alias("alias")
.keySize(1024)
.sigAlg("SHA512withRSA")
.certValidityInDays(4)
.subject(KeystoresAliasesSelfSignedCertSubjectArgs.builder()
.commonName("selfsigned_example")
.countryCode("US")
.locality("TX")
.org("CCE")
.orgUnit("PSO")
.build())
.build());
}
}
```
## Import
KeystoresAliasesSelfSignedCert can be imported using any of these accepted formats
```sh
$ pulumi import gcp:apigee/keystoresAliasesSelfSignedCert:KeystoresAliasesSelfSignedCert default organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}
```
```sh
$ pulumi import gcp:apigee/keystoresAliasesSelfSignedCert:KeystoresAliasesSelfSignedCert default {{org_id}}/{{environment}}/{{keystore}}/{{alias}}
```
|