
com.pulumi.github.ActionsEnvironmentSecret Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.github;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.github.ActionsEnvironmentSecretArgs;
import com.pulumi.github.Utilities;
import com.pulumi.github.inputs.ActionsEnvironmentSecretState;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* ## Example Usage
* ```java
* 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());
*
* }
* }
* ```
* ```java
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.github.GithubFunctions;
* import com.pulumi.github.inputs.GetRepositoryArgs;
* import com.pulumi.github.RepositoryEnvironment;
* import com.pulumi.github.RepositoryEnvironmentArgs;
* 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) {
* final var repo = GithubFunctions.getRepository(GetRepositoryArgs.builder()
* .fullName("my-org/repo")
* .build());
*
* var repoEnvironment = new RepositoryEnvironment("repoEnvironment", RepositoryEnvironmentArgs.builder()
* .repository(repo.applyValue(getRepositoryResult -> getRepositoryResult.name()))
* .environment("example_environment")
* .build());
*
* var testSecret = new ActionsEnvironmentSecret("testSecret", ActionsEnvironmentSecretArgs.builder()
* .repository(repo.applyValue(getRepositoryResult -> getRepositoryResult.name()))
* .environment(repoEnvironment.environment())
* .secretName("test_secret_name")
* .plaintextValue("%s")
* .build());
*
* }
* }
* ```
*
* ## Import
*
* This resource does not support importing. If you'd like to help contribute it, please visit our [GitHub page](https://github.com/integrations/terraform-provider-github)!
*
*/
@ResourceType(type="github:index/actionsEnvironmentSecret:ActionsEnvironmentSecret")
public class ActionsEnvironmentSecret extends com.pulumi.resources.CustomResource {
/**
* Date of actions_environment_secret creation.
*
*/
@Export(name="createdAt", type=String.class, parameters={})
private Output createdAt;
/**
* @return Date of actions_environment_secret creation.
*
*/
public Output createdAt() {
return this.createdAt;
}
/**
* Encrypted value of the secret using the GitHub public key in Base64 format.
*
*/
@Export(name="encryptedValue", type=String.class, parameters={})
private Output* @Nullable */ String> encryptedValue;
/**
* @return Encrypted value of the secret using the GitHub public key in Base64 format.
*
*/
public Output> encryptedValue() {
return Codegen.optional(this.encryptedValue);
}
/**
* Name of the environment.
*
*/
@Export(name="environment", type=String.class, parameters={})
private Output environment;
/**
* @return Name of the environment.
*
*/
public Output environment() {
return this.environment;
}
/**
* Plaintext value of the secret to be encrypted.
*
*/
@Export(name="plaintextValue", type=String.class, parameters={})
private Output* @Nullable */ String> plaintextValue;
/**
* @return Plaintext value of the secret to be encrypted.
*
*/
public Output> plaintextValue() {
return Codegen.optional(this.plaintextValue);
}
/**
* Name of the repository.
*
*/
@Export(name="repository", type=String.class, parameters={})
private Output repository;
/**
* @return Name of the repository.
*
*/
public Output repository() {
return this.repository;
}
/**
* Name of the secret.
*
*/
@Export(name="secretName", type=String.class, parameters={})
private Output secretName;
/**
* @return Name of the secret.
*
*/
public Output secretName() {
return this.secretName;
}
/**
* Date of actions_environment_secret update.
*
*/
@Export(name="updatedAt", type=String.class, parameters={})
private Output updatedAt;
/**
* @return Date of actions_environment_secret update.
*
*/
public Output updatedAt() {
return this.updatedAt;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ActionsEnvironmentSecret(String name) {
this(name, ActionsEnvironmentSecretArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ActionsEnvironmentSecret(String name, ActionsEnvironmentSecretArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public ActionsEnvironmentSecret(String name, ActionsEnvironmentSecretArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("github:index/actionsEnvironmentSecret:ActionsEnvironmentSecret", name, args == null ? ActionsEnvironmentSecretArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private ActionsEnvironmentSecret(String name, Output id, @Nullable ActionsEnvironmentSecretState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("github:index/actionsEnvironmentSecret:ActionsEnvironmentSecret", name, state, makeResourceOptions(options, id));
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.additionalSecretOutputs(List.of(
"encryptedValue",
"plaintextValue"
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static ActionsEnvironmentSecret get(String name, Output id, @Nullable ActionsEnvironmentSecretState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ActionsEnvironmentSecret(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy