AddressGroupArgs

data class AddressGroupArgs(val capacity: Output<Int>? = null, val description: Output<String>? = null, val items: Output<List<String>>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val parent: Output<String>? = null, val purposes: Output<List<String>>? = null, val type: Output<String>? = null) : ConvertibleToJava<AddressGroupArgs>

AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy. To get more information about AddressGroup, see:

Example Usage

Network Security Address Groups Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networksecurity.AddressGroup("default", {
name: "my-address-groups",
parent: "projects/my-project-name",
location: "us-central1",
type: "IPV4",
capacity: 100,
items: ["208&#46;80&#46;154&#46;224/32"],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networksecurity.AddressGroup("default",
name="my-address-groups",
parent="projects/my-project-name",
location="us-central1",
type="IPV4",
capacity=100,
items=["208&#46;80&#46;154&#46;224/32"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkSecurity.AddressGroup("default", new()
{
Name = "my-address-groups",
Parent = "projects/my-project-name",
Location = "us-central1",
Type = "IPV4",
Capacity = 100,
Items = new[]
{
"208.80.154.224/32",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networksecurity.NewAddressGroup(ctx, "default", &networksecurity.AddressGroupArgs{
Name: pulumi.String("my-address-groups"),
Parent: pulumi.String("projects/my-project-name"),
Location: pulumi.String("us-central1"),
Type: pulumi.String("IPV4"),
Capacity: pulumi.Int(100),
Items: pulumi.StringArray{
pulumi.String("208.80.154.224/32"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networksecurity.AddressGroup;
import com.pulumi.gcp.networksecurity.AddressGroupArgs;
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 default_ = new AddressGroup("default", AddressGroupArgs.builder()
.name("my-address-groups")
.parent("projects/my-project-name")
.location("us-central1")
.type("IPV4")
.capacity("100")
.items("208.80.154.224/32")
.build());
}
}
resources:
default:
type: gcp:networksecurity:AddressGroup
properties:
name: my-address-groups
parent: projects/my-project-name
location: us-central1
type: IPV4
capacity: '100'
items:
- 208.80.154.224/32

Network Security Address Groups Organization Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networksecurity.AddressGroup("default", {
name: "my-address-groups",
parent: "organizations/123456789",
location: "us-central1",
type: "IPV4",
capacity: 100,
items: ["208&#46;80&#46;154&#46;224/32"],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networksecurity.AddressGroup("default",
name="my-address-groups",
parent="organizations/123456789",
location="us-central1",
type="IPV4",
capacity=100,
items=["208&#46;80&#46;154&#46;224/32"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkSecurity.AddressGroup("default", new()
{
Name = "my-address-groups",
Parent = "organizations/123456789",
Location = "us-central1",
Type = "IPV4",
Capacity = 100,
Items = new[]
{
"208.80.154.224/32",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networksecurity.NewAddressGroup(ctx, "default", &networksecurity.AddressGroupArgs{
Name: pulumi.String("my-address-groups"),
Parent: pulumi.String("organizations/123456789"),
Location: pulumi.String("us-central1"),
Type: pulumi.String("IPV4"),
Capacity: pulumi.Int(100),
Items: pulumi.StringArray{
pulumi.String("208.80.154.224/32"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networksecurity.AddressGroup;
import com.pulumi.gcp.networksecurity.AddressGroupArgs;
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 default_ = new AddressGroup("default", AddressGroupArgs.builder()
.name("my-address-groups")
.parent("organizations/123456789")
.location("us-central1")
.type("IPV4")
.capacity("100")
.items("208.80.154.224/32")
.build());
}
}
resources:
default:
type: gcp:networksecurity:AddressGroup
properties:
name: my-address-groups
parent: organizations/123456789
location: us-central1
type: IPV4
capacity: '100'
items:
- 208.80.154.224/32

Network Security Address Groups Advanced

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networksecurity.AddressGroup("default", {
name: "my-address-groups",
parent: "projects/my-project-name",
location: "us-central1",
description: "my description",
type: "IPV4",
capacity: 100,
items: ["208&#46;80&#46;154&#46;224/32"],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networksecurity.AddressGroup("default",
name="my-address-groups",
parent="projects/my-project-name",
location="us-central1",
description="my description",
type="IPV4",
capacity=100,
items=["208&#46;80&#46;154&#46;224/32"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkSecurity.AddressGroup("default", new()
{
Name = "my-address-groups",
Parent = "projects/my-project-name",
Location = "us-central1",
Description = "my description",
Type = "IPV4",
Capacity = 100,
Items = new[]
{
"208.80.154.224/32",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networksecurity.NewAddressGroup(ctx, "default", &networksecurity.AddressGroupArgs{
Name: pulumi.String("my-address-groups"),
Parent: pulumi.String("projects/my-project-name"),
Location: pulumi.String("us-central1"),
Description: pulumi.String("my description"),
Type: pulumi.String("IPV4"),
Capacity: pulumi.Int(100),
Items: pulumi.StringArray{
pulumi.String("208.80.154.224/32"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networksecurity.AddressGroup;
import com.pulumi.gcp.networksecurity.AddressGroupArgs;
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 default_ = new AddressGroup("default", AddressGroupArgs.builder()
.name("my-address-groups")
.parent("projects/my-project-name")
.location("us-central1")
.description("my description")
.type("IPV4")
.capacity("100")
.items("208.80.154.224/32")
.build());
}
}
resources:
default:
type: gcp:networksecurity:AddressGroup
properties:
name: my-address-groups
parent: projects/my-project-name
location: us-central1
description: my description
type: IPV4
capacity: '100'
items:
- 208.80.154.224/32

Network Security Address Groups Cloud Armor

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networksecurity.AddressGroup("default", {
name: "my-address-groups",
parent: "projects/my-project-name",
location: "global",
type: "IPV4",
capacity: 100,
purposes: ["CLOUD_ARMOR"],
items: ["208&#46;80&#46;154&#46;224/32"],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networksecurity.AddressGroup("default",
name="my-address-groups",
parent="projects/my-project-name",
location="global",
type="IPV4",
capacity=100,
purposes=["CLOUD_ARMOR"],
items=["208&#46;80&#46;154&#46;224/32"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkSecurity.AddressGroup("default", new()
{
Name = "my-address-groups",
Parent = "projects/my-project-name",
Location = "global",
Type = "IPV4",
Capacity = 100,
Purposes = new[]
{
"CLOUD_ARMOR",
},
Items = new[]
{
"208.80.154.224/32",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networksecurity.NewAddressGroup(ctx, "default", &networksecurity.AddressGroupArgs{
Name: pulumi.String("my-address-groups"),
Parent: pulumi.String("projects/my-project-name"),
Location: pulumi.String("global"),
Type: pulumi.String("IPV4"),
Capacity: pulumi.Int(100),
Purposes: pulumi.StringArray{
pulumi.String("CLOUD_ARMOR"),
},
Items: pulumi.StringArray{
pulumi.String("208.80.154.224/32"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networksecurity.AddressGroup;
import com.pulumi.gcp.networksecurity.AddressGroupArgs;
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 default_ = new AddressGroup("default", AddressGroupArgs.builder()
.name("my-address-groups")
.parent("projects/my-project-name")
.location("global")
.type("IPV4")
.capacity("100")
.purposes("CLOUD_ARMOR")
.items("208.80.154.224/32")
.build());
}
}
resources:
default:
type: gcp:networksecurity:AddressGroup
properties:
name: my-address-groups
parent: projects/my-project-name
location: global
type: IPV4
capacity: '100'
purposes:
- CLOUD_ARMOR
items:
- 208.80.154.224/32

Import

AddressGroup can be imported using any of these accepted formats:

  • {{parent}}/locations/{{location}}/addressGroups/{{name}} When using the pulumi import command, AddressGroup can be imported using one of the formats above. For example:

$ pulumi import gcp:networksecurity/addressGroup:AddressGroup default {{parent}}/locations/{{location}}/addressGroups/{{name}}

Constructors

Link copied to clipboard
constructor(capacity: Output<Int>? = null, description: Output<String>? = null, items: Output<List<String>>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, name: Output<String>? = null, parent: Output<String>? = null, purposes: Output<List<String>>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val capacity: Output<Int>? = null

Capacity of the Address Group.

Link copied to clipboard
val description: Output<String>? = null

Free-text description of the resource.

Link copied to clipboard
val items: Output<List<String>>? = null

List of items.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

Set of label tags associated with the AddressGroup resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

Link copied to clipboard
val location: Output<String>? = null

The location of the gateway security policy. The default value is global.

Link copied to clipboard
val name: Output<String>? = null

Name of the AddressGroup resource.

Link copied to clipboard
val parent: Output<String>? = null

The name of the parent this address group belongs to. Format: organizations/{organization_id} or projects/{project_id}.

Link copied to clipboard
val purposes: Output<List<String>>? = null

List of supported purposes of the Address Group. Each value may be one of: DEFAULT, CLOUD_ARMOR.

Link copied to clipboard
val type: Output<String>? = null

The type of the Address Group. Possible values are "IPV4" or "IPV6". Possible values are: IPV4, IPV6.

Functions

Link copied to clipboard
open override fun toJava(): AddressGroupArgs