import * as pulumi from "@pulumi/pulumi"; /** * Apigee NAT (network address translation) address. A NAT address is a static external IP address used for Internet egress traffic. This is not avaible for Apigee hybrid. * * To get more information about NatAddress, see: * * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.instances.natAddresses) * * How-to Guides * * [Provisioning NAT IPs](https://cloud.google.com/apigee/docs/api-platform/security/nat-provisioning) * * ## Example Usage * * ### Apigee Nat Address Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const current = gcp.organizations.getClientConfig({}); * const apigeeNetwork = new gcp.compute.Network("apigee_network", {name: "apigee-network"}); * const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", { * name: "apigee-range", * purpose: "VPC_PEERING", * addressType: "INTERNAL", * prefixLength: 21, * network: apigeeNetwork.id, * }); * const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", { * network: apigeeNetwork.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [apigeeRange.name], * }); * const apigeeKeyring = new gcp.kms.KeyRing("apigee_keyring", { * name: "apigee-keyring", * location: "us-central1", * }); * const apigeeKey = new gcp.kms.CryptoKey("apigee_key", { * name: "apigee-key", * keyRing: apigeeKeyring.id, * }); * const apigeeSa = new gcp.projects.ServiceIdentity("apigee_sa", { * project: project.projectId, * service: apigee.service, * }); * const apigeeSaKeyuser = new gcp.kms.CryptoKeyIAMMember("apigee_sa_keyuser", { * cryptoKeyId: apigeeKey.id, * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: apigeeSa.member, * }); * const apigeeOrg = new gcp.apigee.Organization("apigee_org", { * analyticsRegion: "us-central1", * displayName: "apigee-org", * description: "Terraform-provisioned Apigee Org.", * projectId: current.then(current => current.project), * authorizedNetwork: apigeeNetwork.id, * runtimeDatabaseEncryptionKeyName: apigeeKey.id, * }, { * dependsOn: [ * apigeeVpcConnection, * apigeeSaKeyuser, * ], * }); * const apigeeInstance = new gcp.apigee.Instance("apigee_instance", { * name: "apigee-instance", * location: "us-central1", * description: "Terraform-managed Apigee Runtime Instance", * displayName: "apigee-instance", * orgId: apigeeOrg.id, * diskEncryptionKeyName: apigeeKey.id, * }); * const apigee_nat = new gcp.apigee.NatAddress("apigee-nat", { * name: "my-nat-address", * instanceId: apigeeInstance.id, * }); * ``` * ### Apigee Nat Address With Activate * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const current = gcp.organizations.getClientConfig({}); * const apigeeNetwork = new gcp.compute.Network("apigee_network", {name: "apigee-network"}); * const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", { * name: "apigee-range", * purpose: "VPC_PEERING", * addressType: "INTERNAL", * prefixLength: 21, * network: apigeeNetwork.id, * }); * const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", { * network: apigeeNetwork.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [apigeeRange.name], * }); * const apigeeKeyring = new gcp.kms.KeyRing("apigee_keyring", { * name: "apigee-keyring", * location: "us-central1", * }); * const apigeeKey = new gcp.kms.CryptoKey("apigee_key", { * name: "apigee-key", * keyRing: apigeeKeyring.id, * }); * const apigeeSa = new gcp.projects.ServiceIdentity("apigee_sa", { * project: project.projectId, * service: apigee.service, * }); * const apigeeSaKeyuser = new gcp.kms.CryptoKeyIAMMember("apigee_sa_keyuser", { * cryptoKeyId: apigeeKey.id, * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: apigeeSa.member, * }); * const apigeeOrg = new gcp.apigee.Organization("apigee_org", { * analyticsRegion: "us-central1", * displayName: "apigee-org", * description: "Terraform-provisioned Apigee Org.", * projectId: current.then(current => current.project), * authorizedNetwork: apigeeNetwork.id, * runtimeDatabaseEncryptionKeyName: apigeeKey.id, * }, { * dependsOn: [ * apigeeVpcConnection, * apigeeSaKeyuser, * ], * }); * const apigeeInstance = new gcp.apigee.Instance("apigee_instance", { * name: "apigee-instance", * location: "us-central1", * description: "Terraform-managed Apigee Runtime Instance", * displayName: "apigee-instance", * orgId: apigeeOrg.id, * diskEncryptionKeyName: apigeeKey.id, * }); * const apigee_nat = new gcp.apigee.NatAddress("apigee-nat", { * name: "my-nat-address", * activate: true, * instanceId: apigeeInstance.id, * }); * ``` * * ## Import * * NatAddress can be imported using any of these accepted formats: * * * `{{instance_id}}/natAddresses/{{name}}` * * * `{{instance_id}}/{{name}}` * * When using the `pulumi import` command, NatAddress can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:apigee/natAddress:NatAddress default {{instance_id}}/natAddresses/{{name}} * ``` * * ```sh * $ pulumi import gcp:apigee/natAddress:NatAddress default {{instance_id}}/{{name}} * ``` */ export declare class NatAddress extends pulumi.CustomResource { /** * Get an existing NatAddress resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: NatAddressState, opts?: pulumi.CustomResourceOptions): NatAddress; /** * Returns true if the given object is an instance of NatAddress. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is NatAddress; /** * Flag that specifies whether the reserved NAT address should be activate. */ readonly activate: pulumi.Output; /** * The Apigee instance associated with the Apigee environment, * in the format `organizations/{{org_name}}/instances/{{instance_name}}`. */ readonly instanceId: pulumi.Output; /** * The allocated NAT IP address. */ readonly ipAddress: pulumi.Output; /** * Resource ID of the NAT address. */ readonly name: pulumi.Output; /** * State of the NAT IP address. */ readonly state: pulumi.Output; /** * Create a NatAddress resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: NatAddressArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NatAddress resources. */ export interface NatAddressState { /** * Flag that specifies whether the reserved NAT address should be activate. */ activate?: pulumi.Input; /** * The Apigee instance associated with the Apigee environment, * in the format `organizations/{{org_name}}/instances/{{instance_name}}`. */ instanceId?: pulumi.Input; /** * The allocated NAT IP address. */ ipAddress?: pulumi.Input; /** * Resource ID of the NAT address. */ name?: pulumi.Input; /** * State of the NAT IP address. */ state?: pulumi.Input; } /** * The set of arguments for constructing a NatAddress resource. */ export interface NatAddressArgs { /** * Flag that specifies whether the reserved NAT address should be activate. */ activate?: pulumi.Input; /** * The Apigee instance associated with the Apigee environment, * in the format `organizations/{{org_name}}/instances/{{instance_name}}`. */ instanceId: pulumi.Input; /** * Resource ID of the NAT address. */ name?: pulumi.Input; }