harness.platform.FileStoreFile
Explore with Pulumi AI
Resource for creating files in Harness.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
// Create file
const example = new harness.platform.FileStoreFile("example", {
orgId: "org_id",
projectId: "project_id",
identifier: "identifier",
name: "name",
description: "description",
tags: [
"foo:bar",
"baz:qux",
],
parentIdentifier: "parent_identifier",
fileContentPath: "file_content_path",
mimeType: "mime_type",
fileUsage: "MANIFEST_FILE|CONFIG|SCRIPT",
});
import pulumi
import pulumi_harness as harness
# Create file
example = harness.platform.FileStoreFile("example",
org_id="org_id",
project_id="project_id",
identifier="identifier",
name="name",
description="description",
tags=[
"foo:bar",
"baz:qux",
],
parent_identifier="parent_identifier",
file_content_path="file_content_path",
mime_type="mime_type",
file_usage="MANIFEST_FILE|CONFIG|SCRIPT")
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create file
_, err := platform.NewFileStoreFile(ctx, "example", &platform.FileStoreFileArgs{
OrgId: pulumi.String("org_id"),
ProjectId: pulumi.String("project_id"),
Identifier: pulumi.String("identifier"),
Name: pulumi.String("name"),
Description: pulumi.String("description"),
Tags: pulumi.StringArray{
pulumi.String("foo:bar"),
pulumi.String("baz:qux"),
},
ParentIdentifier: pulumi.String("parent_identifier"),
FileContentPath: pulumi.String("file_content_path"),
MimeType: pulumi.String("mime_type"),
FileUsage: pulumi.String("MANIFEST_FILE|CONFIG|SCRIPT"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
// Create file
var example = new Harness.Platform.FileStoreFile("example", new()
{
OrgId = "org_id",
ProjectId = "project_id",
Identifier = "identifier",
Name = "name",
Description = "description",
Tags = new[]
{
"foo:bar",
"baz:qux",
},
ParentIdentifier = "parent_identifier",
FileContentPath = "file_content_path",
MimeType = "mime_type",
FileUsage = "MANIFEST_FILE|CONFIG|SCRIPT",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.FileStoreFile;
import com.pulumi.harness.platform.FileStoreFileArgs;
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) {
// Create file
var example = new FileStoreFile("example", FileStoreFileArgs.builder()
.orgId("org_id")
.projectId("project_id")
.identifier("identifier")
.name("name")
.description("description")
.tags(
"foo:bar",
"baz:qux")
.parentIdentifier("parent_identifier")
.fileContentPath("file_content_path")
.mimeType("mime_type")
.fileUsage("MANIFEST_FILE|CONFIG|SCRIPT")
.build());
}
}
resources:
# Create file
example:
type: harness:platform:FileStoreFile
properties:
orgId: org_id
projectId: project_id
identifier: identifier
name: name
description: description
tags:
- foo:bar
- baz:qux
parentIdentifier: parent_identifier
fileContentPath: file_content_path
mimeType: mime_type
fileUsage: MANIFEST_FILE|CONFIG|SCRIPT
Create FileStoreFile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FileStoreFile(name: string, args: FileStoreFileArgs, opts?: CustomResourceOptions);
@overload
def FileStoreFile(resource_name: str,
args: FileStoreFileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FileStoreFile(resource_name: str,
opts: Optional[ResourceOptions] = None,
identifier: Optional[str] = None,
parent_identifier: Optional[str] = None,
content: Optional[str] = None,
description: Optional[str] = None,
file_content_path: Optional[str] = None,
file_usage: Optional[str] = None,
mime_type: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
func NewFileStoreFile(ctx *Context, name string, args FileStoreFileArgs, opts ...ResourceOption) (*FileStoreFile, error)
public FileStoreFile(string name, FileStoreFileArgs args, CustomResourceOptions? opts = null)
public FileStoreFile(String name, FileStoreFileArgs args)
public FileStoreFile(String name, FileStoreFileArgs args, CustomResourceOptions options)
type: harness:platform:FileStoreFile
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 FileStoreFileArgs
- 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 FileStoreFileArgs
- 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 FileStoreFileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FileStoreFileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FileStoreFileArgs
- 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 fileStoreFileResource = new Harness.Platform.FileStoreFile("fileStoreFileResource", new()
{
Identifier = "string",
ParentIdentifier = "string",
Content = "string",
Description = "string",
FileContentPath = "string",
FileUsage = "string",
MimeType = "string",
Name = "string",
OrgId = "string",
ProjectId = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewFileStoreFile(ctx, "fileStoreFileResource", &platform.FileStoreFileArgs{
Identifier: pulumi.String("string"),
ParentIdentifier: pulumi.String("string"),
Content: pulumi.String("string"),
Description: pulumi.String("string"),
FileContentPath: pulumi.String("string"),
FileUsage: pulumi.String("string"),
MimeType: pulumi.String("string"),
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var fileStoreFileResource = new FileStoreFile("fileStoreFileResource", FileStoreFileArgs.builder()
.identifier("string")
.parentIdentifier("string")
.content("string")
.description("string")
.fileContentPath("string")
.fileUsage("string")
.mimeType("string")
.name("string")
.orgId("string")
.projectId("string")
.tags("string")
.build());
file_store_file_resource = harness.platform.FileStoreFile("fileStoreFileResource",
identifier="string",
parent_identifier="string",
content="string",
description="string",
file_content_path="string",
file_usage="string",
mime_type="string",
name="string",
org_id="string",
project_id="string",
tags=["string"])
const fileStoreFileResource = new harness.platform.FileStoreFile("fileStoreFileResource", {
identifier: "string",
parentIdentifier: "string",
content: "string",
description: "string",
fileContentPath: "string",
fileUsage: "string",
mimeType: "string",
name: "string",
orgId: "string",
projectId: "string",
tags: ["string"],
});
type: harness:platform:FileStoreFile
properties:
content: string
description: string
fileContentPath: string
fileUsage: string
identifier: string
mimeType: string
name: string
orgId: string
parentIdentifier: string
projectId: string
tags:
- string
FileStoreFile 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 FileStoreFile resource accepts the following input properties:
- Identifier string
- Unique identifier of the resource.
- Parent
Identifier string - File parent identifier on Harness File Store
- Content string
- File content stored on Harness File Store
- Description string
- Description of the resource.
- File
Content stringPath - File content path to be upladed on Harness File Store
- File
Usage string - File usage. Valid options are ManifestFile, Config, Script
- Mime
Type string - File mime type
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Identifier string
- Unique identifier of the resource.
- Parent
Identifier string - File parent identifier on Harness File Store
- Content string
- File content stored on Harness File Store
- Description string
- Description of the resource.
- File
Content stringPath - File content path to be upladed on Harness File Store
- File
Usage string - File usage. Valid options are ManifestFile, Config, Script
- Mime
Type string - File mime type
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- parent
Identifier String - File parent identifier on Harness File Store
- content String
- File content stored on Harness File Store
- description String
- Description of the resource.
- file
Content StringPath - File content path to be upladed on Harness File Store
- file
Usage String - File usage. Valid options are ManifestFile, Config, Script
- mime
Type String - File mime type
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- identifier string
- Unique identifier of the resource.
- parent
Identifier string - File parent identifier on Harness File Store
- content string
- File content stored on Harness File Store
- description string
- Description of the resource.
- file
Content stringPath - File content path to be upladed on Harness File Store
- file
Usage string - File usage. Valid options are ManifestFile, Config, Script
- mime
Type string - File mime type
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- identifier str
- Unique identifier of the resource.
- parent_
identifier str - File parent identifier on Harness File Store
- content str
- File content stored on Harness File Store
- description str
- Description of the resource.
- file_
content_ strpath - File content path to be upladed on Harness File Store
- file_
usage str - File usage. Valid options are ManifestFile, Config, Script
- mime_
type str - File mime type
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- parent
Identifier String - File parent identifier on Harness File Store
- content String
- File content stored on Harness File Store
- description String
- Description of the resource.
- file
Content StringPath - File content path to be upladed on Harness File Store
- file
Usage String - File usage. Valid options are ManifestFile, Config, Script
- mime
Type String - File mime type
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the FileStoreFile resource produces the following output properties:
- Created
Bies List<FileStore File Created By> - Created by
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified intAt - Last modified at
- Last
Modified List<FileBies Store File Last Modified By> - Last modified by
- Path string
- Harness File Store file path
- Created
Bies []FileStore File Created By - Created by
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified intAt - Last modified at
- Last
Modified []FileBies Store File Last Modified By - Last modified by
- Path string
- Harness File Store file path
- created
Bies List<FileStore File Created By> - Created by
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified IntegerAt - Last modified at
- last
Modified List<FileBies Store File Last Modified By> - Last modified by
- path String
- Harness File Store file path
- created
Bies FileStore File Created By[] - Created by
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified numberAt - Last modified at
- last
Modified FileBies Store File Last Modified By[] - Last modified by
- path string
- Harness File Store file path
- created_
bies Sequence[FileStore File Created By] - Created by
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified_ intat - Last modified at
- last_
modified_ Sequence[Filebies Store File Last Modified By] - Last modified by
- path str
- Harness File Store file path
- created
Bies List<Property Map> - Created by
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified NumberAt - Last modified at
- last
Modified List<Property Map>Bies - Last modified by
- path String
- Harness File Store file path
Look up Existing FileStoreFile Resource
Get an existing FileStoreFile 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?: FileStoreFileState, opts?: CustomResourceOptions): FileStoreFile
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
created_bies: Optional[Sequence[FileStoreFileCreatedByArgs]] = None,
description: Optional[str] = None,
file_content_path: Optional[str] = None,
file_usage: Optional[str] = None,
identifier: Optional[str] = None,
last_modified_at: Optional[int] = None,
last_modified_bies: Optional[Sequence[FileStoreFileLastModifiedByArgs]] = None,
mime_type: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
parent_identifier: Optional[str] = None,
path: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> FileStoreFile
func GetFileStoreFile(ctx *Context, name string, id IDInput, state *FileStoreFileState, opts ...ResourceOption) (*FileStoreFile, error)
public static FileStoreFile Get(string name, Input<string> id, FileStoreFileState? state, CustomResourceOptions? opts = null)
public static FileStoreFile get(String name, Output<String> id, FileStoreFileState 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.
- Content string
- File content stored on Harness File Store
- Created
Bies List<FileStore File Created By> - Created by
- Description string
- Description of the resource.
- File
Content stringPath - File content path to be upladed on Harness File Store
- File
Usage string - File usage. Valid options are ManifestFile, Config, Script
- Identifier string
- Unique identifier of the resource.
- Last
Modified intAt - Last modified at
- Last
Modified List<FileBies Store File Last Modified By> - Last modified by
- Mime
Type string - File mime type
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Parent
Identifier string - File parent identifier on Harness File Store
- Path string
- Harness File Store file path
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Content string
- File content stored on Harness File Store
- Created
Bies []FileStore File Created By Args - Created by
- Description string
- Description of the resource.
- File
Content stringPath - File content path to be upladed on Harness File Store
- File
Usage string - File usage. Valid options are ManifestFile, Config, Script
- Identifier string
- Unique identifier of the resource.
- Last
Modified intAt - Last modified at
- Last
Modified []FileBies Store File Last Modified By Args - Last modified by
- Mime
Type string - File mime type
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Parent
Identifier string - File parent identifier on Harness File Store
- Path string
- Harness File Store file path
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- content String
- File content stored on Harness File Store
- created
Bies List<FileStore File Created By> - Created by
- description String
- Description of the resource.
- file
Content StringPath - File content path to be upladed on Harness File Store
- file
Usage String - File usage. Valid options are ManifestFile, Config, Script
- identifier String
- Unique identifier of the resource.
- last
Modified IntegerAt - Last modified at
- last
Modified List<FileBies Store File Last Modified By> - Last modified by
- mime
Type String - File mime type
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- parent
Identifier String - File parent identifier on Harness File Store
- path String
- Harness File Store file path
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- content string
- File content stored on Harness File Store
- created
Bies FileStore File Created By[] - Created by
- description string
- Description of the resource.
- file
Content stringPath - File content path to be upladed on Harness File Store
- file
Usage string - File usage. Valid options are ManifestFile, Config, Script
- identifier string
- Unique identifier of the resource.
- last
Modified numberAt - Last modified at
- last
Modified FileBies Store File Last Modified By[] - Last modified by
- mime
Type string - File mime type
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- parent
Identifier string - File parent identifier on Harness File Store
- path string
- Harness File Store file path
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- content str
- File content stored on Harness File Store
- created_
bies Sequence[FileStore File Created By Args] - Created by
- description str
- Description of the resource.
- file_
content_ strpath - File content path to be upladed on Harness File Store
- file_
usage str - File usage. Valid options are ManifestFile, Config, Script
- identifier str
- Unique identifier of the resource.
- last_
modified_ intat - Last modified at
- last_
modified_ Sequence[Filebies Store File Last Modified By Args] - Last modified by
- mime_
type str - File mime type
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- parent_
identifier str - File parent identifier on Harness File Store
- path str
- Harness File Store file path
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- content String
- File content stored on Harness File Store
- created
Bies List<Property Map> - Created by
- description String
- Description of the resource.
- file
Content StringPath - File content path to be upladed on Harness File Store
- file
Usage String - File usage. Valid options are ManifestFile, Config, Script
- identifier String
- Unique identifier of the resource.
- last
Modified NumberAt - Last modified at
- last
Modified List<Property Map>Bies - Last modified by
- mime
Type String - File mime type
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- parent
Identifier String - File parent identifier on Harness File Store
- path String
- Harness File Store file path
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
Supporting Types
FileStoreFileCreatedBy, FileStoreFileCreatedByArgs
FileStoreFileLastModifiedBy, FileStoreFileLastModifiedByArgs
Import
Import account level file
$ pulumi import harness:platform/fileStoreFile:FileStoreFile example <identifier>
Import org level file
$ pulumi import harness:platform/fileStoreFile:FileStoreFile example <org_id><identifier>
Import org level file
$ pulumi import harness:platform/fileStoreFile:FileStoreFile example <org_id><project_id><identifier>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.