Example Usage
S
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const thisServiceAccount = new mongodbatlas.ServiceAccount("this", {
orgId: orgId,
name: "example-service-account",
description: "Example Service Account",
roles: ["ORG_READ_ONLY"],
secretExpiresAfterHours: 2160,
});
const thisServiceAccountSecret = new mongodbatlas.ServiceAccountSecret("this", {
orgId: orgId,
clientId: thisServiceAccount.clientId,
secretExpiresAfterHours: 2160,
});
const _this = pulumi.all([thisServiceAccount.clientId, thisServiceAccountSecret.secretId]).apply(([clientId, secretId]) => mongodbatlas.getServiceAccountSecretOutput({
orgId: orgId,
clientId: clientId,
secretId: secretId,
}));
export const secretId = thisServiceAccountSecret.secretId;
export const secret = thisServiceAccountSecret.secret;
export const secretExpiresAt = _this.apply(_this => _this.expiresAt);
import pulumi
import pulumi_mongodbatlas as mongodbatlas
this_service_account = mongodbatlas.ServiceAccount("this",
org_id=org_id,
name="example-service-account",
description="Example Service Account",
roles=["ORG_READ_ONLY"],
secret_expires_after_hours=2160)
this_service_account_secret = mongodbatlas.ServiceAccountSecret("this",
org_id=org_id,
client_id=this_service_account.client_id,
secret_expires_after_hours=2160)
this = pulumi.Output.all(
client_id=this_service_account.client_id,
secret_id=this_service_account_secret.secret_id
).apply(lambda resolved_outputs: mongodbatlas.get_service_account_secret_output(org_id=org_id,
client_id=resolved_outputs['client_id'],
secret_id=resolved_outputs['secret_id']))
pulumi.export("secretId", this_service_account_secret.secret_id)
pulumi.export("secret", this_service_account_secret.secret)
pulumi.export("secretExpiresAt", this.expires_at)
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
thisServiceAccount, err := mongodbatlas.NewServiceAccount(ctx, "this", &mongodbatlas.ServiceAccountArgs{
OrgId: pulumi.Any(orgId),
Name: pulumi.String("example-service-account"),
Description: pulumi.String("Example Service Account"),
Roles: pulumi.StringArray{
pulumi.String("ORG_READ_ONLY"),
},
SecretExpiresAfterHours: pulumi.Int(2160),
})
if err != nil {
return err
}
thisServiceAccountSecret, err := mongodbatlas.NewServiceAccountSecret(ctx, "this", &mongodbatlas.ServiceAccountSecretArgs{
OrgId: pulumi.Any(orgId),
ClientId: thisServiceAccount.ClientId,
SecretExpiresAfterHours: pulumi.Int(2160),
})
if err != nil {
return err
}
this := pulumi.All(thisServiceAccount.ClientId, thisServiceAccountSecret.SecretId).ApplyT(func(_args []interface{}) (mongodbatlas.GetServiceAccountSecretResult, error) {
clientId := _args[0].(string)
secretId := _args[1].(string)
return mongodbatlas.GetServiceAccountSecretResult(interface{}(mongodbatlas.LookupServiceAccountSecret(ctx, &mongodbatlas.LookupServiceAccountSecretArgs{
OrgId: orgId,
ClientId: clientId,
SecretId: secretId,
}, nil))), nil
}).(mongodbatlas.GetServiceAccountSecretResultOutput)
ctx.Export("secretId", thisServiceAccountSecret.SecretId)
ctx.Export("secret", thisServiceAccountSecret.Secret)
ctx.Export("secretExpiresAt", this.ApplyT(func(this mongodbatlas.GetServiceAccountSecretResult) (*string, error) {
return &this.ExpiresAt, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var thisServiceAccount = new Mongodbatlas.ServiceAccount("this", new()
{
OrgId = orgId,
Name = "example-service-account",
Description = "Example Service Account",
Roles = new[]
{
"ORG_READ_ONLY",
},
SecretExpiresAfterHours = 2160,
});
var thisServiceAccountSecret = new Mongodbatlas.ServiceAccountSecret("this", new()
{
OrgId = orgId,
ClientId = thisServiceAccount.ClientId,
SecretExpiresAfterHours = 2160,
});
var @this = Mongodbatlas.GetServiceAccountSecret.Invoke(new()
{
OrgId = orgId,
ClientId = thisServiceAccount.ClientId,
SecretId = thisServiceAccountSecret.SecretId,
});
return new Dictionary<string, object?>
{
["secretId"] = thisServiceAccountSecret.SecretId,
["secret"] = thisServiceAccountSecret.Secret,
["secretExpiresAt"] = @this.Apply(@this => @this.Apply(getServiceAccountSecretResult => getServiceAccountSecretResult.ExpiresAt)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.ServiceAccount;
import com.pulumi.mongodbatlas.ServiceAccountArgs;
import com.pulumi.mongodbatlas.ServiceAccountSecret;
import com.pulumi.mongodbatlas.ServiceAccountSecretArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetServiceAccountSecretArgs;
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 thisServiceAccount = new ServiceAccount("thisServiceAccount", ServiceAccountArgs.builder()
.orgId(orgId)
.name("example-service-account")
.description("Example Service Account")
.roles("ORG_READ_ONLY")
.secretExpiresAfterHours(2160)
.build());
var thisServiceAccountSecret = new ServiceAccountSecret("thisServiceAccountSecret", ServiceAccountSecretArgs.builder()
.orgId(orgId)
.clientId(thisServiceAccount.clientId())
.secretExpiresAfterHours(2160)
.build());
final var this = Output.tuple(thisServiceAccount.clientId(), thisServiceAccountSecret.secretId()).applyValue(values -> {
var clientId = values.t1;
var secretId = values.t2;
return MongodbatlasFunctions.getServiceAccountSecret(GetServiceAccountSecretArgs.builder()
.orgId(orgId)
.clientId(clientId)
.secretId(secretId)
.build());
});
ctx.export("secretId", thisServiceAccountSecret.secretId());
ctx.export("secret", thisServiceAccountSecret.secret());
ctx.export("secretExpiresAt", this_.applyValue(_this_ -> _this_.expiresAt()));
}
}
resources:
thisServiceAccount:
type: mongodbatlas:ServiceAccount
name: this
properties:
orgId: ${orgId}
name: example-service-account
description: Example Service Account
roles:
- ORG_READ_ONLY
secretExpiresAfterHours: 2160 # 90 days
thisServiceAccountSecret:
type: mongodbatlas:ServiceAccountSecret
name: this
properties:
orgId: ${orgId}
clientId: ${thisServiceAccount.clientId}
secretExpiresAfterHours: 2160 # 90 days
variables:
this:
fn::invoke:
function: mongodbatlas:getServiceAccountSecret
arguments:
orgId: ${orgId}
clientId: ${thisServiceAccount.clientId}
secretId: ${thisServiceAccountSecret.secretId}
outputs:
secretId: ${thisServiceAccountSecret.secretId}
secret: ${thisServiceAccountSecret.secret}
secretExpiresAt: ${this.expiresAt}
Create ServiceAccountSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceAccountSecret(name: string, args: ServiceAccountSecretArgs, opts?: CustomResourceOptions);@overload
def ServiceAccountSecret(resource_name: str,
args: ServiceAccountSecretInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceAccountSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
client_id: Optional[str] = None,
org_id: Optional[str] = None,
secret_expires_after_hours: Optional[int] = None)func NewServiceAccountSecret(ctx *Context, name string, args ServiceAccountSecretArgs, opts ...ResourceOption) (*ServiceAccountSecret, error)public ServiceAccountSecret(string name, ServiceAccountSecretArgs args, CustomResourceOptions? opts = null)
public ServiceAccountSecret(String name, ServiceAccountSecretArgs args)
public ServiceAccountSecret(String name, ServiceAccountSecretArgs args, CustomResourceOptions options)
type: mongodbatlas:ServiceAccountSecret
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 ServiceAccountSecretArgs
- 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 ServiceAccountSecretInitArgs
- 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 ServiceAccountSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceAccountSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceAccountSecretArgs
- 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 serviceAccountSecretResource = new Mongodbatlas.ServiceAccountSecret("serviceAccountSecretResource", new()
{
ClientId = "string",
OrgId = "string",
SecretExpiresAfterHours = 0,
});
example, err := mongodbatlas.NewServiceAccountSecret(ctx, "serviceAccountSecretResource", &mongodbatlas.ServiceAccountSecretArgs{
ClientId: pulumi.String("string"),
OrgId: pulumi.String("string"),
SecretExpiresAfterHours: pulumi.Int(0),
})
var serviceAccountSecretResource = new ServiceAccountSecret("serviceAccountSecretResource", ServiceAccountSecretArgs.builder()
.clientId("string")
.orgId("string")
.secretExpiresAfterHours(0)
.build());
service_account_secret_resource = mongodbatlas.ServiceAccountSecret("serviceAccountSecretResource",
client_id="string",
org_id="string",
secret_expires_after_hours=0)
const serviceAccountSecretResource = new mongodbatlas.ServiceAccountSecret("serviceAccountSecretResource", {
clientId: "string",
orgId: "string",
secretExpiresAfterHours: 0,
});
type: mongodbatlas:ServiceAccountSecret
properties:
clientId: string
orgId: string
secretExpiresAfterHours: 0
ServiceAccountSecret Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServiceAccountSecret resource accepts the following input properties:
- Client
Id string - The Client ID of the Service Account.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Secret
Expires intAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- Client
Id string - The Client ID of the Service Account.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Secret
Expires intAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- client
Id String - The Client ID of the Service Account.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret
Expires IntegerAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- client
Id string - The Client ID of the Service Account.
- org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret
Expires numberAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- client_
id str - The Client ID of the Service Account.
- org_
id str - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret_
expires_ intafter_ hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- client
Id String - The Client ID of the Service Account.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret
Expires NumberAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceAccountSecret resource produces the following output properties:
- Created
At string - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Expires
At string - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Used stringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Masked
Secret stringValue - The masked Service Account secret.
- Secret string
- The secret for the Service Account. It will be returned only the first time after creation.
- Secret
Id string - Unique 24-hexadecimal digit string that identifies the secret.
- Created
At string - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Expires
At string - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Used stringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Masked
Secret stringValue - The masked Service Account secret.
- Secret string
- The secret for the Service Account. It will be returned only the first time after creation.
- Secret
Id string - Unique 24-hexadecimal digit string that identifies the secret.
- created
At String - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires
At String - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Used StringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked
Secret StringValue - The masked Service Account secret.
- secret String
- The secret for the Service Account. It will be returned only the first time after creation.
- secret
Id String - Unique 24-hexadecimal digit string that identifies the secret.
- created
At string - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires
At string - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Used stringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked
Secret stringValue - The masked Service Account secret.
- secret string
- The secret for the Service Account. It will be returned only the first time after creation.
- secret
Id string - Unique 24-hexadecimal digit string that identifies the secret.
- created_
at str - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires_
at str - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
used_ strat - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked_
secret_ strvalue - The masked Service Account secret.
- secret str
- The secret for the Service Account. It will be returned only the first time after creation.
- secret_
id str - Unique 24-hexadecimal digit string that identifies the secret.
- created
At String - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires
At String - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Used StringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked
Secret StringValue - The masked Service Account secret.
- secret String
- The secret for the Service Account. It will be returned only the first time after creation.
- secret
Id String - Unique 24-hexadecimal digit string that identifies the secret.
Look up Existing ServiceAccountSecret Resource
Get an existing ServiceAccountSecret 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?: ServiceAccountSecretState, opts?: CustomResourceOptions): ServiceAccountSecret@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
client_id: Optional[str] = None,
created_at: Optional[str] = None,
expires_at: Optional[str] = None,
last_used_at: Optional[str] = None,
masked_secret_value: Optional[str] = None,
org_id: Optional[str] = None,
secret: Optional[str] = None,
secret_expires_after_hours: Optional[int] = None,
secret_id: Optional[str] = None) -> ServiceAccountSecretfunc GetServiceAccountSecret(ctx *Context, name string, id IDInput, state *ServiceAccountSecretState, opts ...ResourceOption) (*ServiceAccountSecret, error)public static ServiceAccountSecret Get(string name, Input<string> id, ServiceAccountSecretState? state, CustomResourceOptions? opts = null)public static ServiceAccountSecret get(String name, Output<String> id, ServiceAccountSecretState state, CustomResourceOptions options)resources: _: type: mongodbatlas:ServiceAccountSecret get: id: ${id}- 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.
- Client
Id string - The Client ID of the Service Account.
- Created
At string - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Expires
At string - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Last
Used stringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Masked
Secret stringValue - The masked Service Account secret.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Secret string
- The secret for the Service Account. It will be returned only the first time after creation.
- Secret
Expires intAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- Secret
Id string - Unique 24-hexadecimal digit string that identifies the secret.
- Client
Id string - The Client ID of the Service Account.
- Created
At string - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Expires
At string - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Last
Used stringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Masked
Secret stringValue - The masked Service Account secret.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Secret string
- The secret for the Service Account. It will be returned only the first time after creation.
- Secret
Expires intAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- Secret
Id string - Unique 24-hexadecimal digit string that identifies the secret.
- client
Id String - The Client ID of the Service Account.
- created
At String - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires
At String - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- last
Used StringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked
Secret StringValue - The masked Service Account secret.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret String
- The secret for the Service Account. It will be returned only the first time after creation.
- secret
Expires IntegerAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- secret
Id String - Unique 24-hexadecimal digit string that identifies the secret.
- client
Id string - The Client ID of the Service Account.
- created
At string - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires
At string - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- last
Used stringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked
Secret stringValue - The masked Service Account secret.
- org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret string
- The secret for the Service Account. It will be returned only the first time after creation.
- secret
Expires numberAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- secret
Id string - Unique 24-hexadecimal digit string that identifies the secret.
- client_
id str - The Client ID of the Service Account.
- created_
at str - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires_
at str - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- last_
used_ strat - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked_
secret_ strvalue - The masked Service Account secret.
- org_
id str - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret str
- The secret for the Service Account. It will be returned only the first time after creation.
- secret_
expires_ intafter_ hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- secret_
id str - Unique 24-hexadecimal digit string that identifies the secret.
- client
Id String - The Client ID of the Service Account.
- created
At String - The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- expires
At String - The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- last
Used StringAt - The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- masked
Secret StringValue - The masked Service Account secret.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- secret String
- The secret for the Service Account. It will be returned only the first time after creation.
- secret
Expires NumberAfter Hours - The expiration time of the new Service Account secret, provided in hours. The minimum and maximum allowed expiration times are subject to change and are controlled by the organization's settings. This attribute is required when creating the Service Account Secret and you cannot update it later.
- secret
Id String - Unique 24-hexadecimal digit string that identifies the secret.
Import
Import the Service Account Secret resource by using the Organization ID, Client ID, and Secret ID in the format ORG_ID/CLIENT_ID/SECRET_ID, e.g.
$ pulumi import mongodbatlas:index/serviceAccountSecret:ServiceAccountSecret test 6117ac2fe2a3d04ed27a987v/mdb_sa_id_1234567890abcdef12345678/04ed271234abcde2a3da123a
For more information, see Create One Organization Service Account Secret in the MongoDB Atlas API documentation.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.
