gitlab.ProjectJobTokenScope
Explore with Pulumi AI
The gitlab.ProjectJobTokenScope
resource allows to manage the CI/CD Job Token scope in a project.
Any projects added to the CI/CD Job Token scope outside of TF will be untouched by the resource.
Conflicts with the use of
gitlab.ProjectJobTokenScopes
when used on the same project. Use one or the other to ensure the desired state.
Upstream API: GitLab REST API docs
Create ProjectJobTokenScope Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectJobTokenScope(name: string, args: ProjectJobTokenScopeArgs, opts?: CustomResourceOptions);
@overload
def ProjectJobTokenScope(resource_name: str,
args: ProjectJobTokenScopeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectJobTokenScope(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
target_project_id: Optional[int] = None)
func NewProjectJobTokenScope(ctx *Context, name string, args ProjectJobTokenScopeArgs, opts ...ResourceOption) (*ProjectJobTokenScope, error)
public ProjectJobTokenScope(string name, ProjectJobTokenScopeArgs args, CustomResourceOptions? opts = null)
public ProjectJobTokenScope(String name, ProjectJobTokenScopeArgs args)
public ProjectJobTokenScope(String name, ProjectJobTokenScopeArgs args, CustomResourceOptions options)
type: gitlab:ProjectJobTokenScope
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 ProjectJobTokenScopeArgs
- 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 ProjectJobTokenScopeArgs
- 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 ProjectJobTokenScopeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectJobTokenScopeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectJobTokenScopeArgs
- 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 projectJobTokenScopeResource = new GitLab.ProjectJobTokenScope("projectJobTokenScopeResource", new()
{
Project = "string",
TargetProjectId = 0,
});
example, err := gitlab.NewProjectJobTokenScope(ctx, "projectJobTokenScopeResource", &gitlab.ProjectJobTokenScopeArgs{
Project: pulumi.String("string"),
TargetProjectId: pulumi.Int(0),
})
var projectJobTokenScopeResource = new ProjectJobTokenScope("projectJobTokenScopeResource", ProjectJobTokenScopeArgs.builder()
.project("string")
.targetProjectId(0)
.build());
project_job_token_scope_resource = gitlab.ProjectJobTokenScope("projectJobTokenScopeResource",
project="string",
target_project_id=0)
const projectJobTokenScopeResource = new gitlab.ProjectJobTokenScope("projectJobTokenScopeResource", {
project: "string",
targetProjectId: 0,
});
type: gitlab:ProjectJobTokenScope
properties:
project: string
targetProjectId: 0
ProjectJobTokenScope 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 ProjectJobTokenScope resource accepts the following input properties:
- Project string
- The ID or full path of the project.
- Target
Project intId - The ID of the project that is in the CI/CD job token inbound allowlist.
- Project string
- The ID or full path of the project.
- Target
Project intId - The ID of the project that is in the CI/CD job token inbound allowlist.
- project String
- The ID or full path of the project.
- target
Project IntegerId - The ID of the project that is in the CI/CD job token inbound allowlist.
- project string
- The ID or full path of the project.
- target
Project numberId - The ID of the project that is in the CI/CD job token inbound allowlist.
- project str
- The ID or full path of the project.
- target_
project_ intid - The ID of the project that is in the CI/CD job token inbound allowlist.
- project String
- The ID or full path of the project.
- target
Project NumberId - The ID of the project that is in the CI/CD job token inbound allowlist.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectJobTokenScope 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 ProjectJobTokenScope Resource
Get an existing ProjectJobTokenScope 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?: ProjectJobTokenScopeState, opts?: CustomResourceOptions): ProjectJobTokenScope
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
target_project_id: Optional[int] = None) -> ProjectJobTokenScope
func GetProjectJobTokenScope(ctx *Context, name string, id IDInput, state *ProjectJobTokenScopeState, opts ...ResourceOption) (*ProjectJobTokenScope, error)
public static ProjectJobTokenScope Get(string name, Input<string> id, ProjectJobTokenScopeState? state, CustomResourceOptions? opts = null)
public static ProjectJobTokenScope get(String name, Output<String> id, ProjectJobTokenScopeState 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.
- Project string
- The ID or full path of the project.
- Target
Project intId - The ID of the project that is in the CI/CD job token inbound allowlist.
- Project string
- The ID or full path of the project.
- Target
Project intId - The ID of the project that is in the CI/CD job token inbound allowlist.
- project String
- The ID or full path of the project.
- target
Project IntegerId - The ID of the project that is in the CI/CD job token inbound allowlist.
- project string
- The ID or full path of the project.
- target
Project numberId - The ID of the project that is in the CI/CD job token inbound allowlist.
- project str
- The ID or full path of the project.
- target_
project_ intid - The ID of the project that is in the CI/CD job token inbound allowlist.
- project String
- The ID or full path of the project.
- target
Project NumberId - The ID of the project that is in the CI/CD job token inbound allowlist.
Import
GitLab project job token scopes can be imported using an id made up of projectId:targetProjectId
, e.g.
$ pulumi import gitlab:index/projectJobTokenScope:ProjectJobTokenScope bar 123:321
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.