Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.vmwareengine.getExternalAccessRule
Explore with Pulumi AI
Use this data source to get details about a external access rule resource.
To get more information about external address, see:
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myExternalAccessRule = gcp.vmwareengine.getExternalAccessRule({
    name: "my-external-access-rule",
    parent: "project/my-project/locations/us-west1-a/networkPolicies/my-network-policy",
});
import pulumi
import pulumi_gcp as gcp
my_external_access_rule = gcp.vmwareengine.get_external_access_rule(name="my-external-access-rule",
    parent="project/my-project/locations/us-west1-a/networkPolicies/my-network-policy")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/vmwareengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vmwareengine.LookupExternalAccessRule(ctx, &vmwareengine.LookupExternalAccessRuleArgs{
			Name:   "my-external-access-rule",
			Parent: "project/my-project/locations/us-west1-a/networkPolicies/my-network-policy",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var myExternalAccessRule = Gcp.VMwareEngine.GetExternalAccessRule.Invoke(new()
    {
        Name = "my-external-access-rule",
        Parent = "project/my-project/locations/us-west1-a/networkPolicies/my-network-policy",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vmwareengine.VmwareengineFunctions;
import com.pulumi.gcp.vmwareengine.inputs.GetExternalAccessRuleArgs;
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 myExternalAccessRule = VmwareengineFunctions.getExternalAccessRule(GetExternalAccessRuleArgs.builder()
            .name("my-external-access-rule")
            .parent("project/my-project/locations/us-west1-a/networkPolicies/my-network-policy")
            .build());
    }
}
variables:
  myExternalAccessRule:
    fn::invoke:
      function: gcp:vmwareengine:getExternalAccessRule
      arguments:
        name: my-external-access-rule
        parent: project/my-project/locations/us-west1-a/networkPolicies/my-network-policy
Using getExternalAccessRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getExternalAccessRule(args: GetExternalAccessRuleArgs, opts?: InvokeOptions): Promise<GetExternalAccessRuleResult>
function getExternalAccessRuleOutput(args: GetExternalAccessRuleOutputArgs, opts?: InvokeOptions): Output<GetExternalAccessRuleResult>def get_external_access_rule(name: Optional[str] = None,
                             parent: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetExternalAccessRuleResult
def get_external_access_rule_output(name: Optional[pulumi.Input[str]] = None,
                             parent: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetExternalAccessRuleResult]func LookupExternalAccessRule(ctx *Context, args *LookupExternalAccessRuleArgs, opts ...InvokeOption) (*LookupExternalAccessRuleResult, error)
func LookupExternalAccessRuleOutput(ctx *Context, args *LookupExternalAccessRuleOutputArgs, opts ...InvokeOption) LookupExternalAccessRuleResultOutput> Note: This function is named LookupExternalAccessRule in the Go SDK.
public static class GetExternalAccessRule 
{
    public static Task<GetExternalAccessRuleResult> InvokeAsync(GetExternalAccessRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetExternalAccessRuleResult> Invoke(GetExternalAccessRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetExternalAccessRuleResult> getExternalAccessRule(GetExternalAccessRuleArgs args, InvokeOptions options)
public static Output<GetExternalAccessRuleResult> getExternalAccessRule(GetExternalAccessRuleArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:vmwareengine/getExternalAccessRule:getExternalAccessRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
getExternalAccessRule Result
The following output properties are available:
- Action string
- CreateTime string
- Description string
- DestinationIp List<GetRanges External Access Rule Destination Ip Range> 
- DestinationPorts List<string>
- Id string
- The provider-assigned unique ID for this managed resource.
- IpProtocol string
- Name string
- Parent string
- Priority int
- SourceIp List<GetRanges External Access Rule Source Ip Range> 
- SourcePorts List<string>
- State string
- Uid string
- UpdateTime string
- Action string
- CreateTime string
- Description string
- DestinationIp []GetRanges External Access Rule Destination Ip Range 
- DestinationPorts []string
- Id string
- The provider-assigned unique ID for this managed resource.
- IpProtocol string
- Name string
- Parent string
- Priority int
- SourceIp []GetRanges External Access Rule Source Ip Range 
- SourcePorts []string
- State string
- Uid string
- UpdateTime string
- action String
- createTime String
- description String
- destinationIp List<GetRanges External Access Rule Destination Ip Range> 
- destinationPorts List<String>
- id String
- The provider-assigned unique ID for this managed resource.
- ipProtocol String
- name String
- parent String
- priority Integer
- sourceIp List<GetRanges External Access Rule Source Ip Range> 
- sourcePorts List<String>
- state String
- uid String
- updateTime String
- action string
- createTime string
- description string
- destinationIp GetRanges External Access Rule Destination Ip Range[] 
- destinationPorts string[]
- id string
- The provider-assigned unique ID for this managed resource.
- ipProtocol string
- name string
- parent string
- priority number
- sourceIp GetRanges External Access Rule Source Ip Range[] 
- sourcePorts string[]
- state string
- uid string
- updateTime string
- action str
- create_time str
- description str
- destination_ip_ Sequence[Getranges External Access Rule Destination Ip Range] 
- destination_ports Sequence[str]
- id str
- The provider-assigned unique ID for this managed resource.
- ip_protocol str
- name str
- parent str
- priority int
- source_ip_ Sequence[Getranges External Access Rule Source Ip Range] 
- source_ports Sequence[str]
- state str
- uid str
- update_time str
- action String
- createTime String
- description String
- destinationIp List<Property Map>Ranges 
- destinationPorts List<String>
- id String
- The provider-assigned unique ID for this managed resource.
- ipProtocol String
- name String
- parent String
- priority Number
- sourceIp List<Property Map>Ranges 
- sourcePorts List<String>
- state String
- uid String
- updateTime String
Supporting Types
GetExternalAccessRuleDestinationIpRange      
- ExternalAddress string
- The name of an 'ExternalAddress' resource.
- IpAddress stringRange 
- An IP address range in the CIDR format.
- ExternalAddress string
- The name of an 'ExternalAddress' resource.
- IpAddress stringRange 
- An IP address range in the CIDR format.
- externalAddress String
- The name of an 'ExternalAddress' resource.
- ipAddress StringRange 
- An IP address range in the CIDR format.
- externalAddress string
- The name of an 'ExternalAddress' resource.
- ipAddress stringRange 
- An IP address range in the CIDR format.
- external_address str
- The name of an 'ExternalAddress' resource.
- ip_address_ strrange 
- An IP address range in the CIDR format.
- externalAddress String
- The name of an 'ExternalAddress' resource.
- ipAddress StringRange 
- An IP address range in the CIDR format.
GetExternalAccessRuleSourceIpRange      
- IpAddress string
- A single IP address.
- IpAddress stringRange 
- An IP address range in the CIDR format.
- IpAddress string
- A single IP address.
- IpAddress stringRange 
- An IP address range in the CIDR format.
- ipAddress String
- A single IP address.
- ipAddress StringRange 
- An IP address range in the CIDR format.
- ipAddress string
- A single IP address.
- ipAddress stringRange 
- An IP address range in the CIDR format.
- ip_address str
- A single IP address.
- ip_address_ strrange 
- An IP address range in the CIDR format.
- ipAddress String
- A single IP address.
- ipAddress StringRange 
- An IP address range in the CIDR format.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.