cloudflare.ZeroTrustAccessServiceToken
Explore with Pulumi AI
Access Service Tokens are used for service-to-service communication when an application is behind Cloudflare Access.
Create ZeroTrustAccessServiceToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZeroTrustAccessServiceToken(name: string, args: ZeroTrustAccessServiceTokenArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustAccessServiceToken(resource_name: str,
args: ZeroTrustAccessServiceTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZeroTrustAccessServiceToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
account_id: Optional[str] = None,
duration: Optional[str] = None,
min_days_for_renewal: Optional[int] = None,
zone_id: Optional[str] = None)
func NewZeroTrustAccessServiceToken(ctx *Context, name string, args ZeroTrustAccessServiceTokenArgs, opts ...ResourceOption) (*ZeroTrustAccessServiceToken, error)
public ZeroTrustAccessServiceToken(string name, ZeroTrustAccessServiceTokenArgs args, CustomResourceOptions? opts = null)
public ZeroTrustAccessServiceToken(String name, ZeroTrustAccessServiceTokenArgs args)
public ZeroTrustAccessServiceToken(String name, ZeroTrustAccessServiceTokenArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustAccessServiceToken
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 ZeroTrustAccessServiceTokenArgs
- 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 ZeroTrustAccessServiceTokenArgs
- 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 ZeroTrustAccessServiceTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustAccessServiceTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZeroTrustAccessServiceTokenArgs
- 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 zeroTrustAccessServiceTokenResource = new Cloudflare.ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource", new()
{
Name = "string",
AccountId = "string",
Duration = "string",
MinDaysForRenewal = 0,
ZoneId = "string",
});
example, err := cloudflare.NewZeroTrustAccessServiceToken(ctx, "zeroTrustAccessServiceTokenResource", &cloudflare.ZeroTrustAccessServiceTokenArgs{
Name: pulumi.String("string"),
AccountId: pulumi.String("string"),
Duration: pulumi.String("string"),
MinDaysForRenewal: pulumi.Int(0),
ZoneId: pulumi.String("string"),
})
var zeroTrustAccessServiceTokenResource = new ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource", ZeroTrustAccessServiceTokenArgs.builder()
.name("string")
.accountId("string")
.duration("string")
.minDaysForRenewal(0)
.zoneId("string")
.build());
zero_trust_access_service_token_resource = cloudflare.ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource",
name="string",
account_id="string",
duration="string",
min_days_for_renewal=0,
zone_id="string")
const zeroTrustAccessServiceTokenResource = new cloudflare.ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource", {
name: "string",
accountId: "string",
duration: "string",
minDaysForRenewal: 0,
zoneId: "string",
});
type: cloudflare:ZeroTrustAccessServiceToken
properties:
accountId: string
duration: string
minDaysForRenewal: 0
name: string
zoneId: string
ZeroTrustAccessServiceToken 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 ZeroTrustAccessServiceToken resource accepts the following input properties:
- Name string
- Friendly name of the token's intent.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Duration string
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - Min
Days intFor Renewal - Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- Name string
- Friendly name of the token's intent.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Duration string
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - Min
Days intFor Renewal - Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- name String
- Friendly name of the token's intent.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - duration String
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - min
Days IntegerFor Renewal - zone
Id String - The zone identifier to target for the resource. Conflicts with
account_id
.
- name string
- Friendly name of the token's intent.
- account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - duration string
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - min
Days numberFor Renewal - zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- name str
- Friendly name of the token's intent.
- account_
id str - The account identifier to target for the resource. Conflicts with
zone_id
. - duration str
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - min_
days_ intfor_ renewal - zone_
id str - The zone identifier to target for the resource. Conflicts with
account_id
.
- name String
- Friendly name of the token's intent.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - duration String
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - min
Days NumberFor Renewal - zone
Id String - The zone identifier to target for the resource. Conflicts with
account_id
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZeroTrustAccessServiceToken resource produces the following output properties:
- Client
Id string - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- Client
Secret string - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- Expires
At string - Date when the token expires.
- Id string
- The provider-assigned unique ID for this managed resource.
- Client
Id string - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- Client
Secret string - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- Expires
At string - Date when the token expires.
- Id string
- The provider-assigned unique ID for this managed resource.
- client
Id String - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client
Secret String - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- expires
At String - Date when the token expires.
- id String
- The provider-assigned unique ID for this managed resource.
- client
Id string - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client
Secret string - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- expires
At string - Date when the token expires.
- id string
- The provider-assigned unique ID for this managed resource.
- client_
id str - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client_
secret str - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- expires_
at str - Date when the token expires.
- id str
- The provider-assigned unique ID for this managed resource.
- client
Id String - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client
Secret String - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- expires
At String - Date when the token expires.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ZeroTrustAccessServiceToken Resource
Get an existing ZeroTrustAccessServiceToken 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?: ZeroTrustAccessServiceTokenState, opts?: CustomResourceOptions): ZeroTrustAccessServiceToken
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
duration: Optional[str] = None,
expires_at: Optional[str] = None,
min_days_for_renewal: Optional[int] = None,
name: Optional[str] = None,
zone_id: Optional[str] = None) -> ZeroTrustAccessServiceToken
func GetZeroTrustAccessServiceToken(ctx *Context, name string, id IDInput, state *ZeroTrustAccessServiceTokenState, opts ...ResourceOption) (*ZeroTrustAccessServiceToken, error)
public static ZeroTrustAccessServiceToken Get(string name, Input<string> id, ZeroTrustAccessServiceTokenState? state, CustomResourceOptions? opts = null)
public static ZeroTrustAccessServiceToken get(String name, Output<String> id, ZeroTrustAccessServiceTokenState 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.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Client
Id string - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- Client
Secret string - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- Duration string
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - Expires
At string - Date when the token expires.
- Min
Days intFor Renewal - Name string
- Friendly name of the token's intent.
- Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Client
Id string - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- Client
Secret string - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- Duration string
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - Expires
At string - Date when the token expires.
- Min
Days intFor Renewal - Name string
- Friendly name of the token's intent.
- Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - client
Id String - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client
Secret String - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- duration String
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - expires
At String - Date when the token expires.
- min
Days IntegerFor Renewal - name String
- Friendly name of the token's intent.
- zone
Id String - The zone identifier to target for the resource. Conflicts with
account_id
.
- account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - client
Id string - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client
Secret string - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- duration string
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - expires
At string - Date when the token expires.
- min
Days numberFor Renewal - name string
- Friendly name of the token's intent.
- zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- account_
id str - The account identifier to target for the resource. Conflicts with
zone_id
. - client_
id str - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client_
secret str - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- duration str
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - expires_
at str - Date when the token expires.
- min_
days_ intfor_ renewal - name str
- Friendly name of the token's intent.
- zone_
id str - The zone identifier to target for the resource. Conflicts with
account_id
.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - client
Id String - Client ID associated with the Service Token. Modifying this attribute will force creation of a new resource.
- client
Secret String - A secret for interacting with Access protocols. Modifying this attribute will force creation of a new resource.
- duration String
- Length of time the service token is valid for. Available values:
8760h
,17520h
,43800h
,87600h
,forever
. - expires
At String - Date when the token expires.
- min
Days NumberFor Renewal - name String
- Friendly name of the token's intent.
- zone
Id String - The zone identifier to target for the resource. Conflicts with
account_id
.
Import
If you are importing an Access Service Token you will not have the
client_secret available in the state for use. The client_secret is only
available once, at creation. In most cases, it is better to just create a new
resource should you need to reference it in other resources.
$ pulumi import cloudflare:index/zeroTrustAccessServiceToken:ZeroTrustAccessServiceToken example <account_id>/<service_token_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.