Documentation ¶
Index ¶
- func NewScript_Override(s Script, scope constructs.Construct, id *string, config *ScriptConfig)
- func Script_GenerateConfigForImport(scope constructs.Construct, importToId *string, importFromId *string, ...) cdktf.ImportableResource
- func Script_IsConstruct(x interface{}) *bool
- func Script_IsTerraformElement(x interface{}) *bool
- func Script_IsTerraformResource(x interface{}) *bool
- func Script_TfResourceType() *string
- type Script
- type ScriptConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewScript_Override ¶
func NewScript_Override(s Script, scope constructs.Construct, id *string, config *ScriptConfig)
Create a new {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script coder_script} Resource.
func Script_GenerateConfigForImport ¶
func Script_GenerateConfigForImport(scope constructs.Construct, importToId *string, importFromId *string, provider cdktf.TerraformProvider) cdktf.ImportableResource
Generates CDKTF code for importing a Script resource upon running "cdktf plan <stack-name>".
func Script_IsConstruct ¶
func Script_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Script_IsTerraformResource ¶
func Script_IsTerraformResource(x interface{}) *bool
Experimental.
func Script_TfResourceType ¶
func Script_TfResourceType() *string
Types ¶
type Script ¶
type Script interface { cdktf.TerraformResource AgentId() *string SetAgentId(val *string) AgentIdInput() *string // Experimental. CdktfStack() cdktf.TerraformStack // Experimental. Connection() interface{} // Experimental. SetConnection(val interface{}) // Experimental. ConstructNodeMetadata() *map[string]interface{} // Experimental. Count() interface{} // Experimental. SetCount(val interface{}) Cron() *string SetCron(val *string) CronInput() *string // Experimental. DependsOn() *[]*string // Experimental. SetDependsOn(val *[]*string) DisplayName() *string SetDisplayName(val *string) DisplayNameInput() *string // Experimental. ForEach() cdktf.ITerraformIterator // Experimental. SetForEach(val cdktf.ITerraformIterator) // Experimental. Fqn() *string // Experimental. FriendlyUniqueId() *string Icon() *string SetIcon(val *string) IconInput() *string Id() *string SetId(val *string) IdInput() *string // Experimental. Lifecycle() *cdktf.TerraformResourceLifecycle // Experimental. SetLifecycle(val *cdktf.TerraformResourceLifecycle) LogPath() *string SetLogPath(val *string) LogPathInput() *string // The tree node. Node() constructs.Node // Experimental. Provider() cdktf.TerraformProvider // Experimental. SetProvider(val cdktf.TerraformProvider) // Experimental. Provisioners() *[]interface{} // Experimental. SetProvisioners(val *[]interface{}) // Experimental. RawOverrides() interface{} RunOnStart() interface{} SetRunOnStart(val interface{}) RunOnStartInput() interface{} RunOnStop() interface{} SetRunOnStop(val interface{}) RunOnStopInput() interface{} Script() *string SetScript(val *string) ScriptInput() *string StartBlocksLogin() interface{} SetStartBlocksLogin(val interface{}) StartBlocksLoginInput() interface{} // Experimental. TerraformGeneratorMetadata() *cdktf.TerraformProviderGeneratorMetadata // Experimental. TerraformMetaArguments() *map[string]interface{} // Experimental. TerraformResourceType() *string Timeout() *float64 SetTimeout(val *float64) TimeoutInput() *float64 // Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move. // Experimental. AddMoveTarget(moveTarget *string) // Experimental. AddOverride(path *string, value interface{}) // Experimental. GetAnyMapAttribute(terraformAttribute *string) *map[string]interface{} // Experimental. GetBooleanAttribute(terraformAttribute *string) cdktf.IResolvable // Experimental. GetBooleanMapAttribute(terraformAttribute *string) *map[string]*bool // Experimental. GetListAttribute(terraformAttribute *string) *[]*string // Experimental. GetNumberAttribute(terraformAttribute *string) *float64 // Experimental. GetNumberListAttribute(terraformAttribute *string) *[]*float64 // Experimental. GetNumberMapAttribute(terraformAttribute *string) *map[string]*float64 // Experimental. GetStringAttribute(terraformAttribute *string) *string // Experimental. GetStringMapAttribute(terraformAttribute *string) *map[string]*string // Experimental. HasResourceMove() interface{} // Experimental. ImportFrom(id *string, provider cdktf.TerraformProvider) // Experimental. InterpolationForAttribute(terraformAttribute *string) cdktf.IResolvable // Move the resource corresponding to "id" to this resource. // // Note that the resource being moved from must be marked as moved using it's instance function. // Experimental. MoveFromId(id *string) // Moves this resource to the target resource given by moveTarget. // Experimental. MoveTo(moveTarget *string, index interface{}) // Moves this resource to the resource corresponding to "id". // Experimental. MoveToId(id *string) // Overrides the auto-generated logical ID with a specific ID. // Experimental. OverrideLogicalId(newLogicalId *string) ResetCron() ResetIcon() ResetId() ResetLogPath() // Resets a previously passed logical Id to use the auto-generated logical id again. // Experimental. ResetOverrideLogicalId() ResetRunOnStart() ResetRunOnStop() ResetStartBlocksLogin() ResetTimeout() SynthesizeAttributes() *map[string]interface{} SynthesizeHclAttributes() *map[string]interface{} // Experimental. ToHclTerraform() interface{} // Experimental. ToMetadata() interface{} // Returns a string representation of this construct. ToString() *string // Adds this resource to the terraform JSON output. // Experimental. ToTerraform() interface{} }
Represents a {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script coder_script}.
func NewScript ¶
func NewScript(scope constructs.Construct, id *string, config *ScriptConfig) Script
Create a new {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script coder_script} Resource.
type ScriptConfig ¶
type ScriptConfig struct { // Experimental. Connection interface{} `field:"optional" json:"connection" yaml:"connection"` // Experimental. Count interface{} `field:"optional" json:"count" yaml:"count"` // Experimental. DependsOn *[]cdktf.ITerraformDependable `field:"optional" json:"dependsOn" yaml:"dependsOn"` // Experimental. ForEach cdktf.ITerraformIterator `field:"optional" json:"forEach" yaml:"forEach"` // Experimental. Lifecycle *cdktf.TerraformResourceLifecycle `field:"optional" json:"lifecycle" yaml:"lifecycle"` // Experimental. Provider cdktf.TerraformProvider `field:"optional" json:"provider" yaml:"provider"` // Experimental. Provisioners *[]interface{} `field:"optional" json:"provisioners" yaml:"provisioners"` // The "id" property of a "coder_agent" resource to associate with. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#agent_id Script#agent_id} AgentId *string `field:"required" json:"agentId" yaml:"agentId"` // The display name of the script to display logs in the dashboard. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#display_name Script#display_name} DisplayName *string `field:"required" json:"displayName" yaml:"displayName"` // The script to run. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#script Script#script} Script *string `field:"required" json:"script" yaml:"script"` // The cron schedule to run the script on. This is a cron expression. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#cron Script#cron} Cron *string `field:"optional" json:"cron" yaml:"cron"` // A URL to an icon that will display in the dashboard. // // View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a built-in icon with `data.coder_workspace.me.access_url + "/icon/<path>"`. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#icon Script#icon} Icon *string `field:"optional" json:"icon" yaml:"icon"` // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#id Script#id}. // // Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. // If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable. Id *string `field:"optional" json:"id" yaml:"id"` // The path of a file to write the logs to. If relative, it will be appended to tmp. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#log_path Script#log_path} LogPath *string `field:"optional" json:"logPath" yaml:"logPath"` // This option defines whether or not the script should run when the agent starts. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#run_on_start Script#run_on_start} RunOnStart interface{} `field:"optional" json:"runOnStart" yaml:"runOnStart"` // This option defines whether or not the script should run when the agent stops. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#run_on_stop Script#run_on_stop} RunOnStop interface{} `field:"optional" json:"runOnStop" yaml:"runOnStop"` // This option defines whether or not the user can (by default) login to the workspace before this script completes running on start. // // When enabled, users may see an incomplete workspace when logging in. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#start_blocks_login Script#start_blocks_login} StartBlocksLogin interface{} `field:"optional" json:"startBlocksLogin" yaml:"startBlocksLogin"` // Time in seconds until the agent lifecycle status is marked as timed out, this happens when the script has not completed (exited) in the given time. // // Docs at Terraform Registry: {@link https://registry.terraform.io/providers/coder/coder/0.13.0/docs/resources/script#timeout Script#timeout} Timeout *float64 `field:"optional" json:"timeout" yaml:"timeout"` }