Resource for managing IP allowlist configs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = new harness.platform.IpAllowlist("example", {
identifier: "identifier",
name: "name",
ipAddress: "0.0.0.0/0",
allowedSourceTypes: ["API"],
enabled: true,
description: "allowlist example",
tags: ["foo:bar"],
});
import pulumi
import pulumi_harness as harness
example = harness.platform.IpAllowlist("example",
identifier="identifier",
name="name",
ip_address="0.0.0.0/0",
allowed_source_types=["API"],
enabled=True,
description="allowlist example",
tags=["foo:bar"])
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := platform.NewIpAllowlist(ctx, "example", &platform.IpAllowlistArgs{
Identifier: pulumi.String("identifier"),
Name: pulumi.String("name"),
IpAddress: pulumi.String("0.0.0.0/0"),
AllowedSourceTypes: pulumi.StringArray{
pulumi.String("API"),
},
Enabled: pulumi.Bool(true),
Description: pulumi.String("allowlist example"),
Tags: pulumi.StringArray{
pulumi.String("foo:bar"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var example = new Harness.Platform.IpAllowlist("example", new()
{
Identifier = "identifier",
Name = "name",
IpAddress = "0.0.0.0/0",
AllowedSourceTypes = new[]
{
"API",
},
Enabled = true,
Description = "allowlist example",
Tags = new[]
{
"foo:bar",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.IpAllowlist;
import com.pulumi.harness.platform.IpAllowlistArgs;
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 example = new IpAllowlist("example", IpAllowlistArgs.builder()
.identifier("identifier")
.name("name")
.ipAddress("0.0.0.0/0")
.allowedSourceTypes("API")
.enabled(true)
.description("allowlist example")
.tags("foo:bar")
.build());
}
}
resources:
example:
type: harness:platform:IpAllowlist
properties:
identifier: identifier
name: name
ipAddress: 0.0.0.0/0
allowedSourceTypes:
- API
enabled: true
description: allowlist example
tags:
- foo:bar
Create IpAllowlist Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IpAllowlist(name: string, args: IpAllowlistArgs, opts?: CustomResourceOptions);@overload
def IpAllowlist(resource_name: str,
args: IpAllowlistArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IpAllowlist(resource_name: str,
opts: Optional[ResourceOptions] = None,
identifier: Optional[str] = None,
ip_address: Optional[str] = None,
allowed_source_types: Optional[Sequence[str]] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewIpAllowlist(ctx *Context, name string, args IpAllowlistArgs, opts ...ResourceOption) (*IpAllowlist, error)public IpAllowlist(string name, IpAllowlistArgs args, CustomResourceOptions? opts = null)
public IpAllowlist(String name, IpAllowlistArgs args)
public IpAllowlist(String name, IpAllowlistArgs args, CustomResourceOptions options)
type: harness:platform:IpAllowlist
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 IpAllowlistArgs
- 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 IpAllowlistArgs
- 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 IpAllowlistArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpAllowlistArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IpAllowlistArgs
- 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 ipAllowlistResource = new Harness.Platform.IpAllowlist("ipAllowlistResource", new()
{
Identifier = "string",
IpAddress = "string",
AllowedSourceTypes = new[]
{
"string",
},
Description = "string",
Enabled = false,
Name = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewIpAllowlist(ctx, "ipAllowlistResource", &platform.IpAllowlistArgs{
Identifier: pulumi.String("string"),
IpAddress: pulumi.String("string"),
AllowedSourceTypes: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var ipAllowlistResource = new IpAllowlist("ipAllowlistResource", IpAllowlistArgs.builder()
.identifier("string")
.ipAddress("string")
.allowedSourceTypes("string")
.description("string")
.enabled(false)
.name("string")
.tags("string")
.build());
ip_allowlist_resource = harness.platform.IpAllowlist("ipAllowlistResource",
identifier="string",
ip_address="string",
allowed_source_types=["string"],
description="string",
enabled=False,
name="string",
tags=["string"])
const ipAllowlistResource = new harness.platform.IpAllowlist("ipAllowlistResource", {
identifier: "string",
ipAddress: "string",
allowedSourceTypes: ["string"],
description: "string",
enabled: false,
name: "string",
tags: ["string"],
});
type: harness:platform:IpAllowlist
properties:
allowedSourceTypes:
- string
description: string
enabled: false
identifier: string
ipAddress: string
name: string
tags:
- string
IpAllowlist 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 IpAllowlist resource accepts the following input properties:
- Identifier string
- Unique identifier of the resource.
- Ip
Address string - CIDR range or IP address to allow.
- Allowed
Source List<string>Types - List of sources to allow. Valid values are
UIandAPI. - Description string
- Description of the resource.
- Enabled bool
- Whether the allowlist config is enabled.
- Name string
- Name of the resource.
- List<string>
- Tags to associate with the resource.
- Identifier string
- Unique identifier of the resource.
- Ip
Address string - CIDR range or IP address to allow.
- Allowed
Source []stringTypes - List of sources to allow. Valid values are
UIandAPI. - Description string
- Description of the resource.
- Enabled bool
- Whether the allowlist config is enabled.
- Name string
- Name of the resource.
- []string
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- ip
Address String - CIDR range or IP address to allow.
- allowed
Source List<String>Types - List of sources to allow. Valid values are
UIandAPI. - description String
- Description of the resource.
- enabled Boolean
- Whether the allowlist config is enabled.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
- identifier string
- Unique identifier of the resource.
- ip
Address string - CIDR range or IP address to allow.
- allowed
Source string[]Types - List of sources to allow. Valid values are
UIandAPI. - description string
- Description of the resource.
- enabled boolean
- Whether the allowlist config is enabled.
- name string
- Name of the resource.
- string[]
- Tags to associate with the resource.
- identifier str
- Unique identifier of the resource.
- ip_
address str - CIDR range or IP address to allow.
- allowed_
source_ Sequence[str]types - List of sources to allow. Valid values are
UIandAPI. - description str
- Description of the resource.
- enabled bool
- Whether the allowlist config is enabled.
- name str
- Name of the resource.
- Sequence[str]
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- ip
Address String - CIDR range or IP address to allow.
- allowed
Source List<String>Types - List of sources to allow. Valid values are
UIandAPI. - description String
- Description of the resource.
- enabled Boolean
- Whether the allowlist config is enabled.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the IpAllowlist resource produces the following output properties:
Look up Existing IpAllowlist Resource
Get an existing IpAllowlist 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?: IpAllowlistState, opts?: CustomResourceOptions): IpAllowlist@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_source_types: Optional[Sequence[str]] = None,
created: Optional[int] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
identifier: Optional[str] = None,
ip_address: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
updated: Optional[int] = None) -> IpAllowlistfunc GetIpAllowlist(ctx *Context, name string, id IDInput, state *IpAllowlistState, opts ...ResourceOption) (*IpAllowlist, error)public static IpAllowlist Get(string name, Input<string> id, IpAllowlistState? state, CustomResourceOptions? opts = null)public static IpAllowlist get(String name, Output<String> id, IpAllowlistState state, CustomResourceOptions options)resources: _: type: harness:platform:IpAllowlist 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.
- Allowed
Source List<string>Types - List of sources to allow. Valid values are
UIandAPI. - Created int
- Creation timestamp for the config.
- Description string
- Description of the resource.
- Enabled bool
- Whether the allowlist config is enabled.
- Identifier string
- Unique identifier of the resource.
- Ip
Address string - CIDR range or IP address to allow.
- Name string
- Name of the resource.
- List<string>
- Tags to associate with the resource.
- Updated int
- Last update timestamp for the config.
- Allowed
Source []stringTypes - List of sources to allow. Valid values are
UIandAPI. - Created int
- Creation timestamp for the config.
- Description string
- Description of the resource.
- Enabled bool
- Whether the allowlist config is enabled.
- Identifier string
- Unique identifier of the resource.
- Ip
Address string - CIDR range or IP address to allow.
- Name string
- Name of the resource.
- []string
- Tags to associate with the resource.
- Updated int
- Last update timestamp for the config.
- allowed
Source List<String>Types - List of sources to allow. Valid values are
UIandAPI. - created Integer
- Creation timestamp for the config.
- description String
- Description of the resource.
- enabled Boolean
- Whether the allowlist config is enabled.
- identifier String
- Unique identifier of the resource.
- ip
Address String - CIDR range or IP address to allow.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
- updated Integer
- Last update timestamp for the config.
- allowed
Source string[]Types - List of sources to allow. Valid values are
UIandAPI. - created number
- Creation timestamp for the config.
- description string
- Description of the resource.
- enabled boolean
- Whether the allowlist config is enabled.
- identifier string
- Unique identifier of the resource.
- ip
Address string - CIDR range or IP address to allow.
- name string
- Name of the resource.
- string[]
- Tags to associate with the resource.
- updated number
- Last update timestamp for the config.
- allowed_
source_ Sequence[str]types - List of sources to allow. Valid values are
UIandAPI. - created int
- Creation timestamp for the config.
- description str
- Description of the resource.
- enabled bool
- Whether the allowlist config is enabled.
- identifier str
- Unique identifier of the resource.
- ip_
address str - CIDR range or IP address to allow.
- name str
- Name of the resource.
- Sequence[str]
- Tags to associate with the resource.
- updated int
- Last update timestamp for the config.
- allowed
Source List<String>Types - List of sources to allow. Valid values are
UIandAPI. - created Number
- Creation timestamp for the config.
- description String
- Description of the resource.
- enabled Boolean
- Whether the allowlist config is enabled.
- identifier String
- Unique identifier of the resource.
- ip
Address String - CIDR range or IP address to allow.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
- updated Number
- Last update timestamp for the config.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
