gitlab.RepositoryFile
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
import * as std from "@pulumi/std";
const _this = new gitlab.Group("this", {
name: "example",
path: "example",
description: "An example group",
});
const thisProject = new gitlab.Project("this", {
name: "example",
namespaceId: _this.id,
initializeWithReadme: true,
});
const thisRepositoryFile = new gitlab.RepositoryFile("this", {
project: thisProject.id,
filePath: "meow.txt",
branch: "main",
content: std.base64encode({
input: "Meow goes the cat",
}).then(invoke => invoke.result),
authorEmail: "terraform@example.com",
authorName: "Terraform",
commitMessage: "feature: add meow file",
});
const readme = new gitlab.RepositoryFile("readme", {
project: thisProject.id,
filePath: "readme.txt",
branch: "main",
content: "Meow goes the cat",
authorEmail: "terraform@example.com",
authorName: "Terraform",
commitMessage: "feature: add readme file",
});
const readmeForDogs = new gitlab.RepositoryFile("readme_for_dogs", {
project: thisProject.id,
filePath: "readme.txt",
branch: "main",
content: "Bark goes the dog",
authorEmail: "terraform@example.com",
authorName: "Terraform",
commitMessage: "feature: update readme file",
overwriteOnCreate: true,
});
import pulumi
import pulumi_gitlab as gitlab
import pulumi_std as std
this = gitlab.Group("this",
name="example",
path="example",
description="An example group")
this_project = gitlab.Project("this",
name="example",
namespace_id=this.id,
initialize_with_readme=True)
this_repository_file = gitlab.RepositoryFile("this",
project=this_project.id,
file_path="meow.txt",
branch="main",
content=std.base64encode(input="Meow goes the cat").result,
author_email="terraform@example.com",
author_name="Terraform",
commit_message="feature: add meow file")
readme = gitlab.RepositoryFile("readme",
project=this_project.id,
file_path="readme.txt",
branch="main",
content="Meow goes the cat",
author_email="terraform@example.com",
author_name="Terraform",
commit_message="feature: add readme file")
readme_for_dogs = gitlab.RepositoryFile("readme_for_dogs",
project=this_project.id,
file_path="readme.txt",
branch="main",
content="Bark goes the dog",
author_email="terraform@example.com",
author_name="Terraform",
commit_message="feature: update readme file",
overwrite_on_create=True)
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
this, err := gitlab.NewGroup(ctx, "this", &gitlab.GroupArgs{
Name: pulumi.String("example"),
Path: pulumi.String("example"),
Description: pulumi.String("An example group"),
})
if err != nil {
return err
}
thisProject, err := gitlab.NewProject(ctx, "this", &gitlab.ProjectArgs{
Name: pulumi.String("example"),
NamespaceId: this.ID(),
InitializeWithReadme: pulumi.Bool(true),
})
if err != nil {
return err
}
invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
Input: "Meow goes the cat",
}, nil)
if err != nil {
return err
}
_, err = gitlab.NewRepositoryFile(ctx, "this", &gitlab.RepositoryFileArgs{
Project: thisProject.ID(),
FilePath: pulumi.String("meow.txt"),
Branch: pulumi.String("main"),
Content: pulumi.String(invokeBase64encode.Result),
AuthorEmail: pulumi.String("terraform@example.com"),
AuthorName: pulumi.String("Terraform"),
CommitMessage: pulumi.String("feature: add meow file"),
})
if err != nil {
return err
}
_, err = gitlab.NewRepositoryFile(ctx, "readme", &gitlab.RepositoryFileArgs{
Project: thisProject.ID(),
FilePath: pulumi.String("readme.txt"),
Branch: pulumi.String("main"),
Content: pulumi.String("Meow goes the cat"),
AuthorEmail: pulumi.String("terraform@example.com"),
AuthorName: pulumi.String("Terraform"),
CommitMessage: pulumi.String("feature: add readme file"),
})
if err != nil {
return err
}
_, err = gitlab.NewRepositoryFile(ctx, "readme_for_dogs", &gitlab.RepositoryFileArgs{
Project: thisProject.ID(),
FilePath: pulumi.String("readme.txt"),
Branch: pulumi.String("main"),
Content: pulumi.String("Bark goes the dog"),
AuthorEmail: pulumi.String("terraform@example.com"),
AuthorName: pulumi.String("Terraform"),
CommitMessage: pulumi.String("feature: update readme file"),
OverwriteOnCreate: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var @this = new GitLab.Group("this", new()
{
Name = "example",
Path = "example",
Description = "An example group",
});
var thisProject = new GitLab.Project("this", new()
{
Name = "example",
NamespaceId = @this.Id,
InitializeWithReadme = true,
});
var thisRepositoryFile = new GitLab.RepositoryFile("this", new()
{
Project = thisProject.Id,
FilePath = "meow.txt",
Branch = "main",
Content = Std.Base64encode.Invoke(new()
{
Input = "Meow goes the cat",
}).Apply(invoke => invoke.Result),
AuthorEmail = "terraform@example.com",
AuthorName = "Terraform",
CommitMessage = "feature: add meow file",
});
var readme = new GitLab.RepositoryFile("readme", new()
{
Project = thisProject.Id,
FilePath = "readme.txt",
Branch = "main",
Content = "Meow goes the cat",
AuthorEmail = "terraform@example.com",
AuthorName = "Terraform",
CommitMessage = "feature: add readme file",
});
var readmeForDogs = new GitLab.RepositoryFile("readme_for_dogs", new()
{
Project = thisProject.Id,
FilePath = "readme.txt",
Branch = "main",
Content = "Bark goes the dog",
AuthorEmail = "terraform@example.com",
AuthorName = "Terraform",
CommitMessage = "feature: update readme file",
OverwriteOnCreate = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Group;
import com.pulumi.gitlab.GroupArgs;
import com.pulumi.gitlab.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.RepositoryFile;
import com.pulumi.gitlab.RepositoryFileArgs;
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 this_ = new Group("this", GroupArgs.builder()
.name("example")
.path("example")
.description("An example group")
.build());
var thisProject = new Project("thisProject", ProjectArgs.builder()
.name("example")
.namespaceId(this_.id())
.initializeWithReadme(true)
.build());
var thisRepositoryFile = new RepositoryFile("thisRepositoryFile", RepositoryFileArgs.builder()
.project(thisProject.id())
.filePath("meow.txt")
.branch("main")
.content(StdFunctions.base64encode(Base64encodeArgs.builder()
.input("Meow goes the cat")
.build()).result())
.authorEmail("terraform@example.com")
.authorName("Terraform")
.commitMessage("feature: add meow file")
.build());
var readme = new RepositoryFile("readme", RepositoryFileArgs.builder()
.project(thisProject.id())
.filePath("readme.txt")
.branch("main")
.content("Meow goes the cat")
.authorEmail("terraform@example.com")
.authorName("Terraform")
.commitMessage("feature: add readme file")
.build());
var readmeForDogs = new RepositoryFile("readmeForDogs", RepositoryFileArgs.builder()
.project(thisProject.id())
.filePath("readme.txt")
.branch("main")
.content("Bark goes the dog")
.authorEmail("terraform@example.com")
.authorName("Terraform")
.commitMessage("feature: update readme file")
.overwriteOnCreate(true)
.build());
}
}
resources:
this:
type: gitlab:Group
properties:
name: example
path: example
description: An example group
thisProject:
type: gitlab:Project
name: this
properties:
name: example
namespaceId: ${this.id}
initializeWithReadme: true
thisRepositoryFile:
type: gitlab:RepositoryFile
name: this
properties:
project: ${thisProject.id}
filePath: meow.txt
branch: main
content:
fn::invoke:
Function: std:base64encode
Arguments:
input: Meow goes the cat
Return: result
authorEmail: terraform@example.com
authorName: Terraform
commitMessage: 'feature: add meow file'
readme:
type: gitlab:RepositoryFile
properties:
project: ${thisProject.id}
filePath: readme.txt
branch: main
content: Meow goes the cat
authorEmail: terraform@example.com
authorName: Terraform
commitMessage: 'feature: add readme file'
readmeForDogs:
type: gitlab:RepositoryFile
name: readme_for_dogs
properties:
project: ${thisProject.id}
filePath: readme.txt
branch: main
content: Bark goes the dog
authorEmail: terraform@example.com
authorName: Terraform
commitMessage: 'feature: update readme file'
overwriteOnCreate: true
Create RepositoryFile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryFile(name: string, args: RepositoryFileArgs, opts?: CustomResourceOptions);
@overload
def RepositoryFile(resource_name: str,
args: RepositoryFileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryFile(resource_name: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
project: Optional[str] = None,
branch: Optional[str] = None,
file_path: Optional[str] = None,
commit_message: Optional[str] = None,
create_commit_message: Optional[str] = None,
delete_commit_message: Optional[str] = None,
encoding: Optional[str] = None,
execute_filemode: Optional[bool] = None,
author_email: Optional[str] = None,
overwrite_on_create: Optional[bool] = None,
author_name: Optional[str] = None,
start_branch: Optional[str] = None,
update_commit_message: Optional[str] = None)
func NewRepositoryFile(ctx *Context, name string, args RepositoryFileArgs, opts ...ResourceOption) (*RepositoryFile, error)
public RepositoryFile(string name, RepositoryFileArgs args, CustomResourceOptions? opts = null)
public RepositoryFile(String name, RepositoryFileArgs args)
public RepositoryFile(String name, RepositoryFileArgs args, CustomResourceOptions options)
type: gitlab:RepositoryFile
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 RepositoryFileArgs
- 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 RepositoryFileArgs
- 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 RepositoryFileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryFileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryFileArgs
- 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 repositoryFileResource = new GitLab.RepositoryFile("repositoryFileResource", new()
{
Content = "string",
Project = "string",
Branch = "string",
FilePath = "string",
CommitMessage = "string",
CreateCommitMessage = "string",
DeleteCommitMessage = "string",
Encoding = "string",
ExecuteFilemode = false,
AuthorEmail = "string",
OverwriteOnCreate = false,
AuthorName = "string",
StartBranch = "string",
UpdateCommitMessage = "string",
});
example, err := gitlab.NewRepositoryFile(ctx, "repositoryFileResource", &gitlab.RepositoryFileArgs{
Content: pulumi.String("string"),
Project: pulumi.String("string"),
Branch: pulumi.String("string"),
FilePath: pulumi.String("string"),
CommitMessage: pulumi.String("string"),
CreateCommitMessage: pulumi.String("string"),
DeleteCommitMessage: pulumi.String("string"),
Encoding: pulumi.String("string"),
ExecuteFilemode: pulumi.Bool(false),
AuthorEmail: pulumi.String("string"),
OverwriteOnCreate: pulumi.Bool(false),
AuthorName: pulumi.String("string"),
StartBranch: pulumi.String("string"),
UpdateCommitMessage: pulumi.String("string"),
})
var repositoryFileResource = new RepositoryFile("repositoryFileResource", RepositoryFileArgs.builder()
.content("string")
.project("string")
.branch("string")
.filePath("string")
.commitMessage("string")
.createCommitMessage("string")
.deleteCommitMessage("string")
.encoding("string")
.executeFilemode(false)
.authorEmail("string")
.overwriteOnCreate(false)
.authorName("string")
.startBranch("string")
.updateCommitMessage("string")
.build());
repository_file_resource = gitlab.RepositoryFile("repositoryFileResource",
content="string",
project="string",
branch="string",
file_path="string",
commit_message="string",
create_commit_message="string",
delete_commit_message="string",
encoding="string",
execute_filemode=False,
author_email="string",
overwrite_on_create=False,
author_name="string",
start_branch="string",
update_commit_message="string")
const repositoryFileResource = new gitlab.RepositoryFile("repositoryFileResource", {
content: "string",
project: "string",
branch: "string",
filePath: "string",
commitMessage: "string",
createCommitMessage: "string",
deleteCommitMessage: "string",
encoding: "string",
executeFilemode: false,
authorEmail: "string",
overwriteOnCreate: false,
authorName: "string",
startBranch: "string",
updateCommitMessage: "string",
});
type: gitlab:RepositoryFile
properties:
authorEmail: string
authorName: string
branch: string
commitMessage: string
content: string
createCommitMessage: string
deleteCommitMessage: string
encoding: string
executeFilemode: false
filePath: string
overwriteOnCreate: false
project: string
startBranch: string
updateCommitMessage: string
RepositoryFile 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 RepositoryFile resource accepts the following input properties:
- Branch string
- Name of the branch to which to commit to.
- Content string
- File content.
- File
Path string - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - Project string
- The name or ID of the project.
- string
- Email of the commit author.
- string
- Name of the commit author.
- Commit
Message string - Commit message.
- Create
Commit stringMessage - Create commit message.
- Delete
Commit stringMessage - Delete Commit message.
- Encoding string
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - Execute
Filemode bool - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- Overwrite
On boolCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - Start
Branch string - Name of the branch to start the new commit from.
- Update
Commit stringMessage - Update commit message.
- Branch string
- Name of the branch to which to commit to.
- Content string
- File content.
- File
Path string - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - Project string
- The name or ID of the project.
- string
- Email of the commit author.
- string
- Name of the commit author.
- Commit
Message string - Commit message.
- Create
Commit stringMessage - Create commit message.
- Delete
Commit stringMessage - Delete Commit message.
- Encoding string
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - Execute
Filemode bool - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- Overwrite
On boolCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - Start
Branch string - Name of the branch to start the new commit from.
- Update
Commit stringMessage - Update commit message.
- branch String
- Name of the branch to which to commit to.
- content String
- File content.
- file
Path String - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - project String
- The name or ID of the project.
- String
- Email of the commit author.
- String
- Name of the commit author.
- commit
Message String - Commit message.
- create
Commit StringMessage - Create commit message.
- delete
Commit StringMessage - Delete Commit message.
- encoding String
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute
Filemode Boolean - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- overwrite
On BooleanCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - start
Branch String - Name of the branch to start the new commit from.
- update
Commit StringMessage - Update commit message.
- branch string
- Name of the branch to which to commit to.
- content string
- File content.
- file
Path string - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - project string
- The name or ID of the project.
- string
- Email of the commit author.
- string
- Name of the commit author.
- commit
Message string - Commit message.
- create
Commit stringMessage - Create commit message.
- delete
Commit stringMessage - Delete Commit message.
- encoding string
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute
Filemode boolean - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- overwrite
On booleanCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - start
Branch string - Name of the branch to start the new commit from.
- update
Commit stringMessage - Update commit message.
- branch str
- Name of the branch to which to commit to.
- content str
- File content.
- file_
path str - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - project str
- The name or ID of the project.
- str
- Email of the commit author.
- str
- Name of the commit author.
- commit_
message str - Commit message.
- create_
commit_ strmessage - Create commit message.
- delete_
commit_ strmessage - Delete Commit message.
- encoding str
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute_
filemode bool - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- overwrite_
on_ boolcreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - start_
branch str - Name of the branch to start the new commit from.
- update_
commit_ strmessage - Update commit message.
- branch String
- Name of the branch to which to commit to.
- content String
- File content.
- file
Path String - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - project String
- The name or ID of the project.
- String
- Email of the commit author.
- String
- Name of the commit author.
- commit
Message String - Commit message.
- create
Commit StringMessage - Create commit message.
- delete
Commit StringMessage - Delete Commit message.
- encoding String
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute
Filemode Boolean - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- overwrite
On BooleanCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - start
Branch String - Name of the branch to start the new commit from.
- update
Commit StringMessage - Update commit message.
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryFile resource produces the following output properties:
- Blob
Id string - The blob id.
- Commit
Id string - The commit id.
- Content
Sha256 string - File content sha256 digest.
- File
Name string - The filename.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Commit stringId - The last known commit id.
- Ref string
- The name of branch, tag or commit.
- Size int
- The file size.
- Blob
Id string - The blob id.
- Commit
Id string - The commit id.
- Content
Sha256 string - File content sha256 digest.
- File
Name string - The filename.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Commit stringId - The last known commit id.
- Ref string
- The name of branch, tag or commit.
- Size int
- The file size.
- blob
Id String - The blob id.
- commit
Id String - The commit id.
- content
Sha256 String - File content sha256 digest.
- file
Name String - The filename.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Commit StringId - The last known commit id.
- ref String
- The name of branch, tag or commit.
- size Integer
- The file size.
- blob
Id string - The blob id.
- commit
Id string - The commit id.
- content
Sha256 string - File content sha256 digest.
- file
Name string - The filename.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Commit stringId - The last known commit id.
- ref string
- The name of branch, tag or commit.
- size number
- The file size.
- blob_
id str - The blob id.
- commit_
id str - The commit id.
- content_
sha256 str - File content sha256 digest.
- file_
name str - The filename.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
commit_ strid - The last known commit id.
- ref str
- The name of branch, tag or commit.
- size int
- The file size.
- blob
Id String - The blob id.
- commit
Id String - The commit id.
- content
Sha256 String - File content sha256 digest.
- file
Name String - The filename.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Commit StringId - The last known commit id.
- ref String
- The name of branch, tag or commit.
- size Number
- The file size.
Look up Existing RepositoryFile Resource
Get an existing RepositoryFile 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?: RepositoryFileState, opts?: CustomResourceOptions): RepositoryFile
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
author_email: Optional[str] = None,
author_name: Optional[str] = None,
blob_id: Optional[str] = None,
branch: Optional[str] = None,
commit_id: Optional[str] = None,
commit_message: Optional[str] = None,
content: Optional[str] = None,
content_sha256: Optional[str] = None,
create_commit_message: Optional[str] = None,
delete_commit_message: Optional[str] = None,
encoding: Optional[str] = None,
execute_filemode: Optional[bool] = None,
file_name: Optional[str] = None,
file_path: Optional[str] = None,
last_commit_id: Optional[str] = None,
overwrite_on_create: Optional[bool] = None,
project: Optional[str] = None,
ref: Optional[str] = None,
size: Optional[int] = None,
start_branch: Optional[str] = None,
update_commit_message: Optional[str] = None) -> RepositoryFile
func GetRepositoryFile(ctx *Context, name string, id IDInput, state *RepositoryFileState, opts ...ResourceOption) (*RepositoryFile, error)
public static RepositoryFile Get(string name, Input<string> id, RepositoryFileState? state, CustomResourceOptions? opts = null)
public static RepositoryFile get(String name, Output<String> id, RepositoryFileState 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.
- string
- Email of the commit author.
- string
- Name of the commit author.
- Blob
Id string - The blob id.
- Branch string
- Name of the branch to which to commit to.
- Commit
Id string - The commit id.
- Commit
Message string - Commit message.
- Content string
- File content.
- Content
Sha256 string - File content sha256 digest.
- Create
Commit stringMessage - Create commit message.
- Delete
Commit stringMessage - Delete Commit message.
- Encoding string
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - Execute
Filemode bool - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- File
Name string - The filename.
- File
Path string - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - Last
Commit stringId - The last known commit id.
- Overwrite
On boolCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - Project string
- The name or ID of the project.
- Ref string
- The name of branch, tag or commit.
- Size int
- The file size.
- Start
Branch string - Name of the branch to start the new commit from.
- Update
Commit stringMessage - Update commit message.
- string
- Email of the commit author.
- string
- Name of the commit author.
- Blob
Id string - The blob id.
- Branch string
- Name of the branch to which to commit to.
- Commit
Id string - The commit id.
- Commit
Message string - Commit message.
- Content string
- File content.
- Content
Sha256 string - File content sha256 digest.
- Create
Commit stringMessage - Create commit message.
- Delete
Commit stringMessage - Delete Commit message.
- Encoding string
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - Execute
Filemode bool - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- File
Name string - The filename.
- File
Path string - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - Last
Commit stringId - The last known commit id.
- Overwrite
On boolCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - Project string
- The name or ID of the project.
- Ref string
- The name of branch, tag or commit.
- Size int
- The file size.
- Start
Branch string - Name of the branch to start the new commit from.
- Update
Commit stringMessage - Update commit message.
- String
- Email of the commit author.
- String
- Name of the commit author.
- blob
Id String - The blob id.
- branch String
- Name of the branch to which to commit to.
- commit
Id String - The commit id.
- commit
Message String - Commit message.
- content String
- File content.
- content
Sha256 String - File content sha256 digest.
- create
Commit StringMessage - Create commit message.
- delete
Commit StringMessage - Delete Commit message.
- encoding String
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute
Filemode Boolean - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- file
Name String - The filename.
- file
Path String - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - last
Commit StringId - The last known commit id.
- overwrite
On BooleanCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - project String
- The name or ID of the project.
- ref String
- The name of branch, tag or commit.
- size Integer
- The file size.
- start
Branch String - Name of the branch to start the new commit from.
- update
Commit StringMessage - Update commit message.
- string
- Email of the commit author.
- string
- Name of the commit author.
- blob
Id string - The blob id.
- branch string
- Name of the branch to which to commit to.
- commit
Id string - The commit id.
- commit
Message string - Commit message.
- content string
- File content.
- content
Sha256 string - File content sha256 digest.
- create
Commit stringMessage - Create commit message.
- delete
Commit stringMessage - Delete Commit message.
- encoding string
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute
Filemode boolean - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- file
Name string - The filename.
- file
Path string - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - last
Commit stringId - The last known commit id.
- overwrite
On booleanCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - project string
- The name or ID of the project.
- ref string
- The name of branch, tag or commit.
- size number
- The file size.
- start
Branch string - Name of the branch to start the new commit from.
- update
Commit stringMessage - Update commit message.
- str
- Email of the commit author.
- str
- Name of the commit author.
- blob_
id str - The blob id.
- branch str
- Name of the branch to which to commit to.
- commit_
id str - The commit id.
- commit_
message str - Commit message.
- content str
- File content.
- content_
sha256 str - File content sha256 digest.
- create_
commit_ strmessage - Create commit message.
- delete_
commit_ strmessage - Delete Commit message.
- encoding str
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute_
filemode bool - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- file_
name str - The filename.
- file_
path str - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - last_
commit_ strid - The last known commit id.
- overwrite_
on_ boolcreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - project str
- The name or ID of the project.
- ref str
- The name of branch, tag or commit.
- size int
- The file size.
- start_
branch str - Name of the branch to start the new commit from.
- update_
commit_ strmessage - Update commit message.
- String
- Email of the commit author.
- String
- Name of the commit author.
- blob
Id String - The blob id.
- branch String
- Name of the branch to which to commit to.
- commit
Id String - The commit id.
- commit
Message String - Commit message.
- content String
- File content.
- content
Sha256 String - File content sha256 digest.
- create
Commit StringMessage - Create commit message.
- delete
Commit StringMessage - Delete Commit message.
- encoding String
- The file content encoding. Default value is
base64
. Valid values are:base64
,text
. - execute
Filemode Boolean - Enables or disables the execute flag on the file. Note: requires GitLab 14.10 or newer.
- file
Name String - The filename.
- file
Path String - The full path of the file. It must be relative to the root of the project without a leading slash
/
or./
. - last
Commit StringId - The last known commit id.
- overwrite
On BooleanCreate - Enable overwriting existing files, defaults to
false
. This attribute is only used duringcreate
and must be use carefully. We suggest to useimports
whenever possible and limit the use of this attribute for when the project was imported on the sameapply
. This attribute is not supported during a resource import. - project String
- The name or ID of the project.
- ref String
- The name of branch, tag or commit.
- size Number
- The file size.
- start
Branch String - Name of the branch to start the new commit from.
- update
Commit StringMessage - Update commit message.
Import
A Repository File can be imported using an id made up of <project-id>:<branch-name>:<file-path>
, e.g.
$ pulumi import gitlab:index/repositoryFile:RepositoryFile this 1:main:foo/bar.txt
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.