proxmoxve.Apt.Repository
Explore with Pulumi AI
Manages an APT repository of a Proxmox VE node.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
const example = new proxmoxve.apt.Repository("example", {
enabled: true,
filePath: "/etc/apt/sources.list",
index: 0,
node: "pve",
});
import pulumi
import pulumi_proxmoxve as proxmoxve
example = proxmoxve.apt.Repository("example",
enabled=True,
file_path="/etc/apt/sources.list",
index=0,
node="pve")
package main
import (
"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/Apt"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Apt.NewRepository(ctx, "example", &Apt.RepositoryArgs{
Enabled: pulumi.Bool(true),
FilePath: pulumi.String("/etc/apt/sources.list"),
Index: pulumi.Int(0),
Node: pulumi.String("pve"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ProxmoxVE = Pulumi.ProxmoxVE;
return await Deployment.RunAsync(() =>
{
var example = new ProxmoxVE.Apt.Repository("example", new()
{
Enabled = true,
FilePath = "/etc/apt/sources.list",
Index = 0,
Node = "pve",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.proxmoxve.Apt.Repository;
import com.pulumi.proxmoxve.Apt.RepositoryArgs;
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 Repository("example", RepositoryArgs.builder()
.enabled(true)
.filePath("/etc/apt/sources.list")
.index(0)
.node("pve")
.build());
}
}
resources:
example:
type: proxmoxve:Apt:Repository
properties:
enabled: true
filePath: /etc/apt/sources.list
index: 0
node: pve
Create Repository Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Repository(name: string, args: RepositoryArgs, opts?: CustomResourceOptions);
@overload
def Repository(resource_name: str,
args: RepositoryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Repository(resource_name: str,
opts: Optional[ResourceOptions] = None,
file_path: Optional[str] = None,
index: Optional[int] = None,
node: Optional[str] = None,
enabled: Optional[bool] = None)
func NewRepository(ctx *Context, name string, args RepositoryArgs, opts ...ResourceOption) (*Repository, error)
public Repository(string name, RepositoryArgs args, CustomResourceOptions? opts = null)
public Repository(String name, RepositoryArgs args)
public Repository(String name, RepositoryArgs args, CustomResourceOptions options)
type: proxmoxve:Apt:Repository
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 RepositoryArgs
- 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 RepositoryArgs
- 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 RepositoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryArgs
- 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 repositoryResource = new ProxmoxVE.Apt.Repository("repositoryResource", new()
{
FilePath = "string",
Index = 0,
Node = "string",
Enabled = false,
});
example, err := Apt.NewRepository(ctx, "repositoryResource", &Apt.RepositoryArgs{
FilePath: pulumi.String("string"),
Index: pulumi.Int(0),
Node: pulumi.String("string"),
Enabled: pulumi.Bool(false),
})
var repositoryResource = new Repository("repositoryResource", RepositoryArgs.builder()
.filePath("string")
.index(0)
.node("string")
.enabled(false)
.build());
repository_resource = proxmoxve.apt.Repository("repositoryResource",
file_path="string",
index=0,
node="string",
enabled=False)
const repositoryResource = new proxmoxve.apt.Repository("repositoryResource", {
filePath: "string",
index: 0,
node: "string",
enabled: false,
});
type: proxmoxve:Apt:Repository
properties:
enabled: false
filePath: string
index: 0
node: string
Repository 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 Repository resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:
- Comment string
- The associated comment.
- Components List<string>
- The list of components.
- File
Type string - The format of the defining source list file.
- Id string
- The provider-assigned unique ID for this managed resource.
- Package
Types List<string> - The list of package types.
- Suites List<string>
- The list of package distributions.
- Uris List<string>
- The list of repository URIs.
- Comment string
- The associated comment.
- Components []string
- The list of components.
- File
Type string - The format of the defining source list file.
- Id string
- The provider-assigned unique ID for this managed resource.
- Package
Types []string - The list of package types.
- Suites []string
- The list of package distributions.
- Uris []string
- The list of repository URIs.
- comment String
- The associated comment.
- components List<String>
- The list of components.
- file
Type String - The format of the defining source list file.
- id String
- The provider-assigned unique ID for this managed resource.
- package
Types List<String> - The list of package types.
- suites List<String>
- The list of package distributions.
- uris List<String>
- The list of repository URIs.
- comment string
- The associated comment.
- components string[]
- The list of components.
- file
Type string - The format of the defining source list file.
- id string
- The provider-assigned unique ID for this managed resource.
- package
Types string[] - The list of package types.
- suites string[]
- The list of package distributions.
- uris string[]
- The list of repository URIs.
- comment str
- The associated comment.
- components Sequence[str]
- The list of components.
- file_
type str - The format of the defining source list file.
- id str
- The provider-assigned unique ID for this managed resource.
- package_
types Sequence[str] - The list of package types.
- suites Sequence[str]
- The list of package distributions.
- uris Sequence[str]
- The list of repository URIs.
- comment String
- The associated comment.
- components List<String>
- The list of components.
- file
Type String - The format of the defining source list file.
- id String
- The provider-assigned unique ID for this managed resource.
- package
Types List<String> - The list of package types.
- suites List<String>
- The list of package distributions.
- uris List<String>
- The list of repository URIs.
Look up Existing Repository Resource
Get an existing Repository 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?: RepositoryState, opts?: CustomResourceOptions): Repository
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comment: Optional[str] = None,
components: Optional[Sequence[str]] = None,
enabled: Optional[bool] = None,
file_path: Optional[str] = None,
file_type: Optional[str] = None,
index: Optional[int] = None,
node: Optional[str] = None,
package_types: Optional[Sequence[str]] = None,
suites: Optional[Sequence[str]] = None,
uris: Optional[Sequence[str]] = None) -> Repository
func GetRepository(ctx *Context, name string, id IDInput, state *RepositoryState, opts ...ResourceOption) (*Repository, error)
public static Repository Get(string name, Input<string> id, RepositoryState? state, CustomResourceOptions? opts = null)
public static Repository get(String name, Output<String> id, RepositoryState 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.
- Comment string
- The associated comment.
- Components List<string>
- The list of components.
- Enabled bool
- Indicates the activation status.
- File
Path string - The absolute path of the source list file that contains this repository.
- File
Type string - The format of the defining source list file.
- Index int
- The index within the defining source list file.
- Node string
- The name of the target Proxmox VE node.
- Package
Types List<string> - The list of package types.
- Suites List<string>
- The list of package distributions.
- Uris List<string>
- The list of repository URIs.
- Comment string
- The associated comment.
- Components []string
- The list of components.
- Enabled bool
- Indicates the activation status.
- File
Path string - The absolute path of the source list file that contains this repository.
- File
Type string - The format of the defining source list file.
- Index int
- The index within the defining source list file.
- Node string
- The name of the target Proxmox VE node.
- Package
Types []string - The list of package types.
- Suites []string
- The list of package distributions.
- Uris []string
- The list of repository URIs.
- comment String
- The associated comment.
- components List<String>
- The list of components.
- enabled Boolean
- Indicates the activation status.
- file
Path String - The absolute path of the source list file that contains this repository.
- file
Type String - The format of the defining source list file.
- index Integer
- The index within the defining source list file.
- node String
- The name of the target Proxmox VE node.
- package
Types List<String> - The list of package types.
- suites List<String>
- The list of package distributions.
- uris List<String>
- The list of repository URIs.
- comment string
- The associated comment.
- components string[]
- The list of components.
- enabled boolean
- Indicates the activation status.
- file
Path string - The absolute path of the source list file that contains this repository.
- file
Type string - The format of the defining source list file.
- index number
- The index within the defining source list file.
- node string
- The name of the target Proxmox VE node.
- package
Types string[] - The list of package types.
- suites string[]
- The list of package distributions.
- uris string[]
- The list of repository URIs.
- comment str
- The associated comment.
- components Sequence[str]
- The list of components.
- enabled bool
- Indicates the activation status.
- file_
path str - The absolute path of the source list file that contains this repository.
- file_
type str - The format of the defining source list file.
- index int
- The index within the defining source list file.
- node str
- The name of the target Proxmox VE node.
- package_
types Sequence[str] - The list of package types.
- suites Sequence[str]
- The list of package distributions.
- uris Sequence[str]
- The list of repository URIs.
- comment String
- The associated comment.
- components List<String>
- The list of components.
- enabled Boolean
- Indicates the activation status.
- file
Path String - The absolute path of the source list file that contains this repository.
- file
Type String - The format of the defining source list file.
- index Number
- The index within the defining source list file.
- node String
- The name of the target Proxmox VE node.
- package
Types List<String> - The list of package types.
- suites List<String>
- The list of package distributions.
- uris List<String>
- The list of repository URIs.
Import
#!/usr/bin/env sh
An APT repository can be imported using a comma-separated list consisting of the name of the Proxmox VE node,
the absolute source list file path, and the index in the exact same order, e.g.:
$ pulumi import proxmoxve:Apt/repository:Repository example pve,/etc/apt/sources.list,0
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- proxmoxve muhlba91/pulumi-proxmoxve
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
proxmox
Terraform Provider.