vmc.PublicIp
Explore with Pulumi AI
Provides a resource to manage public IPs.
Note: Public IP resource implicitly depends on SDDC resource creation. SDDC must be provisioned before a public IP can be created.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vmc from "@pulumi/vmc";
const publicIp1 = new vmc.PublicIp("publicIp1", {
nsxtReverseProxyUrl: vmc_sddc.sddc_1.nsxt_reverse_proxy_url,
displayName: _var.public_ip_displayname,
});
import pulumi
import pulumi_vmc as vmc
public_ip1 = vmc.PublicIp("publicIp1",
nsxt_reverse_proxy_url=vmc_sddc["sddc_1"]["nsxt_reverse_proxy_url"],
display_name=var["public_ip_displayname"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vmc/vmc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vmc.NewPublicIp(ctx, "publicIp1", &vmc.PublicIpArgs{
NsxtReverseProxyUrl: pulumi.Any(vmc_sddc.Sddc_1.Nsxt_reverse_proxy_url),
DisplayName: pulumi.Any(_var.Public_ip_displayname),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vmc = Pulumi.Vmc;
return await Deployment.RunAsync(() =>
{
var publicIp1 = new Vmc.PublicIp("publicIp1", new()
{
NsxtReverseProxyUrl = vmc_sddc.Sddc_1.Nsxt_reverse_proxy_url,
DisplayName = @var.Public_ip_displayname,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vmc.PublicIp;
import com.pulumi.vmc.PublicIpArgs;
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 publicIp1 = new PublicIp("publicIp1", PublicIpArgs.builder()
.nsxtReverseProxyUrl(vmc_sddc.sddc_1().nsxt_reverse_proxy_url())
.displayName(var_.public_ip_displayname())
.build());
}
}
resources:
publicIp1:
type: vmc:PublicIp
properties:
nsxtReverseProxyUrl: ${vmc_sddc.sddc_1.nsxt_reverse_proxy_url}
displayName: ${var.public_ip_displayname}
Create PublicIp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PublicIp(name: string, args: PublicIpArgs, opts?: CustomResourceOptions);
@overload
def PublicIp(resource_name: str,
args: PublicIpArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PublicIp(resource_name: str,
opts: Optional[ResourceOptions] = None,
nsxt_reverse_proxy_url: Optional[str] = None,
display_name: Optional[str] = None,
public_ip_id: Optional[str] = None)
func NewPublicIp(ctx *Context, name string, args PublicIpArgs, opts ...ResourceOption) (*PublicIp, error)
public PublicIp(string name, PublicIpArgs args, CustomResourceOptions? opts = null)
public PublicIp(String name, PublicIpArgs args)
public PublicIp(String name, PublicIpArgs args, CustomResourceOptions options)
type: vmc:PublicIp
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var publicIpResource = new Vmc.PublicIp("publicIpResource", new()
{
NsxtReverseProxyUrl = "string",
DisplayName = "string",
PublicIpId = "string",
});
example, err := vmc.NewPublicIp(ctx, "publicIpResource", &vmc.PublicIpArgs{
NsxtReverseProxyUrl: pulumi.String("string"),
DisplayName: pulumi.String("string"),
PublicIpId: pulumi.String("string"),
})
var publicIpResource = new PublicIp("publicIpResource", PublicIpArgs.builder()
.nsxtReverseProxyUrl("string")
.displayName("string")
.publicIpId("string")
.build());
public_ip_resource = vmc.PublicIp("publicIpResource",
nsxt_reverse_proxy_url="string",
display_name="string",
public_ip_id="string")
const publicIpResource = new vmc.PublicIp("publicIpResource", {
nsxtReverseProxyUrl: "string",
displayName: "string",
publicIpId: "string",
});
type: vmc:PublicIp
properties:
displayName: string
nsxtReverseProxyUrl: string
publicIpId: string
PublicIp Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PublicIp resource accepts the following input properties:
- Nsxt
Reverse stringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- Display
Name string - Display name for public IP.
- Public
Ip stringId - Public IP identifier.
- Nsxt
Reverse stringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- Display
Name string - Display name for public IP.
- Public
Ip stringId - Public IP identifier.
- nsxt
Reverse StringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- display
Name String - Display name for public IP.
- public
Ip StringId - Public IP identifier.
- nsxt
Reverse stringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- display
Name string - Display name for public IP.
- public
Ip stringId - Public IP identifier.
- nsxt_
reverse_ strproxy_ url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- display_
name str - Display name for public IP.
- public_
ip_ strid - Public IP identifier.
- nsxt
Reverse StringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- display
Name String - Display name for public IP.
- public
Ip StringId - Public IP identifier.
Outputs
All input properties are implicitly available as output properties. Additionally, the PublicIp resource produces the following output properties:
Look up Existing PublicIp Resource
Get an existing PublicIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PublicIpState, opts?: CustomResourceOptions): PublicIp
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
ip: Optional[str] = None,
nsxt_reverse_proxy_url: Optional[str] = None,
public_ip_id: Optional[str] = None) -> PublicIp
func GetPublicIp(ctx *Context, name string, id IDInput, state *PublicIpState, opts ...ResourceOption) (*PublicIp, error)
public static PublicIp Get(string name, Input<string> id, PublicIpState? state, CustomResourceOptions? opts = null)
public static PublicIp get(String name, Output<String> id, PublicIpState state, CustomResourceOptions options)
resources: _: type: vmc:PublicIp get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Display
Name string - Display name for public IP.
- Ip string
- Public IP.
- Nsxt
Reverse stringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- Public
Ip stringId - Public IP identifier.
- Display
Name string - Display name for public IP.
- Ip string
- Public IP.
- Nsxt
Reverse stringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- Public
Ip stringId - Public IP identifier.
- display
Name String - Display name for public IP.
- ip String
- Public IP.
- nsxt
Reverse StringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- public
Ip StringId - Public IP identifier.
- display
Name string - Display name for public IP.
- ip string
- Public IP.
- nsxt
Reverse stringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- public
Ip stringId - Public IP identifier.
- display_
name str - Display name for public IP.
- ip str
- Public IP.
- nsxt_
reverse_ strproxy_ url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- public_
ip_ strid - Public IP identifier.
- display
Name String - Display name for public IP.
- ip String
- Public IP.
- nsxt
Reverse StringProxy Url - The NSX reverse proxy URL for managing public IP. Computed after SDDC creation.
- public
Ip StringId - Public IP identifier.
Import
Import the resource using the id
and nsxt_reverse_proxy_url
.
$ pulumi import vmc:index/publicIp:PublicIp public_ip_1 nsxt_reverse_proxy_url,id`
For example:
$ pulumi import vmc:index/publicIp:PublicIp public_ip_1 'https://nsx-44-228-76-55.rp.vmwarevmc.com/vmc/reverse-proxy/api/orgs/{orgI}/sddcs/afe7a0fd-3f0a-48b2-9ddb-0489c22732ae/sks-nsxt-manager,8d730ad4-aa6b-4f9f-9679-ec17beeaceaf'`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vmc vmware/terraform-provider-vmc
- License
- Notes
- This Pulumi package is based on the
vmc
Terraform Provider.