harness.service.Codedeploy
Explore with Pulumi AI
Resource for creating an AWS CodeDeploy service. This resource uses the config-as-code API’s. When updating the name
or path
of this resource you should typically also set the create_before_destroy = true
lifecycle setting.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;
return await Deployment.RunAsync(() =>
{
var exampleApplication = new Harness.Application("exampleApplication");
var exampleCodedeploy = new Harness.Service.Codedeploy("exampleCodedeploy", new()
{
AppId = exampleApplication.Id,
Description = "Service for AWS codedeploy applications.",
});
});
package main
import (
"github.com/lbrlabs/pulumi-harness/sdk/go/harness"
"github.com/lbrlabs/pulumi-harness/sdk/go/harness/service"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleApplication, err := harness.NewApplication(ctx, "exampleApplication", nil)
if err != nil {
return err
}
_, err = service.NewCodedeploy(ctx, "exampleCodedeploy", &service.CodedeployArgs{
AppId: exampleApplication.ID(),
Description: pulumi.String("Service for AWS codedeploy applications."),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.Application;
import com.pulumi.harness.service.Codedeploy;
import com.pulumi.harness.service.CodedeployArgs;
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 exampleApplication = new Application("exampleApplication");
var exampleCodedeploy = new Codedeploy("exampleCodedeploy", CodedeployArgs.builder()
.appId(exampleApplication.id())
.description("Service for AWS codedeploy applications.")
.build());
}
}
import pulumi
import lbrlabs_pulumi_harness as harness
example_application = harness.Application("exampleApplication")
example_codedeploy = harness.service.Codedeploy("exampleCodedeploy",
app_id=example_application.id,
description="Service for AWS codedeploy applications.")
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@lbrlabs/pulumi-harness";
const exampleApplication = new harness.Application("exampleApplication", {});
const exampleCodedeploy = new harness.service.Codedeploy("exampleCodedeploy", {
appId: exampleApplication.id,
description: "Service for AWS codedeploy applications.",
});
resources:
exampleApplication:
type: harness:Application
exampleCodedeploy:
type: harness:service:Codedeploy
properties:
appId: ${exampleApplication.id}
description: Service for AWS codedeploy applications.
Create Codedeploy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Codedeploy(name: string, args: CodedeployArgs, opts?: CustomResourceOptions);
@overload
def Codedeploy(resource_name: str,
args: CodedeployArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Codedeploy(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
variables: Optional[Sequence[CodedeployVariableArgs]] = None)
func NewCodedeploy(ctx *Context, name string, args CodedeployArgs, opts ...ResourceOption) (*Codedeploy, error)
public Codedeploy(string name, CodedeployArgs args, CustomResourceOptions? opts = null)
public Codedeploy(String name, CodedeployArgs args)
public Codedeploy(String name, CodedeployArgs args, CustomResourceOptions options)
type: harness:service:Codedeploy
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 CodedeployArgs
- 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 CodedeployArgs
- 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 CodedeployArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CodedeployArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CodedeployArgs
- 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 codedeployResource = new Harness.Service.Codedeploy("codedeployResource", new()
{
AppId = "string",
Description = "string",
Name = "string",
Variables = new[]
{
new Harness.Service.Inputs.CodedeployVariableArgs
{
Name = "string",
Type = "string",
Value = "string",
},
},
});
example, err := service.NewCodedeploy(ctx, "codedeployResource", &service.CodedeployArgs{
AppId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Variables: service.CodedeployVariableArray{
&service.CodedeployVariableArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var codedeployResource = new Codedeploy("codedeployResource", CodedeployArgs.builder()
.appId("string")
.description("string")
.name("string")
.variables(CodedeployVariableArgs.builder()
.name("string")
.type("string")
.value("string")
.build())
.build());
codedeploy_resource = harness.service.Codedeploy("codedeployResource",
app_id="string",
description="string",
name="string",
variables=[harness.service.CodedeployVariableArgs(
name="string",
type="string",
value="string",
)])
const codedeployResource = new harness.service.Codedeploy("codedeployResource", {
appId: "string",
description: "string",
name: "string",
variables: [{
name: "string",
type: "string",
value: "string",
}],
});
type: harness:service:Codedeploy
properties:
appId: string
description: string
name: string
variables:
- name: string
type: string
value: string
Codedeploy 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 Codedeploy resource accepts the following input properties:
- App
Id string - The id of the application the service belongs to
- Description string
- Description of th service
- Name string
- Name of the service
- Variables
List<Lbrlabs.
Pulumi Package. Harness. Service. Inputs. Codedeploy Variable> - Variables to be used in the service
- App
Id string - The id of the application the service belongs to
- Description string
- Description of th service
- Name string
- Name of the service
- Variables
[]Codedeploy
Variable Args - Variables to be used in the service
- app
Id String - The id of the application the service belongs to
- description String
- Description of th service
- name String
- Name of the service
- variables
List<Codedeploy
Variable> - Variables to be used in the service
- app
Id string - The id of the application the service belongs to
- description string
- Description of th service
- name string
- Name of the service
- variables
Codedeploy
Variable[] - Variables to be used in the service
- app_
id str - The id of the application the service belongs to
- description str
- Description of th service
- name str
- Name of the service
- variables
Sequence[Codedeploy
Variable Args] - Variables to be used in the service
- app
Id String - The id of the application the service belongs to
- description String
- Description of th service
- name String
- Name of the service
- variables List<Property Map>
- Variables to be used in the service
Outputs
All input properties are implicitly available as output properties. Additionally, the Codedeploy 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 Codedeploy Resource
Get an existing Codedeploy 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?: CodedeployState, opts?: CustomResourceOptions): Codedeploy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
variables: Optional[Sequence[CodedeployVariableArgs]] = None) -> Codedeploy
func GetCodedeploy(ctx *Context, name string, id IDInput, state *CodedeployState, opts ...ResourceOption) (*Codedeploy, error)
public static Codedeploy Get(string name, Input<string> id, CodedeployState? state, CustomResourceOptions? opts = null)
public static Codedeploy get(String name, Output<String> id, CodedeployState 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.
- App
Id string - The id of the application the service belongs to
- Description string
- Description of th service
- Name string
- Name of the service
- Variables
List<Lbrlabs.
Pulumi Package. Harness. Service. Inputs. Codedeploy Variable> - Variables to be used in the service
- App
Id string - The id of the application the service belongs to
- Description string
- Description of th service
- Name string
- Name of the service
- Variables
[]Codedeploy
Variable Args - Variables to be used in the service
- app
Id String - The id of the application the service belongs to
- description String
- Description of th service
- name String
- Name of the service
- variables
List<Codedeploy
Variable> - Variables to be used in the service
- app
Id string - The id of the application the service belongs to
- description string
- Description of th service
- name string
- Name of the service
- variables
Codedeploy
Variable[] - Variables to be used in the service
- app_
id str - The id of the application the service belongs to
- description str
- Description of th service
- name str
- Name of the service
- variables
Sequence[Codedeploy
Variable Args] - Variables to be used in the service
- app
Id String - The id of the application the service belongs to
- description String
- Description of th service
- name String
- Name of the service
- variables List<Property Map>
- Variables to be used in the service
Supporting Types
CodedeployVariable, CodedeployVariableArgs
Import
Import using the Harness application id and service id
$ pulumi import harness:service/codedeploy:Codedeploy example <app_id>/<svc_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness lbrlabs/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.