diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d18b5d2..4f883bc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. * Support option to archive on delete [[PR #296](https://github.com/buildkite/terraform-provider-buildkite/pull/296)] @mcncl * SUP-1085: Cluster Queue resource implementation [[PR #297](https://github.com/buildkite/terraform-provider-buildkite/pull/297)] @james2791 * SUP-270 Fix branch_configuration updating to empty string [[PR #298](https://github.com/buildkite/terraform-provider-buildkite/pull/298)] @jradtilbrook +* SUP-1084 Add Cluster resource [[PR #301](https://github.com/buildkite/terraform-provider-buildkite/pull/301)] @mcncl ## [v0.19.2](https://github.com/buildkite/terraform-provider-buildkite/compare/v0.19.1...v0.19.2) * Consistent naming for environment variables [[PR #290](https://github.com/buildkite/terraform-provider-buildkite/pull/290)] @mcncl diff --git a/buildkite/generated.go b/buildkite/generated.go index cbaf8693..bb3b2132 100644 --- a/buildkite/generated.go +++ b/buildkite/generated.go @@ -28,6 +28,39 @@ const ( BuildRetentionPeriodsYears2 BuildRetentionPeriods = "YEARS_2" ) +// ClusterFields includes the GraphQL fields of Cluster requested by the fragment ClusterFields. +type ClusterFields struct { + Id string `json:"id"` + // The public UUID for this cluster + Uuid string `json:"uuid"` + // Name of the cluster + Name string `json:"name"` + // Description of the cluster + Description *string `json:"description"` + // Emoji for the cluster using Buildkite emoji syntax + Emoji *string `json:"emoji"` + // Color hex code for the cluster + Color *string `json:"color"` +} + +// GetId returns ClusterFields.Id, and is useful for accessing the field via an interface. +func (v *ClusterFields) GetId() string { return v.Id } + +// GetUuid returns ClusterFields.Uuid, and is useful for accessing the field via an interface. +func (v *ClusterFields) GetUuid() string { return v.Uuid } + +// GetName returns ClusterFields.Name, and is useful for accessing the field via an interface. +func (v *ClusterFields) GetName() string { return v.Name } + +// GetDescription returns ClusterFields.Description, and is useful for accessing the field via an interface. +func (v *ClusterFields) GetDescription() *string { return v.Description } + +// GetEmoji returns ClusterFields.Emoji, and is useful for accessing the field via an interface. +func (v *ClusterFields) GetEmoji() *string { return v.Emoji } + +// GetColor returns ClusterFields.Color, and is useful for accessing the field via an interface. +func (v *ClusterFields) GetColor() *string { return v.Color } + // ClusterQueueValues includes the GraphQL fields of ClusterQueue requested by the fragment ClusterQueueValues. type ClusterQueueValues struct { Id string `json:"id"` @@ -172,6 +205,8 @@ type PipelineUpdateInput struct { // Autogenerated input type of PipelineUpdate ClusterId *string `json:"clusterId"` // Autogenerated input type of PipelineUpdate + PipelineTemplateId string `json:"pipelineTemplateId,omitempty"` + // Autogenerated input type of PipelineUpdate Archived bool `json:"archived,omitempty"` // Autogenerated input type of PipelineUpdate Tags []PipelineTagInput `json:"tags"` @@ -251,6 +286,9 @@ func (v *PipelineUpdateInput) GetBuildRetentionNumber() int { return v.BuildRete // GetClusterId returns PipelineUpdateInput.ClusterId, and is useful for accessing the field via an interface. func (v *PipelineUpdateInput) GetClusterId() *string { return v.ClusterId } +// GetPipelineTemplateId returns PipelineUpdateInput.PipelineTemplateId, and is useful for accessing the field via an interface. +func (v *PipelineUpdateInput) GetPipelineTemplateId() string { return v.PipelineTemplateId } + // GetArchived returns PipelineUpdateInput.Archived, and is useful for accessing the field via an interface. func (v *PipelineUpdateInput) GetArchived() bool { return v.Archived } @@ -310,6 +348,30 @@ func (v *__createAgentTokenInput) GetOrganizationId() string { return v.Organiza // GetDescription returns __createAgentTokenInput.Description, and is useful for accessing the field via an interface. func (v *__createAgentTokenInput) GetDescription() *string { return v.Description } +// __createClusterInput is used internally by genqlient +type __createClusterInput struct { + OrganizationId string `json:"organizationId"` + Name string `json:"name"` + Description *string `json:"description"` + Emoji *string `json:"emoji"` + Color *string `json:"color"` +} + +// GetOrganizationId returns __createClusterInput.OrganizationId, and is useful for accessing the field via an interface. +func (v *__createClusterInput) GetOrganizationId() string { return v.OrganizationId } + +// GetName returns __createClusterInput.Name, and is useful for accessing the field via an interface. +func (v *__createClusterInput) GetName() string { return v.Name } + +// GetDescription returns __createClusterInput.Description, and is useful for accessing the field via an interface. +func (v *__createClusterInput) GetDescription() *string { return v.Description } + +// GetEmoji returns __createClusterInput.Emoji, and is useful for accessing the field via an interface. +func (v *__createClusterInput) GetEmoji() *string { return v.Emoji } + +// GetColor returns __createClusterInput.Color, and is useful for accessing the field via an interface. +func (v *__createClusterInput) GetColor() *string { return v.Color } + // __createClusterQueueInput is used internally by genqlient type __createClusterQueueInput struct { OrganizationId string `json:"organizationId"` @@ -330,6 +392,18 @@ func (v *__createClusterQueueInput) GetKey() string { return v.Key } // GetDescription returns __createClusterQueueInput.Description, and is useful for accessing the field via an interface. func (v *__createClusterQueueInput) GetDescription() *string { return v.Description } +// __deleteClusterInput is used internally by genqlient +type __deleteClusterInput struct { + OrganizationId string `json:"organizationId"` + Id string `json:"id"` +} + +// GetOrganizationId returns __deleteClusterInput.OrganizationId, and is useful for accessing the field via an interface. +func (v *__deleteClusterInput) GetOrganizationId() string { return v.OrganizationId } + +// GetId returns __deleteClusterInput.Id, and is useful for accessing the field via an interface. +func (v *__deleteClusterInput) GetId() string { return v.Id } + // __deleteClusterQueueInput is used internally by genqlient type __deleteClusterQueueInput struct { OrganizationId string `json:"organizationId"` @@ -350,6 +424,18 @@ type __getAgentTokenInput struct { // GetSlug returns __getAgentTokenInput.Slug, and is useful for accessing the field via an interface. func (v *__getAgentTokenInput) GetSlug() string { return v.Slug } +// __getClusterInput is used internally by genqlient +type __getClusterInput struct { + OrgSlug string `json:"orgSlug"` + Id string `json:"id"` +} + +// GetOrgSlug returns __getClusterInput.OrgSlug, and is useful for accessing the field via an interface. +func (v *__getClusterInput) GetOrgSlug() string { return v.OrgSlug } + +// GetId returns __getClusterInput.Id, and is useful for accessing the field via an interface. +func (v *__getClusterInput) GetId() string { return v.Id } + // __getClusterQueuesInput is used internally by genqlient type __getClusterQueuesInput struct { OrgSlug string `json:"orgSlug"` @@ -410,6 +496,34 @@ func (v *__setApiIpAddressesInput) GetOrganizationID() string { return v.Organiz // GetIpAddresses returns __setApiIpAddressesInput.IpAddresses, and is useful for accessing the field via an interface. func (v *__setApiIpAddressesInput) GetIpAddresses() string { return v.IpAddresses } +// __updateClusterInput is used internally by genqlient +type __updateClusterInput struct { + OrganizationId string `json:"organizationId"` + Id string `json:"id"` + Name string `json:"name"` + Description *string `json:"description"` + Emoji *string `json:"emoji"` + Color *string `json:"color"` +} + +// GetOrganizationId returns __updateClusterInput.OrganizationId, and is useful for accessing the field via an interface. +func (v *__updateClusterInput) GetOrganizationId() string { return v.OrganizationId } + +// GetId returns __updateClusterInput.Id, and is useful for accessing the field via an interface. +func (v *__updateClusterInput) GetId() string { return v.Id } + +// GetName returns __updateClusterInput.Name, and is useful for accessing the field via an interface. +func (v *__updateClusterInput) GetName() string { return v.Name } + +// GetDescription returns __updateClusterInput.Description, and is useful for accessing the field via an interface. +func (v *__updateClusterInput) GetDescription() *string { return v.Description } + +// GetEmoji returns __updateClusterInput.Emoji, and is useful for accessing the field via an interface. +func (v *__updateClusterInput) GetEmoji() *string { return v.Emoji } + +// GetColor returns __updateClusterInput.Color, and is useful for accessing the field via an interface. +func (v *__updateClusterInput) GetColor() *string { return v.Color } + // __updateClusterQueueInput is used internally by genqlient type __updateClusterQueueInput struct { OrganizationId string `json:"organizationId"` @@ -527,6 +641,120 @@ func (v *createAgentTokenResponse) GetAgentTokenCreate() createAgentTokenAgentTo return v.AgentTokenCreate } +// createClusterClusterCreateClusterCreatePayload includes the requested fields of the GraphQL type ClusterCreatePayload. +// The GraphQL type's documentation follows. +// +// Autogenerated return type of ClusterCreate. +type createClusterClusterCreateClusterCreatePayload struct { + // A unique identifier for the client performing the mutation. + ClientMutationId string `json:"clientMutationId"` + Cluster createClusterClusterCreateClusterCreatePayloadCluster `json:"cluster"` +} + +// GetClientMutationId returns createClusterClusterCreateClusterCreatePayload.ClientMutationId, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayload) GetClientMutationId() string { + return v.ClientMutationId +} + +// GetCluster returns createClusterClusterCreateClusterCreatePayload.Cluster, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayload) GetCluster() createClusterClusterCreateClusterCreatePayloadCluster { + return v.Cluster +} + +// createClusterClusterCreateClusterCreatePayloadCluster includes the requested fields of the GraphQL type Cluster. +type createClusterClusterCreateClusterCreatePayloadCluster struct { + ClusterFields `json:"-"` +} + +// GetId returns createClusterClusterCreateClusterCreatePayloadCluster.Id, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayloadCluster) GetId() string { + return v.ClusterFields.Id +} + +// GetUuid returns createClusterClusterCreateClusterCreatePayloadCluster.Uuid, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayloadCluster) GetUuid() string { + return v.ClusterFields.Uuid +} + +// GetName returns createClusterClusterCreateClusterCreatePayloadCluster.Name, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayloadCluster) GetName() string { + return v.ClusterFields.Name +} + +// GetDescription returns createClusterClusterCreateClusterCreatePayloadCluster.Description, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayloadCluster) GetDescription() *string { + return v.ClusterFields.Description +} + +// GetEmoji returns createClusterClusterCreateClusterCreatePayloadCluster.Emoji, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayloadCluster) GetEmoji() *string { + return v.ClusterFields.Emoji +} + +// GetColor returns createClusterClusterCreateClusterCreatePayloadCluster.Color, and is useful for accessing the field via an interface. +func (v *createClusterClusterCreateClusterCreatePayloadCluster) GetColor() *string { + return v.ClusterFields.Color +} + +func (v *createClusterClusterCreateClusterCreatePayloadCluster) UnmarshalJSON(b []byte) error { + + if string(b) == "null" { + return nil + } + + var firstPass struct { + *createClusterClusterCreateClusterCreatePayloadCluster + graphql.NoUnmarshalJSON + } + firstPass.createClusterClusterCreateClusterCreatePayloadCluster = v + + err := json.Unmarshal(b, &firstPass) + if err != nil { + return err + } + + err = json.Unmarshal( + b, &v.ClusterFields) + if err != nil { + return err + } + return nil +} + +type __premarshalcreateClusterClusterCreateClusterCreatePayloadCluster struct { + Id string `json:"id"` + + Uuid string `json:"uuid"` + + Name string `json:"name"` + + Description *string `json:"description"` + + Emoji *string `json:"emoji"` + + Color *string `json:"color"` +} + +func (v *createClusterClusterCreateClusterCreatePayloadCluster) MarshalJSON() ([]byte, error) { + premarshaled, err := v.__premarshalJSON() + if err != nil { + return nil, err + } + return json.Marshal(premarshaled) +} + +func (v *createClusterClusterCreateClusterCreatePayloadCluster) __premarshalJSON() (*__premarshalcreateClusterClusterCreateClusterCreatePayloadCluster, error) { + var retval __premarshalcreateClusterClusterCreateClusterCreatePayloadCluster + + retval.Id = v.ClusterFields.Id + retval.Uuid = v.ClusterFields.Uuid + retval.Name = v.ClusterFields.Name + retval.Description = v.ClusterFields.Description + retval.Emoji = v.ClusterFields.Emoji + retval.Color = v.ClusterFields.Color + return &retval, nil +} + // createClusterQueueClusterQueueCreateClusterQueueCreatePayload includes the requested fields of the GraphQL type ClusterQueueCreatePayload. // The GraphQL type's documentation follows. // @@ -637,6 +865,31 @@ func (v *createClusterQueueResponse) GetClusterQueueCreate() createClusterQueueC return v.ClusterQueueCreate } +// createClusterResponse is returned by createCluster on success. +type createClusterResponse struct { + // Create a cluster. + ClusterCreate createClusterClusterCreateClusterCreatePayload `json:"clusterCreate"` +} + +// GetClusterCreate returns createClusterResponse.ClusterCreate, and is useful for accessing the field via an interface. +func (v *createClusterResponse) GetClusterCreate() createClusterClusterCreateClusterCreatePayload { + return v.ClusterCreate +} + +// deleteClusterClusterDeleteClusterDeletePayload includes the requested fields of the GraphQL type ClusterDeletePayload. +// The GraphQL type's documentation follows. +// +// Autogenerated return type of ClusterDelete. +type deleteClusterClusterDeleteClusterDeletePayload struct { + // A unique identifier for the client performing the mutation. + ClientMutationId string `json:"clientMutationId"` +} + +// GetClientMutationId returns deleteClusterClusterDeleteClusterDeletePayload.ClientMutationId, and is useful for accessing the field via an interface. +func (v *deleteClusterClusterDeleteClusterDeletePayload) GetClientMutationId() string { + return v.ClientMutationId +} + // deleteClusterQueueClusterQueueDeleteClusterQueueDeletePayload includes the requested fields of the GraphQL type ClusterQueueDeletePayload. // The GraphQL type's documentation follows. // @@ -662,6 +915,17 @@ func (v *deleteClusterQueueResponse) GetClusterQueueDelete() deleteClusterQueueC return v.ClusterQueueDelete } +// deleteClusterResponse is returned by deleteCluster on success. +type deleteClusterResponse struct { + // Delete a cluster. + ClusterDelete deleteClusterClusterDeleteClusterDeletePayload `json:"clusterDelete"` +} + +// GetClusterDelete returns deleteClusterResponse.ClusterDelete, and is useful for accessing the field via an interface. +func (v *deleteClusterResponse) GetClusterDelete() deleteClusterClusterDeleteClusterDeletePayload { + return v.ClusterDelete +} + // getAgentTokenAgentToken includes the requested fields of the GraphQL type AgentToken. // The GraphQL type's documentation follows. // @@ -692,6 +956,100 @@ type getAgentTokenResponse struct { // GetAgentToken returns getAgentTokenResponse.AgentToken, and is useful for accessing the field via an interface. func (v *getAgentTokenResponse) GetAgentToken() getAgentTokenAgentToken { return v.AgentToken } +// getClusterOrganization includes the requested fields of the GraphQL type Organization. +// The GraphQL type's documentation follows. +// +// An organization +type getClusterOrganization struct { + // Return cluster in the Organization by UUID + Cluster getClusterOrganizationCluster `json:"cluster"` +} + +// GetCluster returns getClusterOrganization.Cluster, and is useful for accessing the field via an interface. +func (v *getClusterOrganization) GetCluster() getClusterOrganizationCluster { return v.Cluster } + +// getClusterOrganizationCluster includes the requested fields of the GraphQL type Cluster. +type getClusterOrganizationCluster struct { + ClusterFields `json:"-"` +} + +// GetId returns getClusterOrganizationCluster.Id, and is useful for accessing the field via an interface. +func (v *getClusterOrganizationCluster) GetId() string { return v.ClusterFields.Id } + +// GetUuid returns getClusterOrganizationCluster.Uuid, and is useful for accessing the field via an interface. +func (v *getClusterOrganizationCluster) GetUuid() string { return v.ClusterFields.Uuid } + +// GetName returns getClusterOrganizationCluster.Name, and is useful for accessing the field via an interface. +func (v *getClusterOrganizationCluster) GetName() string { return v.ClusterFields.Name } + +// GetDescription returns getClusterOrganizationCluster.Description, and is useful for accessing the field via an interface. +func (v *getClusterOrganizationCluster) GetDescription() *string { return v.ClusterFields.Description } + +// GetEmoji returns getClusterOrganizationCluster.Emoji, and is useful for accessing the field via an interface. +func (v *getClusterOrganizationCluster) GetEmoji() *string { return v.ClusterFields.Emoji } + +// GetColor returns getClusterOrganizationCluster.Color, and is useful for accessing the field via an interface. +func (v *getClusterOrganizationCluster) GetColor() *string { return v.ClusterFields.Color } + +func (v *getClusterOrganizationCluster) UnmarshalJSON(b []byte) error { + + if string(b) == "null" { + return nil + } + + var firstPass struct { + *getClusterOrganizationCluster + graphql.NoUnmarshalJSON + } + firstPass.getClusterOrganizationCluster = v + + err := json.Unmarshal(b, &firstPass) + if err != nil { + return err + } + + err = json.Unmarshal( + b, &v.ClusterFields) + if err != nil { + return err + } + return nil +} + +type __premarshalgetClusterOrganizationCluster struct { + Id string `json:"id"` + + Uuid string `json:"uuid"` + + Name string `json:"name"` + + Description *string `json:"description"` + + Emoji *string `json:"emoji"` + + Color *string `json:"color"` +} + +func (v *getClusterOrganizationCluster) MarshalJSON() ([]byte, error) { + premarshaled, err := v.__premarshalJSON() + if err != nil { + return nil, err + } + return json.Marshal(premarshaled) +} + +func (v *getClusterOrganizationCluster) __premarshalJSON() (*__premarshalgetClusterOrganizationCluster, error) { + var retval __premarshalgetClusterOrganizationCluster + + retval.Id = v.ClusterFields.Id + retval.Uuid = v.ClusterFields.Uuid + retval.Name = v.ClusterFields.Name + retval.Description = v.ClusterFields.Description + retval.Emoji = v.ClusterFields.Emoji + retval.Color = v.ClusterFields.Color + return &retval, nil +} + // getClusterQueuesOrganization includes the requested fields of the GraphQL type Organization. // The GraphQL type's documentation follows. // @@ -833,6 +1191,15 @@ func (v *getClusterQueuesResponse) GetOrganization() getClusterQueuesOrganizatio return v.Organization } +// getClusterResponse is returned by getCluster on success. +type getClusterResponse struct { + // Find an organization + Organization getClusterOrganization `json:"organization"` +} + +// GetOrganization returns getClusterResponse.Organization, and is useful for accessing the field via an interface. +func (v *getClusterResponse) GetOrganization() getClusterOrganization { return v.Organization } + // getOrganizationOrganization includes the requested fields of the GraphQL type Organization. // The GraphQL type's documentation follows. // @@ -1078,6 +1445,120 @@ func (v *setApiIpAddressesResponse) GetOrganizationApiIpAllowlistUpdate() setApi return v.OrganizationApiIpAllowlistUpdate } +// updateClusterClusterUpdateClusterUpdatePayload includes the requested fields of the GraphQL type ClusterUpdatePayload. +// The GraphQL type's documentation follows. +// +// Autogenerated return type of ClusterUpdate. +type updateClusterClusterUpdateClusterUpdatePayload struct { + // A unique identifier for the client performing the mutation. + ClientMutationId string `json:"clientMutationId"` + Cluster updateClusterClusterUpdateClusterUpdatePayloadCluster `json:"cluster"` +} + +// GetClientMutationId returns updateClusterClusterUpdateClusterUpdatePayload.ClientMutationId, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayload) GetClientMutationId() string { + return v.ClientMutationId +} + +// GetCluster returns updateClusterClusterUpdateClusterUpdatePayload.Cluster, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayload) GetCluster() updateClusterClusterUpdateClusterUpdatePayloadCluster { + return v.Cluster +} + +// updateClusterClusterUpdateClusterUpdatePayloadCluster includes the requested fields of the GraphQL type Cluster. +type updateClusterClusterUpdateClusterUpdatePayloadCluster struct { + ClusterFields `json:"-"` +} + +// GetId returns updateClusterClusterUpdateClusterUpdatePayloadCluster.Id, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) GetId() string { + return v.ClusterFields.Id +} + +// GetUuid returns updateClusterClusterUpdateClusterUpdatePayloadCluster.Uuid, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) GetUuid() string { + return v.ClusterFields.Uuid +} + +// GetName returns updateClusterClusterUpdateClusterUpdatePayloadCluster.Name, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) GetName() string { + return v.ClusterFields.Name +} + +// GetDescription returns updateClusterClusterUpdateClusterUpdatePayloadCluster.Description, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) GetDescription() *string { + return v.ClusterFields.Description +} + +// GetEmoji returns updateClusterClusterUpdateClusterUpdatePayloadCluster.Emoji, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) GetEmoji() *string { + return v.ClusterFields.Emoji +} + +// GetColor returns updateClusterClusterUpdateClusterUpdatePayloadCluster.Color, and is useful for accessing the field via an interface. +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) GetColor() *string { + return v.ClusterFields.Color +} + +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) UnmarshalJSON(b []byte) error { + + if string(b) == "null" { + return nil + } + + var firstPass struct { + *updateClusterClusterUpdateClusterUpdatePayloadCluster + graphql.NoUnmarshalJSON + } + firstPass.updateClusterClusterUpdateClusterUpdatePayloadCluster = v + + err := json.Unmarshal(b, &firstPass) + if err != nil { + return err + } + + err = json.Unmarshal( + b, &v.ClusterFields) + if err != nil { + return err + } + return nil +} + +type __premarshalupdateClusterClusterUpdateClusterUpdatePayloadCluster struct { + Id string `json:"id"` + + Uuid string `json:"uuid"` + + Name string `json:"name"` + + Description *string `json:"description"` + + Emoji *string `json:"emoji"` + + Color *string `json:"color"` +} + +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) MarshalJSON() ([]byte, error) { + premarshaled, err := v.__premarshalJSON() + if err != nil { + return nil, err + } + return json.Marshal(premarshaled) +} + +func (v *updateClusterClusterUpdateClusterUpdatePayloadCluster) __premarshalJSON() (*__premarshalupdateClusterClusterUpdateClusterUpdatePayloadCluster, error) { + var retval __premarshalupdateClusterClusterUpdateClusterUpdatePayloadCluster + + retval.Id = v.ClusterFields.Id + retval.Uuid = v.ClusterFields.Uuid + retval.Name = v.ClusterFields.Name + retval.Description = v.ClusterFields.Description + retval.Emoji = v.ClusterFields.Emoji + retval.Color = v.ClusterFields.Color + return &retval, nil +} + // updateClusterQueueClusterQueueUpdateClusterQueueUpdatePayload includes the requested fields of the GraphQL type ClusterQueueUpdatePayload. // The GraphQL type's documentation follows. // @@ -1188,6 +1669,17 @@ func (v *updateClusterQueueResponse) GetClusterQueueUpdate() updateClusterQueueC return v.ClusterQueueUpdate } +// updateClusterResponse is returned by updateCluster on success. +type updateClusterResponse struct { + // Updates a cluster. + ClusterUpdate updateClusterClusterUpdateClusterUpdatePayload `json:"clusterUpdate"` +} + +// GetClusterUpdate returns updateClusterResponse.ClusterUpdate, and is useful for accessing the field via an interface. +func (v *updateClusterResponse) GetClusterUpdate() updateClusterClusterUpdateClusterUpdatePayload { + return v.ClusterUpdate +} + // updatePipelinePipelineUpdatePipelineUpdatePayload includes the requested fields of the GraphQL type PipelineUpdatePayload. // The GraphQL type's documentation follows. // @@ -1591,6 +2083,59 @@ func createAgentToken( return &data, err } +// The query or mutation executed by createCluster. +const createCluster_Operation = ` +mutation createCluster ($organizationId: ID!, $name: String!, $description: String, $emoji: String, $color: String) { + clusterCreate(input: {organizationId:$organizationId,name:$name,description:$description,emoji:$emoji,color:$color}) { + clientMutationId + cluster { + ... ClusterFields + } + } +} +fragment ClusterFields on Cluster { + id + uuid + name + description + emoji + color +} +` + +func createCluster( + client graphql.Client, + organizationId string, + name string, + description *string, + emoji *string, + color *string, +) (*createClusterResponse, error) { + req := &graphql.Request{ + OpName: "createCluster", + Query: createCluster_Operation, + Variables: &__createClusterInput{ + OrganizationId: organizationId, + Name: name, + Description: description, + Emoji: emoji, + Color: color, + }, + } + var err error + + var data createClusterResponse + resp := &graphql.Response{Data: &data} + + err = client.MakeRequest( + nil, + req, + resp, + ) + + return &data, err +} + // The query or mutation executed by createClusterQueue. const createClusterQueue_Operation = ` mutation createClusterQueue ($organizationId: ID!, $clusterId: ID!, $key: String!, $description: String) { @@ -1643,6 +2188,42 @@ func createClusterQueue( return &data, err } +// The query or mutation executed by deleteCluster. +const deleteCluster_Operation = ` +mutation deleteCluster ($organizationId: ID!, $id: ID!) { + clusterDelete(input: {organizationId:$organizationId,id:$id}) { + clientMutationId + } +} +` + +func deleteCluster( + client graphql.Client, + organizationId string, + id string, +) (*deleteClusterResponse, error) { + req := &graphql.Request{ + OpName: "deleteCluster", + Query: deleteCluster_Operation, + Variables: &__deleteClusterInput{ + OrganizationId: organizationId, + Id: id, + }, + } + var err error + + var data deleteClusterResponse + resp := &graphql.Response{Data: &data} + + err = client.MakeRequest( + nil, + req, + resp, + ) + + return &data, err +} + // The query or mutation executed by deleteClusterQueue. const deleteClusterQueue_Operation = ` mutation deleteClusterQueue ($organizationId: ID!, $id: ID!) { @@ -1715,6 +2296,52 @@ func getAgentToken( return &data, err } +// The query or mutation executed by getCluster. +const getCluster_Operation = ` +query getCluster ($orgSlug: ID!, $id: ID!) { + organization(slug: $orgSlug) { + cluster(id: $id) { + ... ClusterFields + } + } +} +fragment ClusterFields on Cluster { + id + uuid + name + description + emoji + color +} +` + +func getCluster( + client graphql.Client, + orgSlug string, + id string, +) (*getClusterResponse, error) { + req := &graphql.Request{ + OpName: "getCluster", + Query: getCluster_Operation, + Variables: &__getClusterInput{ + OrgSlug: orgSlug, + Id: id, + }, + } + var err error + + var data getClusterResponse + resp := &graphql.Response{Data: &data} + + err = client.MakeRequest( + nil, + req, + resp, + ) + + return &data, err +} + // The query or mutation executed by getClusterQueues. const getClusterQueues_Operation = ` query getClusterQueues ($orgSlug: ID!, $id: ID!) { @@ -1967,6 +2594,61 @@ func setApiIpAddresses( return &data, err } +// The query or mutation executed by updateCluster. +const updateCluster_Operation = ` +mutation updateCluster ($organizationId: ID!, $id: ID!, $name: String, $description: String, $emoji: String, $color: String) { + clusterUpdate(input: {organizationId:$organizationId,id:$id,name:$name,description:$description,emoji:$emoji,color:$color}) { + clientMutationId + cluster { + ... ClusterFields + } + } +} +fragment ClusterFields on Cluster { + id + uuid + name + description + emoji + color +} +` + +func updateCluster( + client graphql.Client, + organizationId string, + id string, + name string, + description *string, + emoji *string, + color *string, +) (*updateClusterResponse, error) { + req := &graphql.Request{ + OpName: "updateCluster", + Query: updateCluster_Operation, + Variables: &__updateClusterInput{ + OrganizationId: organizationId, + Id: id, + Name: name, + Description: description, + Emoji: emoji, + Color: color, + }, + } + var err error + + var data updateClusterResponse + resp := &graphql.Response{Data: &data} + + err = client.MakeRequest( + nil, + req, + resp, + ) + + return &data, err +} + // The query or mutation executed by updateClusterQueue. const updateClusterQueue_Operation = ` mutation updateClusterQueue ($organizationId: ID!, $id: ID!, $description: String) { diff --git a/buildkite/graphql/cluster.graphql b/buildkite/graphql/cluster.graphql new file mode 100644 index 00000000..a75fe01b --- /dev/null +++ b/buildkite/graphql/cluster.graphql @@ -0,0 +1,73 @@ +fragment ClusterFields on Cluster { + id + uuid + name + # @genqlient(pointer: true) + description + # @genqlient(pointer: true) + emoji + # @genqlient(pointer: true) + color +} + +query getCluster($orgSlug: ID!, $id: ID!) { + organization(slug: $orgSlug) { + cluster(id: $id) { + ...ClusterFields + } + } +} + +mutation createCluster( + $organizationId: ID! + $name: String! + # @genqlient(pointer: true) + $description: String + # @genqlient(pointer: true) + $emoji: String + # @genqlient(pointer: true) + $color: String +) { + clusterCreate( + input: { organizationId: $organizationId, name: $name, description: $description, emoji: $emoji, color: $color } + ) { + clientMutationId + cluster { + ...ClusterFields + } + } +} + +mutation updateCluster( + $organizationId: ID! + $id: ID! + $name: String + # @genqlient(pointer: true) + $description: String + # @genqlient(pointer: true) + $emoji: String + # @genqlient(pointer: true) + $color: String +) { + clusterUpdate( + input: { + organizationId: $organizationId + id: $id + name: $name + description: $description + emoji: $emoji + color: $color + } + ) { + clientMutationId + cluster { + ...ClusterFields + } + } +} + +mutation deleteCluster($organizationId: ID!, $id: ID!) { + clusterDelete(input: { organizationId: $organizationId, id: $id }) { + clientMutationId + } +} diff --git a/buildkite/graphql/pipeline.graphql b/buildkite/graphql/pipeline.graphql index 1cef5fb9..b858c31d 100644 --- a/buildkite/graphql/pipeline.graphql +++ b/buildkite/graphql/pipeline.graphql @@ -18,6 +18,7 @@ query getPipeline($slug: ID!) { # @genqlient(for: "PipelineUpdateInput.buildRetentionEnabled", omitempty: true) # @genqlient(for: "PipelineUpdateInput.buildRetentionPeriod", omitempty: true) # @genqlient(for: "PipelineUpdateInput.buildRetentionNumber", omitempty: true) +# @genqlient(for: "PipelineUpdateInput.pipelineTemplateId", omitempty: true) # @genqlient(for: "PipelineUpdateInput.archived", omitempty: true) # @genqlient(for: "PipelineUpdateInput.nextBuildNumber", omitempty: true) mutation updatePipeline( diff --git a/buildkite/provider.go b/buildkite/provider.go index c3cc2273..2f2bbc28 100644 --- a/buildkite/provider.go +++ b/buildkite/provider.go @@ -92,6 +92,7 @@ func (tf *terraformProvider) Metadata(ctx context.Context, req provider.Metadata func (*terraformProvider) Resources(context.Context) []func() resource.Resource { return []func() resource.Resource{ NewAgentTokenResource, + newClusterResource, NewClusterQueueResource, } } diff --git a/buildkite/resource_cluster.go b/buildkite/resource_cluster.go new file mode 100644 index 00000000..85c37ab6 --- /dev/null +++ b/buildkite/resource_cluster.go @@ -0,0 +1,199 @@ +package buildkite + +import ( + "context" + "fmt" + + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + resource_schema "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type clusterResource struct { + client *Client +} + +type clusterResourceModel struct { + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + Description types.String `tfsdk:"description"` + Emoji types.String `tfsdk:"emoji"` + Color types.String `tfsdk:"color"` + UUID types.String `tfsdk:"uuid"` +} + +func newClusterResource() resource.Resource { + return &clusterResource{} +} + +func (c *clusterResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_cluster" +} + +func (c *clusterResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + c.client = req.ProviderData.(*Client) +} + +func (c *clusterResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = resource_schema.Schema{ + MarkdownDescription: "A Cluster is a group of Agents that can be used to run your builds. " + + "Clusters are useful for grouping Agents by their capabilities, such as operating system, hardware, or location. ", + Attributes: map[string]resource_schema.Attribute{ + "id": resource_schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "uuid": resource_schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "name": resource_schema.StringAttribute{ + MarkdownDescription: "The name of the Cluster. Can only contain numbers and letters, no spaces or special characters.", + Required: true, + }, + "description": resource_schema.StringAttribute{ + Optional: true, + MarkdownDescription: "A description for the Cluster. Consider something short but clear on the Cluster's function.", + }, + "emoji": resource_schema.StringAttribute{ + Optional: true, + MarkdownDescription: "An emoji to represent the Cluster. Accepts the format :buildkite:.", + }, + "color": resource_schema.StringAttribute{ + Optional: true, + MarkdownDescription: "A color representation of the Cluster. Accepts hex codes, eg #BADA55.", + }, + }, + } +} + +func (c *clusterResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var state *clusterResourceModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &state)...) + + if resp.Diagnostics.HasError() { + return + } + + r, err := createCluster( + c.client.genqlient, + c.client.organizationId, + state.Name.ValueString(), + state.Description.ValueStringPointer(), + state.Emoji.ValueStringPointer(), + state.Color.ValueStringPointer(), + ) + + if err != nil { + resp.Diagnostics.AddError( + "Unable to create Cluster", + fmt.Sprintf("Unable to create Cluster: %s", err.Error()), + ) + return + } + + state.ID = types.StringValue(r.ClusterCreate.Cluster.Id) + state.UUID = types.StringValue(r.ClusterCreate.Cluster.Uuid) + + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (c *clusterResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var state clusterResourceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + + if resp.Diagnostics.HasError() { + return + } + + r, err := getCluster(c.client.genqlient, c.client.organization, state.UUID.ValueString()) + + if err != nil { + resp.Diagnostics.AddError( + "Unable to read Cluster", + fmt.Sprintf("Unable to read Cluster: %s", err.Error()), + ) + return + } + + updateClusterResourceState(r.Organization.Cluster, &state) + resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) +} + +func (c *clusterResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var state, plan clusterResourceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + + if resp.Diagnostics.HasError() { + return + } + + id := state.ID.ValueString() + + _, err := updateCluster( + c.client.genqlient, + c.client.organizationId, + id, + plan.Name.ValueString(), + plan.Description.ValueStringPointer(), + plan.Emoji.ValueStringPointer(), + plan.Color.ValueStringPointer(), + ) + + if err != nil { + resp.Diagnostics.AddError( + "Unable to update Cluster", + fmt.Sprintf("Unable to update Cluster: %s", err.Error()), + ) + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...) +} + +func (c *clusterResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var state clusterResourceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + + if resp.Diagnostics.HasError() { + return + } + + _, err := deleteCluster(c.client.genqlient, c.client.organizationId, state.ID.ValueString()) + + if err != nil { + resp.Diagnostics.AddError( + "Unable to delete Cluster", + fmt.Sprintf("Unable to delete Cluster: %s", err.Error()), + ) + return + } +} + +func (c *clusterResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root("uuid"), req, resp) +} + +func updateClusterResourceState(cl getClusterOrganizationCluster, c *clusterResourceModel) { + c.ID = types.StringValue(cl.Id) + c.UUID = types.StringValue(cl.Uuid) + c.Name = types.StringValue(cl.Name) + c.Description = types.StringPointerValue(cl.Description) + c.Emoji = types.StringPointerValue(cl.Emoji) + c.Color = types.StringPointerValue(cl.Color) +} diff --git a/buildkite/resource_cluster_test.go b/buildkite/resource_cluster_test.go new file mode 100644 index 00000000..147e5218 --- /dev/null +++ b/buildkite/resource_cluster_test.go @@ -0,0 +1,155 @@ +package buildkite + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" +) + +func testAccClusterBasic(name string) string { + config := ` + resource "buildkite_cluster" "foo" { + name = "%s_test_cluster" + } + ` + return fmt.Sprintf(config, name) +} + +func TestAccCluster_AddRemove(t *testing.T) { + t.Parallel() + var c clusterResourceModel + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProtoV6ProviderFactories: protoV6ProviderFactories(), + CheckDestroy: testAccCheckClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccClusterBasic("foo"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckClusterExists("buildkite_cluster.foo", &c), + testAccCheckClusterRemoteValues(&c, "foo_test_cluster"), + resource.TestCheckResourceAttr("buildkite_cluster.foo", "name", "foo_test_cluster"), + resource.TestCheckResourceAttrSet("buildkite_cluster.foo", "id"), + resource.TestCheckResourceAttrSet("buildkite_cluster.foo", "uuid"), + ), + }, + { + RefreshState: true, + PlanOnly: true, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("buildkite_cluster.foo", "name"), + ), + }, + }, + }) +} + +func TestAccCluster_Update(t *testing.T) { + t.Parallel() + var c = new(clusterResourceModel) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProtoV6ProviderFactories: protoV6ProviderFactories(), + CheckDestroy: testAccCheckClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccClusterBasic("bar"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckClusterExists("buildkite_cluster.foo", c), + testAccCheckClusterRemoteValues(c, "bar_test_cluster"), + resource.TestCheckResourceAttr("buildkite_cluster.foo", "name", "bar_test_cluster"), + resource.TestCheckResourceAttrSet("buildkite_cluster.foo", "id"), + resource.TestCheckResourceAttrSet("buildkite_cluster.foo", "uuid"), + ), + }, + { + Config: testAccClusterBasic("baz"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckClusterExists("buildkite_cluster.foo", c), + testAccCheckClusterRemoteValues(c, "baz_test_cluster"), + resource.TestCheckResourceAttr("buildkite_cluster.foo", "name", "baz_test_cluster"), + ), + }, + }, + }) +} + +func TestAccCluster_Import(t *testing.T) { + t.Parallel() + var c = new(clusterResourceModel) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProtoV6ProviderFactories: protoV6ProviderFactories(), + CheckDestroy: testAccCheckClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccClusterBasic("imported"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckClusterExists("buildkite_cluster.foo", c), + resource.TestCheckResourceAttr("buildkite_cluster.foo", "name", "imported_test_cluster"), + ), + }, + { + ResourceName: "buildkite_cluster.foo", + ImportStateIdFunc: func(s *terraform.State) (string, error) { + return c.UUID.ValueString(), nil + }, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckClusterExists(n string, c *clusterResourceModel) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("cluster not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("no cluster ID is set") + } + + r, err := getCluster(genqlientGraphql, getenv("BUILDKITE_ORGANIZATION_SLUG"), rs.Primary.Attributes["uuid"]) + + if err != nil { + return err + } + + updateClusterResourceState(r.Organization.Cluster, c) + return nil + } +} + +func testAccCheckClusterRemoteValues(c *clusterResourceModel, name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + + if c.Name.ValueString() != name { + return fmt.Errorf("unexpected name: %s, wanted: %s", c.Name, name) + } + return nil + } +} + +func testAccCheckClusterDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "buildkite_cluster" { + continue + } + + _, err := getCluster(genqlientGraphql, getenv("BUILDKITE_ORGANIZATION_SLUG"), rs.Primary.Attributes["uuid"]) + + if err == nil { + return fmt.Errorf("Cluster still exists") + } + return nil + } + return nil +} diff --git a/docs/resources/cluster.md b/docs/resources/cluster.md new file mode 100644 index 00000000..7e66588e --- /dev/null +++ b/docs/resources/cluster.md @@ -0,0 +1,54 @@ +# Resource: cluster + +This resource allows you to create, manage and import Clusters. + +Buildkite documentation: https://buildkite.com/docs/clusters/overview + +## Example Usage + +```hcl +provider "buildkite" {} + +resource "buildkite_cluster" "linux" { + name = "linux_builds" +} +``` + +## Argument Reference + +* `name` - (Required) This is the name of the cluster. +* `description` - (Optional) This is a description for the cluster, this may describe the usage for it, the region, or something else which would help identify the Cluster's purpose. +* `emoji` - (Optional) An emoji to use with the Cluster, this can either be set using `:buildkite:` notation, or with the emoji itself, such as 😎. +* `color` - (Optional) A color to associate with the Cluster. Perhaps a team related color, or one related to an environment. This is set using hex value, such as `#BADA55`. + +## Attribute Reference + +* `id` - The GraphQL ID that is created with the Cluster. +* `uuid` - The UUID created with the Cluster. + +The `uuid` is used when *getting* a Cluster. The `id` is used when *modifying* a Cluster. + +## import +Clusters can be imported using their `UUID`, this is the `-` separated identifier in the Clusters's `Settings` page, e.g. + +```shell +terraform import buildkite_cluster.foo 878a539f-2c77-435e-9675-936263eb9c08 +``` + +A helpful GraphQL query to get the UUID of the target cluster can be found below, or [this pre-saved query](https://buildkite.com/user/graphql/console/49ad82a8-fb96-43a3-bfae-73f6e3c9a297) can be used as a template. You'll need to substitute in your organization's `slug`. + +```graphql +query getClusters { + organization(slug: "ORGANIZATION"){ + clusters(first: 5, order:NAME) { + edges{ + node { + uuid + name + } + } + } + } +} +``` + diff --git a/go.mod b/go.mod index 08526187..762c83f9 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,9 @@ go 1.20 require ( github.com/Khan/genqlient v0.6.0 + github.com/hashicorp/terraform-plugin-framework v1.3.1 + github.com/hashicorp/terraform-plugin-go v0.15.0 + github.com/hashicorp/terraform-plugin-mux v0.10.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f ) @@ -34,10 +37,7 @@ require ( github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.18.1 // indirect github.com/hashicorp/terraform-json v0.16.0 // indirect - github.com/hashicorp/terraform-plugin-framework v1.3.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.15.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-plugin-mux v0.10.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.0 // indirect github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect @@ -53,9 +53,7 @@ require ( github.com/vektah/gqlparser v1.3.1 // indirect github.com/vektah/gqlparser/v2 v2.5.1 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.13.1 // indirect golang.org/x/crypto v0.7.0 // indirect diff --git a/go.sum b/go.sum index 5cc8e9b8..6959220a 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,3 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Khan/genqlient v0.6.0 h1:Bwb1170ekuNIVIwTJEqvO8y7RxBxXu639VJOkKSrwAk= github.com/Khan/genqlient v0.6.0/go.mod h1:rvChwWVTqXhiapdhLDV4bp9tz/Xvtewwkon4DpWWCRM= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -25,7 +22,6 @@ github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxj github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= @@ -33,8 +29,6 @@ github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdK github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -44,8 +38,6 @@ github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -62,26 +54,13 @@ github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6 github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= @@ -95,26 +74,20 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= -github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= -github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-plugin v1.4.9 h1:ESiK220/qE0aGxWdzKIvRH69iLiuN/PjoLTm69RoWtU= github.com/hashicorp/go-plugin v1.4.9/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.5.0 h1:D9bl4KayIYKEeJ4vUDe9L5huqxZXczKaykSRcmQ0xY0= @@ -127,26 +100,18 @@ github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980= github.com/hashicorp/terraform-json v0.16.0 h1:UKkeWRWb23do5LNAFlh/K3N0ymn1qTOO8c+85Albo3s= github.com/hashicorp/terraform-json v0.16.0/go.mod h1:v0Ufk9jJnk6tcIZvScHvetlKfiNTC+WS21mnXIlc0B0= -github.com/hashicorp/terraform-plugin-framework v1.3.0 h1:WtP1CIaWAfbzME17xoUXvJcyh5Ewu9attdhbfWNnYLs= -github.com/hashicorp/terraform-plugin-framework v1.3.0/go.mod h1:A1WD3Ry7FhrThViUTbkx4ZDsMq9oaAv4U9oTI8bBzCU= -github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= -github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= +github.com/hashicorp/terraform-plugin-framework v1.3.1 h1:uhd+SuyuDq3oh5VB2Toq5IPyaC5XFAUf9vUFKBmNNOk= +github.com/hashicorp/terraform-plugin-framework v1.3.1/go.mod h1:A1WD3Ry7FhrThViUTbkx4ZDsMq9oaAv4U9oTI8bBzCU= github.com/hashicorp/terraform-plugin-go v0.15.0 h1:1BJNSUFs09DS8h/XNyJNJaeusQuWc/T9V99ylU9Zwp0= github.com/hashicorp/terraform-plugin-go v0.15.0/go.mod h1:tk9E3/Zx4RlF/9FdGAhwxHExqIHHldqiQGt20G6g+nQ= -github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= -github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.10.0 h1:VejY1BffxGy2iYOaa8DDHavY4k9jbvAE8F3lhruspKY= github.com/hashicorp/terraform-plugin-mux v0.10.0/go.mod h1:9sdnpmY20xIsl4ItsfODZYE+MgpSy/osXpSf+RwaZCY= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= -github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= -github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= github.com/hashicorp/terraform-registry-address v0.2.0 h1:92LUg03NhfgZv44zpNTLBGIbiyTokQCDcdH5BhVHT3s= github.com/hashicorp/terraform-registry-address v0.2.0/go.mod h1:478wuzJPzdmqT6OGbB/iH82EDcI8VFM4yujknh/1nIs= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= github.com/hashicorp/terraform-svchost v0.0.1 h1:Zj6fR5wnpOHnJUmLyWozjMeDaVuE+cstMPj41/eKmSQ= github.com/hashicorp/terraform-svchost v0.0.1/go.mod h1:ut8JaH0vumgdCfJaihdcZULqkAwHdQNwNH7taIDdsZM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= @@ -170,7 +135,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -204,7 +168,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= @@ -233,11 +197,9 @@ github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRF github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= @@ -246,9 +208,9 @@ github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6e github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc= github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -261,28 +223,15 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -290,11 +239,7 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -302,7 +247,6 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -345,11 +289,7 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= @@ -361,38 +301,14 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200711021454-869866162049 h1:YFTFpQhgvrLrmxtiIncJxFXeCyq84ixuKWVCaCAi9Oc= -google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -416,5 +332,3 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/gotestsum v1.10.0 h1:lVO4uQJoxdsJb7jgmr1fg8QW7zGQ/tuqvsq5fHKyoHQ= gotest.tools/gotestsum v1.10.0/go.mod h1:6JHCiN6TEjA7Kaz23q1bH0e2Dc3YJjDUZ0DmctFZf+w= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/schema.graphql b/schema.graphql index d97df833..13b67211 100644 --- a/schema.graphql +++ b/schema.graphql @@ -474,6 +474,9 @@ enum AuditEventType { PIPELINE_SCHEDULE_CREATED PIPELINE_SCHEDULE_DELETED PIPELINE_SCHEDULE_UPDATED + PIPELINE_TEMPLATE_CREATED + PIPELINE_TEMPLATE_DELETED + PIPELINE_TEMPLATE_UPDATED PIPELINE_UPDATED PIPELINE_VISIBILITY_CHANGED PIPELINE_WEBHOOK_URL_ROTATED @@ -542,37 +545,38 @@ type AuditSubject { } """Kinds of subjects which can have audit events performed on them""" -union AuditSubjectNode =APIAccessToken | AgentToken | AuthorizationBitbucket | AuthorizationGitHub | AuthorizationGitHubEnterprise | Cluster | ClusterPermission | ClusterQueue | ClusterToken | Email | NotificationServiceSlack | NotificationServiceWebhook | Organization | OrganizationInvitation | OrganizationMember | Pipeline | PipelineSchedule | SCMPipelineSettings | SCMRepositoryHost | SCMService | SSOProviderGitHubApp | SSOProviderGoogleGSuite | SSOProviderSAML | Subscription | Suite | TOTP | Team | TeamMember | TeamPipeline | TeamSuite | User +union AuditSubjectNode =APIAccessToken | AgentToken | AuthorizationBitbucket | AuthorizationGitHub | AuthorizationGitHubEnterprise | Cluster | ClusterPermission | ClusterQueue | ClusterToken | Email | NotificationServiceSlack | NotificationServiceWebhook | Organization | OrganizationInvitation | OrganizationMember | Pipeline | PipelineSchedule | PipelineTemplate | SCMPipelineSettings | SCMRepositoryHost | SCMService | SSOProviderGitHubApp | SSOProviderGoogleGSuite | SSOProviderSAML | Subscription | Suite | TOTP | Team | TeamMember | TeamPipeline | TeamSuite | User """All the possible types of subjects in an Audit Event""" enum AuditSubjectType { - USER_EMAIL - USER - CLUSTER + AUTHORIZATION + SUBSCRIPTION AGENT_TOKEN API_ACCESS_TOKEN CLUSTER_QUEUE - AUTHORIZATION CLUSTER_TOKEN - ORGANIZATION - CLUSTER_PERMISSION NOTIFICATION_SERVICE - PIPELINE_SCHEDULE + SSO_PROVIDER + ORGANIZATION ORGANIZATION_INVITATION - TEAM_MEMBER + PIPELINE_SCHEDULE + ORGANIZATION_MEMBER TEAM - TEAM_SUITE + PIPELINE_TEMPLATE TEAM_PIPELINE - SCM_PIPELINE_SETTINGS + TEAM_MEMBER SCM_SERVICE - SUITE_MONITOR + TEAM_SUITE SCM_REPOSITORY_HOST - PIPELINE + SCM_PIPELINE_SETTINGS SUITE - SUBSCRIPTION + SUITE_MONITOR + PIPELINE + USER_EMAIL USER_TOTP - SSO_PROVIDER - ORGANIZATION_MEMBER + USER + CLUSTER_PERMISSION + CLUSTER } """Context for an audit event created during a web request""" @@ -2284,6 +2288,11 @@ type Mutation { """Parameters for OrganizationMemberUpdate""" input: OrganizationMemberUpdateInput! ): OrganizationMemberUpdatePayload +"""Specify the maximum timeframe to revoke organization access from inactive API tokens.""" + organizationRevokeInactiveTokensAfterUpdate( +"""Parameters for OrganizationRevokeInactiveTokensAfterUpdateMutation""" + input: OrganizationRevokeInactiveTokensAfterUpdateMutationInput! + ): OrganizationRevokeInactiveTokensAfterUpdateMutationPayload """Archive a pipeline.""" pipelineArchive( """Parameters for PipelineArchive""" @@ -2718,6 +2727,8 @@ type Organization implements Node{ ): PipelineConnection """Whether this organization is visible to everyone, including people outside it""" public: Boolean! +"""API tokens with access to this organization will be automatically revoked after this many seconds of inactivity. A `null` value indicates never revoke inactive tokens.""" + revokeInactiveTokensAfter: RevokeInactiveTokenPeriod """The slug used to represent the organization in URLs""" slug: String! """The single sign-on configuration of this organization""" @@ -2765,7 +2776,7 @@ type Organization implements Node{ """Order the teams""" order: TeamOrder ): TeamConnection -"""Returns the resource usage data for this organization. Please note that this feature is not yet available to all organizations""" +"""Returns the resource usage data for this organization.""" usage( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -3282,6 +3293,23 @@ type OrganizationPermissions { teamView: Permission } +"""Autogenerated input type of OrganizationRevokeInactiveTokensAfterUpdateMutation""" +input OrganizationRevokeInactiveTokensAfterUpdateMutationInput { +"""Autogenerated input type of OrganizationRevokeInactiveTokensAfterUpdateMutation""" + clientMutationId: String +"""Autogenerated input type of OrganizationRevokeInactiveTokensAfterUpdateMutation""" + organizationId: ID! +"""Autogenerated input type of OrganizationRevokeInactiveTokensAfterUpdateMutation""" + revokeInactiveTokensAfter: RevokeInactiveTokenPeriod! +} + +"""Autogenerated return type of OrganizationRevokeInactiveTokensAfterUpdateMutation.""" +type OrganizationRevokeInactiveTokensAfterUpdateMutationPayload { +"""A unique identifier for the client performing the mutation.""" + clientMutationId: String + organization: Organization +} + """Single sign-on settings for an organization""" type OrganizationSSO { """Whether this account is configured for single sign-on""" @@ -3407,6 +3435,7 @@ type Pipeline implements Node{ nextBuildNumber: Int! organization: Organization! permissions: PipelinePermissions! + pipelineTemplate: PipelineTemplate """Whether this pipeline is visible to everyone, including people outside this organization""" public: Boolean! """The repository for this pipeline""" @@ -3499,7 +3528,7 @@ input PipelineCreateInput { """Autogenerated input type of PipelineCreate""" repository: PipelineRepositoryInput! """Autogenerated input type of PipelineCreate""" - steps: PipelineStepsInput! + steps: PipelineStepsInput """Autogenerated input type of PipelineCreate""" skipIntermediateBuilds: Boolean """Autogenerated input type of PipelineCreate""" @@ -3528,6 +3557,8 @@ input PipelineCreateInput { nextBuildNumber: Int """Autogenerated input type of PipelineCreate""" clusterId: ID +"""Autogenerated input type of PipelineCreate""" + pipelineTemplateId: ID """Autogenerated input type of PipelineCreate""" tags: [PipelineTagInput!] """Autogenerated input type of PipelineCreate""" @@ -3542,6 +3573,7 @@ type PipelineCreatePayload { organization: Organization! pipeline: Pipeline! pipelineEdge: PipelineEdge! + pipelineTemplate: PipelineTemplate } """Autogenerated input type of PipelineCreateWebhook""" @@ -3838,6 +3870,27 @@ input PipelineTeamAssignmentInput { accessLevel: PipelineAccessLevels } +"""A template defining a fixed step configuration for a pipeline""" +type PipelineTemplate implements Node{ +"""A YAML representation of the step configuration""" + configuration: YAML! +"""The time when the template was created""" + createdAt: DateTime! +"""The user who created the template""" + createdBy: User! +"""The short description of the template""" + description: String + id: ID! +"""The name of the template""" + name: String! +"""The last time the template was changed""" + updatedAt: DateTime! +"""The user who last updated the template""" + updatedBy: User! +"""The UUID for the template""" + uuid: ID! +} + """Autogenerated input type of PipelineUnarchive""" input PipelineUnarchiveInput { """Autogenerated input type of PipelineUnarchive""" @@ -3899,6 +3952,8 @@ input PipelineUpdateInput { buildRetentionNumber: Int """Autogenerated input type of PipelineUpdate""" clusterId: ID +"""Autogenerated input type of PipelineUpdate""" + pipelineTemplateId: ID """Autogenerated input type of PipelineUpdate""" archived: Boolean """Autogenerated input type of PipelineUpdate""" @@ -4171,6 +4226,22 @@ enum ResourceUsageType { TEST_EXECUTIONS } +"""API tokens with access to this organization will be automatically revoked after this many days of inactivity.""" +enum RevokeInactiveTokenPeriod { +"""Revoke organization access from API tokens after 30 days of inactivity""" + DAYS_30 +"""Revoke organization access from API tokens after 60 days of inactivity""" + DAYS_60 +"""Revoke organization access from API tokens after 90 days of inactivity""" + DAYS_90 +"""Revoke organization access from API tokens after 180 days of inactivity""" + DAYS_180 +"""Revoke organization access from API tokens after 365 days of inactivity""" + DAYS_365 +"""Never revoke organization access from inactive API tokens""" + NEVER +} + type SCMPipelineSettings { id: ID! } diff --git a/tf-proj/main.tf b/tf-proj/main.tf index 9ad31bb1..310a8f02 100644 --- a/tf-proj/main.tf +++ b/tf-proj/main.tf @@ -2,33 +2,17 @@ terraform { required_providers { buildkite = { source = "buildkite/buildkite" - version = "0.12.1" + version = "0.19.2" } } } provider "buildkite" { + organization = "testkite" } -resource "buildkite_pipeline" "test_new" { - name = "Testing Timeouts" - repository = "https://github.com/buildkite/terraform-provider-buildkite.git" - - steps = "" - default_timeout_in_minutes = 15 - maximum_timeout_in_minutes = 60 -} - -resource "buildkite_pipeline_schedule" "test_scheduled" { - pipeline_id = buildkite_pipeline.test_new.id - label = "Test Scheduled" - cronline = "0 0 * * *" - branch = "master" - commit = "HEAD" - message = "Test Scheduled Builds in Terraform" -} - -output "badge_url" { - value = buildkite_pipeline.test_new.badge_url +resource "buildkite_cluster" "test_cluster" { + name = "cluster-test" + description = "test cluster" }