buildkite.Organization.Organization
Explore with Pulumi AI
This resource allows you to manage the settings for an organization.
The user of your API token must be an organization administrator to manage organization settings.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as buildkite from "@pulumiverse/buildkite";
// allow api access only from 1.1.1.1 and enforce 2fa for all members
const settings = new buildkite.organization.Organization("settings", {
allowedApiIpAddresses: ["1.1.1.1/32"],
enforce2fa: true,
});
import pulumi
import pulumiverse_buildkite as buildkite
# allow api access only from 1.1.1.1 and enforce 2fa for all members
settings = buildkite.organization.Organization("settings",
allowed_api_ip_addresses=["1.1.1.1/32"],
enforce2fa=True)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/Organization"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// allow api access only from 1.1.1.1 and enforce 2fa for all members
_, err := Organization.NewOrganization(ctx, "settings", &Organization.OrganizationArgs{
AllowedApiIpAddresses: pulumi.StringArray{
pulumi.String("1.1.1.1/32"),
},
Enforce2fa: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Buildkite = Pulumiverse.Buildkite;
return await Deployment.RunAsync(() =>
{
// allow api access only from 1.1.1.1 and enforce 2fa for all members
var settings = new Buildkite.Organization.Organization("settings", new()
{
AllowedApiIpAddresses = new[]
{
"1.1.1.1/32",
},
Enforce2fa = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.buildkite.Organization.Organization;
import com.pulumi.buildkite.Organization.OrganizationArgs;
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 settings = new Organization("settings", OrganizationArgs.builder()
.allowedApiIpAddresses("1.1.1.1/32")
.enforce2fa(true)
.build());
}
}
resources:
# allow api access only from 1.1.1.1 and enforce 2fa for all members
settings:
type: buildkite:Organization:Organization
properties:
allowedApiIpAddresses:
- 1.1.1.1/32
enforce2fa: true
Create Organization Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Organization(name: string, args?: OrganizationArgs, opts?: CustomResourceOptions);
@overload
def Organization(resource_name: str,
args: Optional[OrganizationArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Organization(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_api_ip_addresses: Optional[Sequence[str]] = None,
enforce2fa: Optional[bool] = None)
func NewOrganization(ctx *Context, name string, args *OrganizationArgs, opts ...ResourceOption) (*Organization, error)
public Organization(string name, OrganizationArgs? args = null, CustomResourceOptions? opts = null)
public Organization(String name, OrganizationArgs args)
public Organization(String name, OrganizationArgs args, CustomResourceOptions options)
type: buildkite:Organization:Organization
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 OrganizationArgs
- 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 OrganizationArgs
- 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 OrganizationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrganizationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrganizationArgs
- 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 organizationResource = new Buildkite.Organization.Organization("organizationResource", new()
{
AllowedApiIpAddresses = new[]
{
"string",
},
Enforce2fa = false,
});
example, err := Organization.NewOrganization(ctx, "organizationResource", &Organization.OrganizationArgs{
AllowedApiIpAddresses: pulumi.StringArray{
pulumi.String("string"),
},
Enforce2fa: pulumi.Bool(false),
})
var organizationResource = new Organization("organizationResource", OrganizationArgs.builder()
.allowedApiIpAddresses("string")
.enforce2fa(false)
.build());
organization_resource = buildkite.organization.Organization("organizationResource",
allowed_api_ip_addresses=["string"],
enforce2fa=False)
const organizationResource = new buildkite.organization.Organization("organizationResource", {
allowedApiIpAddresses: ["string"],
enforce2fa: false,
});
type: buildkite:Organization:Organization
properties:
allowedApiIpAddresses:
- string
enforce2fa: false
Organization 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 Organization resource accepts the following input properties:
- Allowed
Api List<string>Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- Enforce2fa bool
- Sets whether the organization requires two-factor authentication for all members.
- Allowed
Api []stringIp Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- Enforce2fa bool
- Sets whether the organization requires two-factor authentication for all members.
- allowed
Api List<String>Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa Boolean
- Sets whether the organization requires two-factor authentication for all members.
- allowed
Api string[]Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa boolean
- Sets whether the organization requires two-factor authentication for all members.
- allowed_
api_ Sequence[str]ip_ addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa bool
- Sets whether the organization requires two-factor authentication for all members.
- allowed
Api List<String>Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa Boolean
- Sets whether the organization requires two-factor authentication for all members.
Outputs
All input properties are implicitly available as output properties. Additionally, the Organization resource produces the following output properties:
Look up Existing Organization Resource
Get an existing Organization 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?: OrganizationState, opts?: CustomResourceOptions): Organization
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_api_ip_addresses: Optional[Sequence[str]] = None,
enforce2fa: Optional[bool] = None,
uuid: Optional[str] = None) -> Organization
func GetOrganization(ctx *Context, name string, id IDInput, state *OrganizationState, opts ...ResourceOption) (*Organization, error)
public static Organization Get(string name, Input<string> id, OrganizationState? state, CustomResourceOptions? opts = null)
public static Organization get(String name, Output<String> id, OrganizationState state, CustomResourceOptions options)
resources: _: type: buildkite:Organization:Organization 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.
- Allowed
Api List<string>Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- Enforce2fa bool
- Sets whether the organization requires two-factor authentication for all members.
- Uuid string
- The UUID of the organization.
- Allowed
Api []stringIp Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- Enforce2fa bool
- Sets whether the organization requires two-factor authentication for all members.
- Uuid string
- The UUID of the organization.
- allowed
Api List<String>Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa Boolean
- Sets whether the organization requires two-factor authentication for all members.
- uuid String
- The UUID of the organization.
- allowed
Api string[]Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa boolean
- Sets whether the organization requires two-factor authentication for all members.
- uuid string
- The UUID of the organization.
- allowed_
api_ Sequence[str]ip_ addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa bool
- Sets whether the organization requires two-factor authentication for all members.
- uuid str
- The UUID of the organization.
- allowed
Api List<String>Ip Addresses - A list of IP addresses in CIDR format that are allowed to access the Buildkite API.If not set, all IP addresses are allowed (the same as setting 0.0.0.0/0).
- enforce2fa Boolean
- Sets whether the organization requires two-factor authentication for all members.
- uuid String
- The UUID of the organization.
Import
import the organization settings via the organization slug
$ pulumi import buildkite:Organization/organization:Organization settings <organization slug>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- buildkite pulumiverse/pulumi-buildkite
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
buildkite
Terraform Provider.