1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. ResourceGroup
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.platform.ResourceGroup

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Resource for creating a Harness Resource Group

    Example Usage

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.ResourceGroup;
    import com.pulumi.harness.platform.ResourceGroupArgs;
    import com.pulumi.harness.platform.inputs.ResourceGroupIncludedScopeArgs;
    import com.pulumi.harness.platform.inputs.ResourceGroupResourceFilterArgs;
    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 test = new ResourceGroup("test", ResourceGroupArgs.builder()        
                .accountId("account_id")
                .allowedScopeLevels("account")
                .description("test")
                .identifier("identifier")
                .includedScopes(ResourceGroupIncludedScopeArgs.builder()
                    .accountId("account_id")
                    .filter("EXCLUDING_CHILD_SCOPES")
                    .build())
                .resourceFilters(ResourceGroupResourceFilterArgs.builder()
                    .includeAllResources(false)
                    .resources(ResourceGroupResourceFilterResourceArgs.builder()
                        .attributeFilter(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .resourceType("CONNECTOR")
                        .build())
                    .build())
                .tags("foo:bar")
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      test:
        type: harness:platform:ResourceGroup
        properties:
          accountId: account_id
          allowedScopeLevels:
            - account
          description: test
          identifier: identifier
          includedScopes:
            - accountId: account_id
              filter: EXCLUDING_CHILD_SCOPES
          resourceFilters:
            - includeAllResources: false
              resources:
                - attributeFilter:
                    - attributeName: category
                      attributeValues:
                        - CLOUD_COST
                  resourceType: CONNECTOR
          tags:
            - foo:bar
    

    Create ResourceGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ResourceGroup(name: string, args: ResourceGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ResourceGroup(resource_name: str,
                      args: ResourceGroupArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourceGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      account_id: Optional[str] = None,
                      identifier: Optional[str] = None,
                      allowed_scope_levels: Optional[Sequence[str]] = None,
                      color: Optional[str] = None,
                      description: Optional[str] = None,
                      included_scopes: Optional[Sequence[ResourceGroupIncludedScopeArgs]] = None,
                      name: Optional[str] = None,
                      org_id: Optional[str] = None,
                      project_id: Optional[str] = None,
                      resource_filters: Optional[Sequence[ResourceGroupResourceFilterArgs]] = None,
                      tags: Optional[Sequence[str]] = None)
    func NewResourceGroup(ctx *Context, name string, args ResourceGroupArgs, opts ...ResourceOption) (*ResourceGroup, error)
    public ResourceGroup(string name, ResourceGroupArgs args, CustomResourceOptions? opts = null)
    public ResourceGroup(String name, ResourceGroupArgs args)
    public ResourceGroup(String name, ResourceGroupArgs args, CustomResourceOptions options)
    
    type: harness:platform:ResourceGroup
    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 ResourceGroupArgs
    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 ResourceGroupArgs
    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 ResourceGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var resourceGroupResource = new Harness.Platform.ResourceGroup("resourceGroupResource", new()
    {
        AccountId = "string",
        Identifier = "string",
        AllowedScopeLevels = new[]
        {
            "string",
        },
        Color = "string",
        Description = "string",
        IncludedScopes = new[]
        {
            new Harness.Platform.Inputs.ResourceGroupIncludedScopeArgs
            {
                Filter = "string",
                AccountId = "string",
                OrgId = "string",
                ProjectId = "string",
            },
        },
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
        ResourceFilters = new[]
        {
            new Harness.Platform.Inputs.ResourceGroupResourceFilterArgs
            {
                IncludeAllResources = false,
                Resources = new[]
                {
                    new Harness.Platform.Inputs.ResourceGroupResourceFilterResourceArgs
                    {
                        ResourceType = "string",
                        AttributeFilters = new[]
                        {
                            new Harness.Platform.Inputs.ResourceGroupResourceFilterResourceAttributeFilterArgs
                            {
                                AttributeName = "string",
                                AttributeValues = new[]
                                {
                                    "string",
                                },
                            },
                        },
                        Identifiers = new[]
                        {
                            "string",
                        },
                    },
                },
            },
        },
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := platform.NewResourceGroup(ctx, "resourceGroupResource", &platform.ResourceGroupArgs{
    	AccountId:  pulumi.String("string"),
    	Identifier: pulumi.String("string"),
    	AllowedScopeLevels: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Color:       pulumi.String("string"),
    	Description: pulumi.String("string"),
    	IncludedScopes: platform.ResourceGroupIncludedScopeArray{
    		&platform.ResourceGroupIncludedScopeArgs{
    			Filter:    pulumi.String("string"),
    			AccountId: pulumi.String("string"),
    			OrgId:     pulumi.String("string"),
    			ProjectId: pulumi.String("string"),
    		},
    	},
    	Name:      pulumi.String("string"),
    	OrgId:     pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	ResourceFilters: platform.ResourceGroupResourceFilterArray{
    		&platform.ResourceGroupResourceFilterArgs{
    			IncludeAllResources: pulumi.Bool(false),
    			Resources: platform.ResourceGroupResourceFilterResourceArray{
    				&platform.ResourceGroupResourceFilterResourceArgs{
    					ResourceType: pulumi.String("string"),
    					AttributeFilters: platform.ResourceGroupResourceFilterResourceAttributeFilterArray{
    						&platform.ResourceGroupResourceFilterResourceAttributeFilterArgs{
    							AttributeName: pulumi.String("string"),
    							AttributeValues: pulumi.StringArray{
    								pulumi.String("string"),
    							},
    						},
    					},
    					Identifiers: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    		},
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var resourceGroupResource = new ResourceGroup("resourceGroupResource", ResourceGroupArgs.builder()        
        .accountId("string")
        .identifier("string")
        .allowedScopeLevels("string")
        .color("string")
        .description("string")
        .includedScopes(ResourceGroupIncludedScopeArgs.builder()
            .filter("string")
            .accountId("string")
            .orgId("string")
            .projectId("string")
            .build())
        .name("string")
        .orgId("string")
        .projectId("string")
        .resourceFilters(ResourceGroupResourceFilterArgs.builder()
            .includeAllResources(false)
            .resources(ResourceGroupResourceFilterResourceArgs.builder()
                .resourceType("string")
                .attributeFilters(ResourceGroupResourceFilterResourceAttributeFilterArgs.builder()
                    .attributeName("string")
                    .attributeValues("string")
                    .build())
                .identifiers("string")
                .build())
            .build())
        .tags("string")
        .build());
    
    resource_group_resource = harness.platform.ResourceGroup("resourceGroupResource",
        account_id="string",
        identifier="string",
        allowed_scope_levels=["string"],
        color="string",
        description="string",
        included_scopes=[harness.platform.ResourceGroupIncludedScopeArgs(
            filter="string",
            account_id="string",
            org_id="string",
            project_id="string",
        )],
        name="string",
        org_id="string",
        project_id="string",
        resource_filters=[harness.platform.ResourceGroupResourceFilterArgs(
            include_all_resources=False,
            resources=[harness.platform.ResourceGroupResourceFilterResourceArgs(
                resource_type="string",
                attribute_filters=[harness.platform.ResourceGroupResourceFilterResourceAttributeFilterArgs(
                    attribute_name="string",
                    attribute_values=["string"],
                )],
                identifiers=["string"],
            )],
        )],
        tags=["string"])
    
    const resourceGroupResource = new harness.platform.ResourceGroup("resourceGroupResource", {
        accountId: "string",
        identifier: "string",
        allowedScopeLevels: ["string"],
        color: "string",
        description: "string",
        includedScopes: [{
            filter: "string",
            accountId: "string",
            orgId: "string",
            projectId: "string",
        }],
        name: "string",
        orgId: "string",
        projectId: "string",
        resourceFilters: [{
            includeAllResources: false,
            resources: [{
                resourceType: "string",
                attributeFilters: [{
                    attributeName: "string",
                    attributeValues: ["string"],
                }],
                identifiers: ["string"],
            }],
        }],
        tags: ["string"],
    });
    
    type: harness:platform:ResourceGroup
    properties:
        accountId: string
        allowedScopeLevels:
            - string
        color: string
        description: string
        identifier: string
        includedScopes:
            - accountId: string
              filter: string
              orgId: string
              projectId: string
        name: string
        orgId: string
        projectId: string
        resourceFilters:
            - includeAllResources: false
              resources:
                - attributeFilters:
                    - attributeName: string
                      attributeValues:
                        - string
                  identifiers:
                    - string
                  resourceType: string
        tags:
            - string
    

    ResourceGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ResourceGroup resource accepts the following input properties:

    AccountId string
    Account Identifier of the account
    Identifier string
    Unique identifier of the resource.
    AllowedScopeLevels List<string>
    The scope levels at which this resource group can be used
    Color string
    Color of the environment.
    Description string
    Description of the resource.
    IncludedScopes List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.ResourceGroupIncludedScope>
    Included scopes
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    ResourceFilters List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.ResourceGroupResourceFilter>
    Contains resource filter for a resource group
    Tags List<string>
    Tags to associate with the resource.
    AccountId string
    Account Identifier of the account
    Identifier string
    Unique identifier of the resource.
    AllowedScopeLevels []string
    The scope levels at which this resource group can be used
    Color string
    Color of the environment.
    Description string
    Description of the resource.
    IncludedScopes []ResourceGroupIncludedScopeArgs
    Included scopes
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    ResourceFilters []ResourceGroupResourceFilterArgs
    Contains resource filter for a resource group
    Tags []string
    Tags to associate with the resource.
    accountId String
    Account Identifier of the account
    identifier String
    Unique identifier of the resource.
    allowedScopeLevels List<String>
    The scope levels at which this resource group can be used
    color String
    Color of the environment.
    description String
    Description of the resource.
    includedScopes List<ResourceGroupIncludedScope>
    Included scopes
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    resourceFilters List<ResourceGroupResourceFilter>
    Contains resource filter for a resource group
    tags List<String>
    Tags to associate with the resource.
    accountId string
    Account Identifier of the account
    identifier string
    Unique identifier of the resource.
    allowedScopeLevels string[]
    The scope levels at which this resource group can be used
    color string
    Color of the environment.
    description string
    Description of the resource.
    includedScopes ResourceGroupIncludedScope[]
    Included scopes
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    resourceFilters ResourceGroupResourceFilter[]
    Contains resource filter for a resource group
    tags string[]
    Tags to associate with the resource.
    account_id str
    Account Identifier of the account
    identifier str
    Unique identifier of the resource.
    allowed_scope_levels Sequence[str]
    The scope levels at which this resource group can be used
    color str
    Color of the environment.
    description str
    Description of the resource.
    included_scopes Sequence[ResourceGroupIncludedScopeArgs]
    Included scopes
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    resource_filters Sequence[ResourceGroupResourceFilterArgs]
    Contains resource filter for a resource group
    tags Sequence[str]
    Tags to associate with the resource.
    accountId String
    Account Identifier of the account
    identifier String
    Unique identifier of the resource.
    allowedScopeLevels List<String>
    The scope levels at which this resource group can be used
    color String
    Color of the environment.
    description String
    Description of the resource.
    includedScopes List<Property Map>
    Included scopes
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    resourceFilters List<Property Map>
    Contains resource filter for a resource group
    tags List<String>
    Tags to associate with the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ResourceGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ResourceGroup Resource

    Get an existing ResourceGroup 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?: ResourceGroupState, opts?: CustomResourceOptions): ResourceGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            allowed_scope_levels: Optional[Sequence[str]] = None,
            color: Optional[str] = None,
            description: Optional[str] = None,
            identifier: Optional[str] = None,
            included_scopes: Optional[Sequence[ResourceGroupIncludedScopeArgs]] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            resource_filters: Optional[Sequence[ResourceGroupResourceFilterArgs]] = None,
            tags: Optional[Sequence[str]] = None) -> ResourceGroup
    func GetResourceGroup(ctx *Context, name string, id IDInput, state *ResourceGroupState, opts ...ResourceOption) (*ResourceGroup, error)
    public static ResourceGroup Get(string name, Input<string> id, ResourceGroupState? state, CustomResourceOptions? opts = null)
    public static ResourceGroup get(String name, Output<String> id, ResourceGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AccountId string
    Account Identifier of the account
    AllowedScopeLevels List<string>
    The scope levels at which this resource group can be used
    Color string
    Color of the environment.
    Description string
    Description of the resource.
    Identifier string
    Unique identifier of the resource.
    IncludedScopes List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.ResourceGroupIncludedScope>
    Included scopes
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    ResourceFilters List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.ResourceGroupResourceFilter>
    Contains resource filter for a resource group
    Tags List<string>
    Tags to associate with the resource.
    AccountId string
    Account Identifier of the account
    AllowedScopeLevels []string
    The scope levels at which this resource group can be used
    Color string
    Color of the environment.
    Description string
    Description of the resource.
    Identifier string
    Unique identifier of the resource.
    IncludedScopes []ResourceGroupIncludedScopeArgs
    Included scopes
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    ResourceFilters []ResourceGroupResourceFilterArgs
    Contains resource filter for a resource group
    Tags []string
    Tags to associate with the resource.
    accountId String
    Account Identifier of the account
    allowedScopeLevels List<String>
    The scope levels at which this resource group can be used
    color String
    Color of the environment.
    description String
    Description of the resource.
    identifier String
    Unique identifier of the resource.
    includedScopes List<ResourceGroupIncludedScope>
    Included scopes
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    resourceFilters List<ResourceGroupResourceFilter>
    Contains resource filter for a resource group
    tags List<String>
    Tags to associate with the resource.
    accountId string
    Account Identifier of the account
    allowedScopeLevels string[]
    The scope levels at which this resource group can be used
    color string
    Color of the environment.
    description string
    Description of the resource.
    identifier string
    Unique identifier of the resource.
    includedScopes ResourceGroupIncludedScope[]
    Included scopes
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    resourceFilters ResourceGroupResourceFilter[]
    Contains resource filter for a resource group
    tags string[]
    Tags to associate with the resource.
    account_id str
    Account Identifier of the account
    allowed_scope_levels Sequence[str]
    The scope levels at which this resource group can be used
    color str
    Color of the environment.
    description str
    Description of the resource.
    identifier str
    Unique identifier of the resource.
    included_scopes Sequence[ResourceGroupIncludedScopeArgs]
    Included scopes
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    resource_filters Sequence[ResourceGroupResourceFilterArgs]
    Contains resource filter for a resource group
    tags Sequence[str]
    Tags to associate with the resource.
    accountId String
    Account Identifier of the account
    allowedScopeLevels List<String>
    The scope levels at which this resource group can be used
    color String
    Color of the environment.
    description String
    Description of the resource.
    identifier String
    Unique identifier of the resource.
    includedScopes List<Property Map>
    Included scopes
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    resourceFilters List<Property Map>
    Contains resource filter for a resource group
    tags List<String>
    Tags to associate with the resource.

    Supporting Types

    ResourceGroupIncludedScope, ResourceGroupIncludedScopeArgs

    Filter string
    Can be one of these 2 EXCLUDINGCHILDSCOPES or INCLUDINGCHILDSCOPES
    AccountId string
    Account Identifier of the account
    OrgId string
    Organization Identifier
    ProjectId string
    Project Identifier
    Filter string
    Can be one of these 2 EXCLUDINGCHILDSCOPES or INCLUDINGCHILDSCOPES
    AccountId string
    Account Identifier of the account
    OrgId string
    Organization Identifier
    ProjectId string
    Project Identifier
    filter String
    Can be one of these 2 EXCLUDINGCHILDSCOPES or INCLUDINGCHILDSCOPES
    accountId String
    Account Identifier of the account
    orgId String
    Organization Identifier
    projectId String
    Project Identifier
    filter string
    Can be one of these 2 EXCLUDINGCHILDSCOPES or INCLUDINGCHILDSCOPES
    accountId string
    Account Identifier of the account
    orgId string
    Organization Identifier
    projectId string
    Project Identifier
    filter str
    Can be one of these 2 EXCLUDINGCHILDSCOPES or INCLUDINGCHILDSCOPES
    account_id str
    Account Identifier of the account
    org_id str
    Organization Identifier
    project_id str
    Project Identifier
    filter String
    Can be one of these 2 EXCLUDINGCHILDSCOPES or INCLUDINGCHILDSCOPES
    accountId String
    Account Identifier of the account
    orgId String
    Organization Identifier
    projectId String
    Project Identifier

    ResourceGroupResourceFilter, ResourceGroupResourceFilterArgs

    IncludeAllResources bool
    Include all resource or not
    Resources []ResourceGroupResourceFilterResource
    Resources for a resource group
    includeAllResources Boolean
    Include all resource or not
    resources List<ResourceGroupResourceFilterResource>
    Resources for a resource group
    includeAllResources boolean
    Include all resource or not
    resources ResourceGroupResourceFilterResource[]
    Resources for a resource group
    include_all_resources bool
    Include all resource or not
    resources Sequence[ResourceGroupResourceFilterResource]
    Resources for a resource group
    includeAllResources Boolean
    Include all resource or not
    resources List<Property Map>
    Resources for a resource group

    ResourceGroupResourceFilterResource, ResourceGroupResourceFilterResourceArgs

    ResourceGroupResourceFilterResourceAttributeFilter, ResourceGroupResourceFilterResourceAttributeFilterArgs

    AttributeName string
    AttributeValues List<string>
    attributeName String
    attributeValues List<String>
    attributeName String
    attributeValues List<String>

    Import

    Import account level resource group

     $ pulumi import harness:platform/resourceGroup:ResourceGroup example <resource_group_id>
    

    Import org level resource group

     $ pulumi import harness:platform/resourceGroup:ResourceGroup example <ord_id>/<resource_group_id>
    

    Import project level resource group

     $ pulumi import harness:platform/resourceGroup:ResourceGroup example <org_id>/<project_id>/<resource_group_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs