Orgs

class terrasnek.orgs.TFCOrgs(instance_url, org_name, headers, well_known_paths, verify, log_level)

Orgs API Docs

create(payload)

POST /organizations

Orgs Create API Doc Reference

Create Sample Payload

destroy(org_name)

DELETE /organizations/:organization_name

Orgs Destroy API Doc Reference

entitlements(org_name)

GET /organizations/:organization_name/entitlement-set

Orgs Entitlements API Doc Reference

list(query=None, page=None, page_size=None)

GET /organizations

Orgs List API Doc Reference

list_all(query=None)

This function does not correlate to an endpoint in the TFC API Docs specifically, but rather is a helper function to wrap the list endpoint, which enumerates out every page so users do not have to implement the paging logic every time they just want to list every run trigger for a workspace.

Returns an object with two arrays of objects.

required_entitlements()

Terraform Cloud Entitlements required for endpoint to work.

show(org_name)

GET /organizations/:organization_name

Orgs Show API Doc Reference

show_module_producers(org_name)

GET /organizations/:organization_name/relationships/module-producers

Orgs Show Module Producers API Doc Reference

# NOTE: this endpoint is not available in Terraform Cloud

subscription(org_name)

GET /organizations/:organization_name/subscription

This endpoint is not currently documented in the TFC API docs, but it can be used to pull detailed subscription information for a TFC organization.

terraform_cloud_only()

Return True if this endpoint is only for Terraform Cloud, else False.

terraform_enterprise_only()

Return True if this endpoint is only for Terraform Enterprise, else False.

update(org_name, payload)

PATCH /organizations/:organization_name

Orgs Update API Doc Reference

Update Sample Payload