1. Packages
  2. Nexus Provider
  3. API Docs
  4. RepositoryGoGroup
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

nexus.RepositoryGoGroup

Explore with Pulumi AI

nexus logo
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

    Use this resource to create a group go repository.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const golangOrg = new nexus.RepositoryGoProxy("golangOrg", {
        online: true,
        storage: {
            blobStoreName: "default",
            strictContentTypeValidation: true,
        },
        proxy: {
            remoteUrl: "https://proxy.golang.org/",
            contentMaxAge: 1440,
            metadataMaxAge: 1440,
        },
        negativeCache: {
            enabled: true,
            ttl: 1440,
        },
        httpClient: {
            blocked: false,
            autoBlock: true,
        },
    });
    const group = new nexus.RepositoryGoGroup("group", {
        online: true,
        group: {
            memberNames: [golangOrg.name],
        },
        storage: {
            blobStoreName: "default",
            strictContentTypeValidation: true,
        },
    });
    
    import pulumi
    import pulumi_nexus as nexus
    
    golang_org = nexus.RepositoryGoProxy("golangOrg",
        online=True,
        storage={
            "blob_store_name": "default",
            "strict_content_type_validation": True,
        },
        proxy={
            "remote_url": "https://proxy.golang.org/",
            "content_max_age": 1440,
            "metadata_max_age": 1440,
        },
        negative_cache={
            "enabled": True,
            "ttl": 1440,
        },
        http_client={
            "blocked": False,
            "auto_block": True,
        })
    group = nexus.RepositoryGoGroup("group",
        online=True,
        group={
            "member_names": [golang_org.name],
        },
        storage={
            "blob_store_name": "default",
            "strict_content_type_validation": True,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		golangOrg, err := nexus.NewRepositoryGoProxy(ctx, "golangOrg", &nexus.RepositoryGoProxyArgs{
    			Online: pulumi.Bool(true),
    			Storage: &nexus.RepositoryGoProxyStorageArgs{
    				BlobStoreName:               pulumi.String("default"),
    				StrictContentTypeValidation: pulumi.Bool(true),
    			},
    			Proxy: &nexus.RepositoryGoProxyProxyArgs{
    				RemoteUrl:      pulumi.String("https://proxy.golang.org/"),
    				ContentMaxAge:  pulumi.Float64(1440),
    				MetadataMaxAge: pulumi.Float64(1440),
    			},
    			NegativeCache: &nexus.RepositoryGoProxyNegativeCacheArgs{
    				Enabled: pulumi.Bool(true),
    				Ttl:     pulumi.Float64(1440),
    			},
    			HttpClient: &nexus.RepositoryGoProxyHttpClientArgs{
    				Blocked:   pulumi.Bool(false),
    				AutoBlock: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nexus.NewRepositoryGoGroup(ctx, "group", &nexus.RepositoryGoGroupArgs{
    			Online: pulumi.Bool(true),
    			Group: &nexus.RepositoryGoGroupGroupArgs{
    				MemberNames: pulumi.StringArray{
    					golangOrg.Name,
    				},
    			},
    			Storage: &nexus.RepositoryGoGroupStorageArgs{
    				BlobStoreName:               pulumi.String("default"),
    				StrictContentTypeValidation: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nexus = Pulumi.Nexus;
    
    return await Deployment.RunAsync(() => 
    {
        var golangOrg = new Nexus.RepositoryGoProxy("golangOrg", new()
        {
            Online = true,
            Storage = new Nexus.Inputs.RepositoryGoProxyStorageArgs
            {
                BlobStoreName = "default",
                StrictContentTypeValidation = true,
            },
            Proxy = new Nexus.Inputs.RepositoryGoProxyProxyArgs
            {
                RemoteUrl = "https://proxy.golang.org/",
                ContentMaxAge = 1440,
                MetadataMaxAge = 1440,
            },
            NegativeCache = new Nexus.Inputs.RepositoryGoProxyNegativeCacheArgs
            {
                Enabled = true,
                Ttl = 1440,
            },
            HttpClient = new Nexus.Inputs.RepositoryGoProxyHttpClientArgs
            {
                Blocked = false,
                AutoBlock = true,
            },
        });
    
        var @group = new Nexus.RepositoryGoGroup("group", new()
        {
            Online = true,
            Group = new Nexus.Inputs.RepositoryGoGroupGroupArgs
            {
                MemberNames = new[]
                {
                    golangOrg.Name,
                },
            },
            Storage = new Nexus.Inputs.RepositoryGoGroupStorageArgs
            {
                BlobStoreName = "default",
                StrictContentTypeValidation = true,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nexus.RepositoryGoProxy;
    import com.pulumi.nexus.RepositoryGoProxyArgs;
    import com.pulumi.nexus.inputs.RepositoryGoProxyStorageArgs;
    import com.pulumi.nexus.inputs.RepositoryGoProxyProxyArgs;
    import com.pulumi.nexus.inputs.RepositoryGoProxyNegativeCacheArgs;
    import com.pulumi.nexus.inputs.RepositoryGoProxyHttpClientArgs;
    import com.pulumi.nexus.RepositoryGoGroup;
    import com.pulumi.nexus.RepositoryGoGroupArgs;
    import com.pulumi.nexus.inputs.RepositoryGoGroupGroupArgs;
    import com.pulumi.nexus.inputs.RepositoryGoGroupStorageArgs;
    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 golangOrg = new RepositoryGoProxy("golangOrg", RepositoryGoProxyArgs.builder()
                .online(true)
                .storage(RepositoryGoProxyStorageArgs.builder()
                    .blobStoreName("default")
                    .strictContentTypeValidation(true)
                    .build())
                .proxy(RepositoryGoProxyProxyArgs.builder()
                    .remoteUrl("https://proxy.golang.org/")
                    .contentMaxAge(1440)
                    .metadataMaxAge(1440)
                    .build())
                .negativeCache(RepositoryGoProxyNegativeCacheArgs.builder()
                    .enabled(true)
                    .ttl(1440)
                    .build())
                .httpClient(RepositoryGoProxyHttpClientArgs.builder()
                    .blocked(false)
                    .autoBlock(true)
                    .build())
                .build());
    
            var group = new RepositoryGoGroup("group", RepositoryGoGroupArgs.builder()
                .online(true)
                .group(RepositoryGoGroupGroupArgs.builder()
                    .memberNames(golangOrg.name())
                    .build())
                .storage(RepositoryGoGroupStorageArgs.builder()
                    .blobStoreName("default")
                    .strictContentTypeValidation(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      golangOrg:
        type: nexus:RepositoryGoProxy
        properties:
          online: true
          storage:
            blobStoreName: default
            strictContentTypeValidation: true
          proxy:
            remoteUrl: https://proxy.golang.org/
            contentMaxAge: 1440
            metadataMaxAge: 1440
          negativeCache:
            enabled: true
            ttl: 1440
          httpClient:
            blocked: false
            autoBlock: true
      group:
        type: nexus:RepositoryGoGroup
        properties:
          online: true
          group:
            memberNames:
              - ${golangOrg.name}
          storage:
            blobStoreName: default
            strictContentTypeValidation: true
    

    Create RepositoryGoGroup Resource

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

    Constructor syntax

    new RepositoryGoGroup(name: string, args: RepositoryGoGroupArgs, opts?: CustomResourceOptions);
    @overload
    def RepositoryGoGroup(resource_name: str,
                          args: RepositoryGoGroupArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def RepositoryGoGroup(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          group: Optional[RepositoryGoGroupGroupArgs] = None,
                          storage: Optional[RepositoryGoGroupStorageArgs] = None,
                          name: Optional[str] = None,
                          online: Optional[bool] = None)
    func NewRepositoryGoGroup(ctx *Context, name string, args RepositoryGoGroupArgs, opts ...ResourceOption) (*RepositoryGoGroup, error)
    public RepositoryGoGroup(string name, RepositoryGoGroupArgs args, CustomResourceOptions? opts = null)
    public RepositoryGoGroup(String name, RepositoryGoGroupArgs args)
    public RepositoryGoGroup(String name, RepositoryGoGroupArgs args, CustomResourceOptions options)
    
    type: nexus:RepositoryGoGroup
    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 RepositoryGoGroupArgs
    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 RepositoryGoGroupArgs
    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 RepositoryGoGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryGoGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryGoGroupArgs
    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 repositoryGoGroupResource = new Nexus.RepositoryGoGroup("repositoryGoGroupResource", new()
    {
        Group = new Nexus.Inputs.RepositoryGoGroupGroupArgs
        {
            MemberNames = new[]
            {
                "string",
            },
        },
        Storage = new Nexus.Inputs.RepositoryGoGroupStorageArgs
        {
            BlobStoreName = "string",
            StrictContentTypeValidation = false,
        },
        Name = "string",
        Online = false,
    });
    
    example, err := nexus.NewRepositoryGoGroup(ctx, "repositoryGoGroupResource", &nexus.RepositoryGoGroupArgs{
    	Group: &nexus.RepositoryGoGroupGroupArgs{
    		MemberNames: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Storage: &nexus.RepositoryGoGroupStorageArgs{
    		BlobStoreName:               pulumi.String("string"),
    		StrictContentTypeValidation: pulumi.Bool(false),
    	},
    	Name:   pulumi.String("string"),
    	Online: pulumi.Bool(false),
    })
    
    var repositoryGoGroupResource = new RepositoryGoGroup("repositoryGoGroupResource", RepositoryGoGroupArgs.builder()
        .group(RepositoryGoGroupGroupArgs.builder()
            .memberNames("string")
            .build())
        .storage(RepositoryGoGroupStorageArgs.builder()
            .blobStoreName("string")
            .strictContentTypeValidation(false)
            .build())
        .name("string")
        .online(false)
        .build());
    
    repository_go_group_resource = nexus.RepositoryGoGroup("repositoryGoGroupResource",
        group={
            "member_names": ["string"],
        },
        storage={
            "blob_store_name": "string",
            "strict_content_type_validation": False,
        },
        name="string",
        online=False)
    
    const repositoryGoGroupResource = new nexus.RepositoryGoGroup("repositoryGoGroupResource", {
        group: {
            memberNames: ["string"],
        },
        storage: {
            blobStoreName: "string",
            strictContentTypeValidation: false,
        },
        name: "string",
        online: false,
    });
    
    type: nexus:RepositoryGoGroup
    properties:
        group:
            memberNames:
                - string
        name: string
        online: false
        storage:
            blobStoreName: string
            strictContentTypeValidation: false
    

    RepositoryGoGroup 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 RepositoryGoGroup resource accepts the following input properties:

    Group RepositoryGoGroupGroup
    Configuration for repository group
    Storage RepositoryGoGroupStorage
    The storage configuration of the repository
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Group RepositoryGoGroupGroupArgs
    Configuration for repository group
    Storage RepositoryGoGroupStorageArgs
    The storage configuration of the repository
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    group RepositoryGoGroupGroup
    Configuration for repository group
    storage RepositoryGoGroupStorage
    The storage configuration of the repository
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests
    group RepositoryGoGroupGroup
    Configuration for repository group
    storage RepositoryGoGroupStorage
    The storage configuration of the repository
    name string
    A unique identifier for this repository
    online boolean
    Whether this repository accepts incoming requests
    group RepositoryGoGroupGroupArgs
    Configuration for repository group
    storage RepositoryGoGroupStorageArgs
    The storage configuration of the repository
    name str
    A unique identifier for this repository
    online bool
    Whether this repository accepts incoming requests
    group Property Map
    Configuration for repository group
    storage Property Map
    The storage configuration of the repository
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RepositoryGoGroup 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 RepositoryGoGroup Resource

    Get an existing RepositoryGoGroup 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?: RepositoryGoGroupState, opts?: CustomResourceOptions): RepositoryGoGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            group: Optional[RepositoryGoGroupGroupArgs] = None,
            name: Optional[str] = None,
            online: Optional[bool] = None,
            storage: Optional[RepositoryGoGroupStorageArgs] = None) -> RepositoryGoGroup
    func GetRepositoryGoGroup(ctx *Context, name string, id IDInput, state *RepositoryGoGroupState, opts ...ResourceOption) (*RepositoryGoGroup, error)
    public static RepositoryGoGroup Get(string name, Input<string> id, RepositoryGoGroupState? state, CustomResourceOptions? opts = null)
    public static RepositoryGoGroup get(String name, Output<String> id, RepositoryGoGroupState state, CustomResourceOptions options)
    resources:  _:    type: nexus:RepositoryGoGroup    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.
    The following state arguments are supported:
    Group RepositoryGoGroupGroup
    Configuration for repository group
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Storage RepositoryGoGroupStorage
    The storage configuration of the repository
    Group RepositoryGoGroupGroupArgs
    Configuration for repository group
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Storage RepositoryGoGroupStorageArgs
    The storage configuration of the repository
    group RepositoryGoGroupGroup
    Configuration for repository group
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests
    storage RepositoryGoGroupStorage
    The storage configuration of the repository
    group RepositoryGoGroupGroup
    Configuration for repository group
    name string
    A unique identifier for this repository
    online boolean
    Whether this repository accepts incoming requests
    storage RepositoryGoGroupStorage
    The storage configuration of the repository
    group RepositoryGoGroupGroupArgs
    Configuration for repository group
    name str
    A unique identifier for this repository
    online bool
    Whether this repository accepts incoming requests
    storage RepositoryGoGroupStorageArgs
    The storage configuration of the repository
    group Property Map
    Configuration for repository group
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests
    storage Property Map
    The storage configuration of the repository

    Supporting Types

    RepositoryGoGroupGroup, RepositoryGoGroupGroupArgs

    MemberNames List<string>
    Member repositories names
    MemberNames []string
    Member repositories names
    memberNames List<String>
    Member repositories names
    memberNames string[]
    Member repositories names
    member_names Sequence[str]
    Member repositories names
    memberNames List<String>
    Member repositories names

    RepositoryGoGroupStorage, RepositoryGoGroupStorageArgs

    BlobStoreName string
    Blob store used to store repository contents
    StrictContentTypeValidation bool
    Whether to validate uploaded content's MIME type appropriate for the repository format
    BlobStoreName string
    Blob store used to store repository contents
    StrictContentTypeValidation bool
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blobStoreName String
    Blob store used to store repository contents
    strictContentTypeValidation Boolean
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blobStoreName string
    Blob store used to store repository contents
    strictContentTypeValidation boolean
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blob_store_name str
    Blob store used to store repository contents
    strict_content_type_validation bool
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blobStoreName String
    Blob store used to store repository contents
    strictContentTypeValidation Boolean
    Whether to validate uploaded content's MIME type appropriate for the repository format

    Import

    import using the name of repository

    $ pulumi import nexus:index/repositoryGoGroup:RepositoryGoGroup group go-group
    

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

    Package Details

    Repository
    nexus datadrivers/terraform-provider-nexus
    License
    Notes
    This Pulumi package is based on the nexus Terraform Provider.
    nexus logo
    nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers