GitHub

Pulumi Official
Package maintained by Pulumi
v4.15.1 published on Wednesday, Aug 10, 2022 by Pulumi

ActionsEnvironmentSecret

Import

This resource can be imported using an ID made up of the secret name

 $ pulumi import github:index/actionsEnvironmentSecret:ActionsEnvironmentSecret test_secret test_secret_name

NOTEthe implementation is limited in that it won’t fetch the value of the plaintext_value field when importing. You may need to ignore changes for the plaintext_value as a workaround.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var exampleSecretActionsEnvironmentSecret = new Github.ActionsEnvironmentSecret("exampleSecretActionsEnvironmentSecret", new()
    {
        Environment = "example_environment",
        SecretName = "example_secret_name",
        PlaintextValue = @var.Some_secret_string,
    });

    var exampleSecretIndex_actionsEnvironmentSecretActionsEnvironmentSecret = new Github.ActionsEnvironmentSecret("exampleSecretIndex/actionsEnvironmentSecretActionsEnvironmentSecret", new()
    {
        Environment = "example_environment",
        SecretName = "example_secret_name",
        EncryptedValue = @var.Some_encrypted_secret_string,
    });

});
package main

import (
	"github.com/pulumi/pulumi-github/sdk/v4/go/github"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := github.NewActionsEnvironmentSecret(ctx, "exampleSecretActionsEnvironmentSecret", &github.ActionsEnvironmentSecretArgs{
			Environment:    pulumi.String("example_environment"),
			SecretName:     pulumi.String("example_secret_name"),
			PlaintextValue: pulumi.Any(_var.Some_secret_string),
		})
		if err != nil {
			return err
		}
		_, err = github.NewActionsEnvironmentSecret(ctx, "exampleSecretIndex/actionsEnvironmentSecretActionsEnvironmentSecret", &github.ActionsEnvironmentSecretArgs{
			Environment:    pulumi.String("example_environment"),
			SecretName:     pulumi.String("example_secret_name"),
			EncryptedValue: pulumi.Any(_var.Some_encrypted_secret_string),
		})
		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.github.ActionsEnvironmentSecret;
import com.pulumi.github.ActionsEnvironmentSecretArgs;
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 exampleSecretActionsEnvironmentSecret = new ActionsEnvironmentSecret("exampleSecretActionsEnvironmentSecret", ActionsEnvironmentSecretArgs.builder()        
            .environment("example_environment")
            .secretName("example_secret_name")
            .plaintextValue(var_.some_secret_string())
            .build());

        var exampleSecretIndex_actionsEnvironmentSecretActionsEnvironmentSecret = new ActionsEnvironmentSecret("exampleSecretIndex/actionsEnvironmentSecretActionsEnvironmentSecret", ActionsEnvironmentSecretArgs.builder()        
            .environment("example_environment")
            .secretName("example_secret_name")
            .encryptedValue(var_.some_encrypted_secret_string())
            .build());

    }
}
import pulumi
import pulumi_github as github

example_secret_actions_environment_secret = github.ActionsEnvironmentSecret("exampleSecretActionsEnvironmentSecret",
    environment="example_environment",
    secret_name="example_secret_name",
    plaintext_value=var["some_secret_string"])
example_secret_index_actions_environment_secret_actions_environment_secret = github.ActionsEnvironmentSecret("exampleSecretIndex/actionsEnvironmentSecretActionsEnvironmentSecret",
    environment="example_environment",
    secret_name="example_secret_name",
    encrypted_value=var["some_encrypted_secret_string"])
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const exampleSecretActionsEnvironmentSecret = new github.ActionsEnvironmentSecret("exampleSecretActionsEnvironmentSecret", {
    environment: "example_environment",
    secretName: "example_secret_name",
    plaintextValue: _var.some_secret_string,
});
const exampleSecretIndex_actionsEnvironmentSecretActionsEnvironmentSecret = new github.ActionsEnvironmentSecret("exampleSecretIndex/actionsEnvironmentSecretActionsEnvironmentSecret", {
    environment: "example_environment",
    secretName: "example_secret_name",
    encryptedValue: _var.some_encrypted_secret_string,
});
resources:
  exampleSecretActionsEnvironmentSecret:
    type: github:ActionsEnvironmentSecret
    properties:
      environment: example_environment
      secretName: example_secret_name
      plaintextValue: ${var.some_secret_string}
  exampleSecretIndex/actionsEnvironmentSecretActionsEnvironmentSecret:
    type: github:ActionsEnvironmentSecret
    properties:
      environment: example_environment
      secretName: example_secret_name
      encryptedValue: ${var.some_encrypted_secret_string}

Create a ActionsEnvironmentSecret Resource

new ActionsEnvironmentSecret(name: string, args: ActionsEnvironmentSecretArgs, opts?: CustomResourceOptions);
@overload
def ActionsEnvironmentSecret(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             encrypted_value: Optional[str] = None,
                             environment: Optional[str] = None,
                             plaintext_value: Optional[str] = None,
                             repository: Optional[str] = None,
                             secret_name: Optional[str] = None)
@overload
def ActionsEnvironmentSecret(resource_name: str,
                             args: ActionsEnvironmentSecretArgs,
                             opts: Optional[ResourceOptions] = None)
func NewActionsEnvironmentSecret(ctx *Context, name string, args ActionsEnvironmentSecretArgs, opts ...ResourceOption) (*ActionsEnvironmentSecret, error)
public ActionsEnvironmentSecret(string name, ActionsEnvironmentSecretArgs args, CustomResourceOptions? opts = null)
public ActionsEnvironmentSecret(String name, ActionsEnvironmentSecretArgs args)
public ActionsEnvironmentSecret(String name, ActionsEnvironmentSecretArgs args, CustomResourceOptions options)
type: github:ActionsEnvironmentSecret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ActionsEnvironmentSecretArgs
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 ActionsEnvironmentSecretArgs
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 ActionsEnvironmentSecretArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ActionsEnvironmentSecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ActionsEnvironmentSecretArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ActionsEnvironmentSecret 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 ActionsEnvironmentSecret resource accepts the following input properties:

Environment string

Name of the environment.

Repository string

Name of the repository.

SecretName string

Name of the secret.

EncryptedValue string

Encrypted value of the secret using the Github public key in Base64 format.

PlaintextValue string

Plaintext value of the secret to be encrypted.

Environment string

Name of the environment.

Repository string

Name of the repository.

SecretName string

Name of the secret.

EncryptedValue string

Encrypted value of the secret using the Github public key in Base64 format.

PlaintextValue string

Plaintext value of the secret to be encrypted.

environment String

Name of the environment.

repository String

Name of the repository.

secretName String

Name of the secret.

encryptedValue String

Encrypted value of the secret using the Github public key in Base64 format.

plaintextValue String

Plaintext value of the secret to be encrypted.

environment string

Name of the environment.

repository string

Name of the repository.

secretName string

Name of the secret.

encryptedValue string

Encrypted value of the secret using the Github public key in Base64 format.

plaintextValue string

Plaintext value of the secret to be encrypted.

environment str

Name of the environment.

repository str

Name of the repository.

secret_name str

Name of the secret.

encrypted_value str

Encrypted value of the secret using the Github public key in Base64 format.

plaintext_value str

Plaintext value of the secret to be encrypted.

environment String

Name of the environment.

repository String

Name of the repository.

secretName String

Name of the secret.

encryptedValue String

Encrypted value of the secret using the Github public key in Base64 format.

plaintextValue String

Plaintext value of the secret to be encrypted.

Outputs

All input properties are implicitly available as output properties. Additionally, the ActionsEnvironmentSecret resource produces the following output properties:

CreatedAt string

Date of actions_environment_secret creation.

Id string

The provider-assigned unique ID for this managed resource.

UpdatedAt string

Date of actions_environment_secret update.

CreatedAt string

Date of actions_environment_secret creation.

Id string

The provider-assigned unique ID for this managed resource.

UpdatedAt string

Date of actions_environment_secret update.

createdAt String

Date of actions_environment_secret creation.

id String

The provider-assigned unique ID for this managed resource.

updatedAt String

Date of actions_environment_secret update.

createdAt string

Date of actions_environment_secret creation.

id string

The provider-assigned unique ID for this managed resource.

updatedAt string

Date of actions_environment_secret update.

created_at str

Date of actions_environment_secret creation.

id str

The provider-assigned unique ID for this managed resource.

updated_at str

Date of actions_environment_secret update.

createdAt String

Date of actions_environment_secret creation.

id String

The provider-assigned unique ID for this managed resource.

updatedAt String

Date of actions_environment_secret update.

Look up an Existing ActionsEnvironmentSecret Resource

Get an existing ActionsEnvironmentSecret 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?: ActionsEnvironmentSecretState, opts?: CustomResourceOptions): ActionsEnvironmentSecret
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        encrypted_value: Optional[str] = None,
        environment: Optional[str] = None,
        plaintext_value: Optional[str] = None,
        repository: Optional[str] = None,
        secret_name: Optional[str] = None,
        updated_at: Optional[str] = None) -> ActionsEnvironmentSecret
func GetActionsEnvironmentSecret(ctx *Context, name string, id IDInput, state *ActionsEnvironmentSecretState, opts ...ResourceOption) (*ActionsEnvironmentSecret, error)
public static ActionsEnvironmentSecret Get(string name, Input<string> id, ActionsEnvironmentSecretState? state, CustomResourceOptions? opts = null)
public static ActionsEnvironmentSecret get(String name, Output<String> id, ActionsEnvironmentSecretState 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.
The following state arguments are supported:
CreatedAt string

Date of actions_environment_secret creation.

EncryptedValue string

Encrypted value of the secret using the Github public key in Base64 format.

Environment string

Name of the environment.

PlaintextValue string

Plaintext value of the secret to be encrypted.

Repository string

Name of the repository.

SecretName string

Name of the secret.

UpdatedAt string

Date of actions_environment_secret update.

CreatedAt string

Date of actions_environment_secret creation.

EncryptedValue string

Encrypted value of the secret using the Github public key in Base64 format.

Environment string

Name of the environment.

PlaintextValue string

Plaintext value of the secret to be encrypted.

Repository string

Name of the repository.

SecretName string

Name of the secret.

UpdatedAt string

Date of actions_environment_secret update.

createdAt String

Date of actions_environment_secret creation.

encryptedValue String

Encrypted value of the secret using the Github public key in Base64 format.

environment String

Name of the environment.

plaintextValue String

Plaintext value of the secret to be encrypted.

repository String

Name of the repository.

secretName String

Name of the secret.

updatedAt String

Date of actions_environment_secret update.

createdAt string

Date of actions_environment_secret creation.

encryptedValue string

Encrypted value of the secret using the Github public key in Base64 format.

environment string

Name of the environment.

plaintextValue string

Plaintext value of the secret to be encrypted.

repository string

Name of the repository.

secretName string

Name of the secret.

updatedAt string

Date of actions_environment_secret update.

created_at str

Date of actions_environment_secret creation.

encrypted_value str

Encrypted value of the secret using the Github public key in Base64 format.

environment str

Name of the environment.

plaintext_value str

Plaintext value of the secret to be encrypted.

repository str

Name of the repository.

secret_name str

Name of the secret.

updated_at str

Date of actions_environment_secret update.

createdAt String

Date of actions_environment_secret creation.

encryptedValue String

Encrypted value of the secret using the Github public key in Base64 format.

environment String

Name of the environment.

plaintextValue String

Plaintext value of the secret to be encrypted.

repository String

Name of the repository.

secretName String

Name of the secret.

updatedAt String

Date of actions_environment_secret update.

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes

This Pulumi package is based on the github Terraform Provider.