Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta endpoints in GA provider #8541

Closed
przsab opened this issue Feb 24, 2021 · 3 comments
Closed

Beta endpoints in GA provider #8541

przsab opened this issue Feb 24, 2021 · 3 comments

Comments

@przsab
Copy link

przsab commented Feb 24, 2021

Terraform module uses beta endpoints even for GCP features that are released in Google Compute Engine. These references should only exist in terraform-provider-google-beta and not here.

https://github.com/hashicorp/terraform-provider-google/search?q=computeBeta

google/compute_instance_helpers.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/compute_instance_helpers.go:func expandAliasIpRanges(ranges []interface{}) []*computeBeta.AliasIpRange {
google/compute_instance_helpers.go:	ipRanges := make([]*computeBeta.AliasIpRange, 0, len(ranges))
google/compute_instance_helpers.go:		ipRanges = append(ipRanges, &computeBeta.AliasIpRange{
google/compute_instance_helpers.go:func flattenAliasIpRange(ranges []*computeBeta.AliasIpRange) []map[string]interface{} {
google/compute_instance_helpers.go:func expandScheduling(v interface{}) (*computeBeta.Scheduling, error) {
google/compute_instance_helpers.go:		return &computeBeta.Scheduling{
google/compute_instance_helpers.go:		return &computeBeta.Scheduling{
google/compute_instance_helpers.go:	scheduling := &computeBeta.Scheduling{
google/compute_instance_helpers.go:		scheduling.NodeAffinities = make([]*computeBeta.SchedulingNodeAffinity, len(ls))
google/compute_instance_helpers.go:			transformed := &computeBeta.SchedulingNodeAffinity{
google/compute_instance_helpers.go:func flattenScheduling(resp *computeBeta.Scheduling) []map[string]interface{} {
google/compute_instance_helpers.go:func flattenAccessConfigs(accessConfigs []*computeBeta.AccessConfig) ([]map[string]interface{}, string) {
google/compute_instance_helpers.go:func flattenNetworkInterfaces(d *schema.ResourceData, config *Config, networkInterfaces []*computeBeta.NetworkInterface) ([]map[string]interface{}, string, string, string, error) {
google/compute_instance_helpers.go:func expandAccessConfigs(configs []interface{}) []*computeBeta.AccessConfig {
google/compute_instance_helpers.go:	acs := make([]*computeBeta.AccessConfig, len(configs))
google/compute_instance_helpers.go:		acs[i] = &computeBeta.AccessConfig{}
google/compute_instance_helpers.go:func expandNetworkInterfaces(d TerraformResourceData, config *Config) ([]*computeBeta.NetworkInterface, error) {
google/compute_instance_helpers.go:	ifaces := make([]*computeBeta.NetworkInterface, len(configs))
google/compute_instance_helpers.go:		ifaces[i] = &computeBeta.NetworkInterface{
google/compute_instance_helpers.go:func flattenServiceAccounts(serviceAccounts []*computeBeta.ServiceAccount) []map[string]interface{} {
google/compute_instance_helpers.go:func expandServiceAccounts(configs []interface{}) []*computeBeta.ServiceAccount {
google/compute_instance_helpers.go:	accounts := make([]*computeBeta.ServiceAccount, len(configs))
google/compute_instance_helpers.go:		accounts[i] = &computeBeta.ServiceAccount{
google/compute_instance_helpers.go:func flattenGuestAccelerators(accelerators []*computeBeta.AcceleratorConfig) []map[string]interface{} {
google/compute_instance_helpers.go:func resourceInstanceTags(d TerraformResourceData) *computeBeta.Tags {
google/compute_instance_helpers.go:	var tags *computeBeta.Tags
google/compute_instance_helpers.go:		tags = new(computeBeta.Tags)
google/compute_instance_helpers.go:func expandShieldedVmConfigs(d TerraformResourceData) *computeBeta.ShieldedInstanceConfig {
google/compute_instance_helpers.go:	return &computeBeta.ShieldedInstanceConfig{
google/compute_instance_helpers.go:func expandConfidentialInstanceConfig(d TerraformResourceData) *computeBeta.ConfidentialInstanceConfig {
google/compute_instance_helpers.go:	return &computeBeta.ConfidentialInstanceConfig{
google/compute_instance_helpers.go:func flattenConfidentialInstanceConfig(ConfidentialInstanceConfig *computeBeta.ConfidentialInstanceConfig) []map[string]bool {
google/compute_instance_helpers.go:func flattenShieldedVmConfig(shieldedVmConfig *computeBeta.ShieldedInstanceConfig) []map[string]bool {
google/compute_instance_helpers.go:func expandDisplayDevice(d TerraformResourceData) *computeBeta.DisplayDevice {
google/compute_instance_helpers.go:	return &computeBeta.DisplayDevice{
google/compute_instance_helpers.go:func flattenEnableDisplay(displayDevice *computeBeta.DisplayDevice) interface{} {
google/compute_instance_network_interface_helpers.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/compute_instance_network_interface_helpers.go:func computeInstanceDeleteAccessConfigs(d *schema.ResourceData, config *Config, instNetworkInterface *computeBeta.NetworkInterface, project, zone, userAgent, instanceName string) error {
google/compute_instance_network_interface_helpers.go:func computeInstanceAddAccessConfigs(d *schema.ResourceData, config *Config, instNetworkInterface *computeBeta.NetworkInterface, accessConfigs []*computeBeta.AccessConfig, project, zone, userAgent, instanceName string) error {
google/compute_instance_network_interface_helpers.go:func computeInstanceCreateUpdateWhileStoppedCall(d *schema.ResourceData, config *Config, networkInterfacePatchObj *computeBeta.NetworkInterface, accessConfigs []*computeBeta.AccessConfig, accessConfigsHaveChanged bool, index int, project, zone, userAgent, instanceName string) func(inst *computeBeta.Instance) error {
google/compute_instance_network_interface_helpers.go:	return func(instance *computeBeta.Instance) error {
google/config.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/config.go:func (c *Config) NewComputeBetaClient(userAgent string) *computeBeta.Service {
google/config.go:	computeBetaClientBasePath := c.ComputeBetaBasePath + "projects/"
google/config.go:	log.Printf("[INFO] Instantiating GCE Beta client for path %s", computeBetaClientBasePath)
google/config.go:	clientComputeBeta, err := computeBeta.NewService(c.context, option.WithHTTPClient(c.client))
google/config.go:	clientComputeBeta.BasePath = computeBetaClientBasePath
google/data_source_google_compute_instance_template.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/data_source_google_compute_instance_template.go:type ByCreationTimestamp []*computeBeta.InstanceTemplate
google/metadata.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/metadata.go:func BetaMetadataUpdate(oldMDMap map[string]interface{}, newMDMap map[string]interface{}, serverMD *computeBeta.Metadata) {
google/metadata.go:		serverMD.Items = append(serverMD.Items, &computeBeta.MetadataItems{
google/metadata.go:func flattenMetadataBeta(metadata *computeBeta.Metadata) map[string]string {
google/metadata.go:// compute.metadata rather than computeBeta.metadata as an argument. It should
google/metadata.go:func resourceInstanceMetadata(d TerraformResourceData) (*computeBeta.Metadata, error) {
google/metadata.go:	m := &computeBeta.Metadata{}
google/metadata.go:		m.Items = make([]*computeBeta.MetadataItems, 0, len(mdMap))
google/metadata.go:			m.Items = append(m.Items, &computeBeta.MetadataItems{
google/resource_compute_instance.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/resource_compute_instance.go:func getInstance(config *Config, d *schema.ResourceData) (*computeBeta.Instance, error) {
google/resource_compute_instance.go:func expandComputeInstance(project string, d *schema.ResourceData, config *Config) (*computeBeta.Instance, error) {
google/resource_compute_instance.go:	disks := []*computeBeta.AttachedDisk{}
google/resource_compute_instance.go:	return &computeBeta.Instance{
google/resource_compute_instance.go:	var updatesToNIWhileStopped []func(inst *computeBeta.Instance) error
google/resource_compute_instance.go:				ni := &computeBeta.NetworkInterface{
google/resource_compute_instance.go:			networkInterfacePatchObj := &computeBeta.NetworkInterface{
google/resource_compute_instance.go:			networkInterfacePatchObj := &computeBeta.NetworkInterface{
google/resource_compute_instance.go:func expandAttachedDisk(diskConfig map[string]interface{}, d *schema.ResourceData, meta interface{}) (*computeBeta.AttachedDisk, error) {
google/resource_compute_instance.go:	disk := &computeBeta.AttachedDisk{
google/resource_compute_instance.go:			disk.DiskEncryptionKey = &computeBeta.CustomerEncryptionKey{
google/resource_compute_instance.go:			disk.DiskEncryptionKey = &computeBeta.CustomerEncryptionKey{
google/resource_compute_instance.go:func expandInstanceGuestAccelerators(d TerraformResourceData, config *Config) ([]*computeBeta.AcceleratorConfig, error) {
google/resource_compute_instance.go:	guestAccelerators := make([]*computeBeta.AcceleratorConfig, 0, len(accels))
google/resource_compute_instance.go:		guestAccelerators = append(guestAccelerators, &computeBeta.AcceleratorConfig{
google/resource_compute_instance.go:func expandBootDisk(d *schema.ResourceData, config *Config, project string) (*computeBeta.AttachedDisk, error) {
google/resource_compute_instance.go:	disk := &computeBeta.AttachedDisk{
google/resource_compute_instance.go:			disk.DiskEncryptionKey = &computeBeta.CustomerEncryptionKey{
google/resource_compute_instance.go:			disk.DiskEncryptionKey = &computeBeta.CustomerEncryptionKey{
google/resource_compute_instance.go:		disk.InitializeParams = &computeBeta.AttachedDiskInitializeParams{}
google/resource_compute_instance.go:func flattenBootDisk(d *schema.ResourceData, disk *computeBeta.AttachedDisk, config *Config) []map[string]interface{} {
google/resource_compute_instance.go:func expandScratchDisks(d *schema.ResourceData, config *Config, project string) ([]*computeBeta.AttachedDisk, error) {
google/resource_compute_instance.go:	scratchDisks := make([]*computeBeta.AttachedDisk, 0, n)
google/resource_compute_instance.go:		scratchDisks = append(scratchDisks, &computeBeta.AttachedDisk{
google/resource_compute_instance.go:			InitializeParams: &computeBeta.AttachedDiskInitializeParams{
google/resource_compute_instance.go:func flattenScratchDisk(disk *computeBeta.AttachedDisk) map[string]interface{} {
google/resource_compute_instance_from_template.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/resource_compute_instance_from_template.go:func adjustInstanceFromTemplateDisks(d *schema.ResourceData, config *Config, it *computeBeta.InstanceTemplate, zone *compute.Zone, project string) ([]*computeBeta.AttachedDisk, error) {
google/resource_compute_instance_from_template.go:	disks := []*computeBeta.AttachedDisk{}
google/resource_compute_instance_group_manager.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/resource_compute_instance_group_manager.go:func getNamedPortsBeta(nps []interface{}) []*computeBeta.NamedPort {
google/resource_compute_instance_group_manager.go:	namedPorts := make([]*computeBeta.NamedPort, 0, len(nps))
google/resource_compute_instance_group_manager.go:		namedPorts = append(namedPorts, &computeBeta.NamedPort{
google/resource_compute_instance_group_manager.go:	manager := &computeBeta.InstanceGroupManager{
google/resource_compute_instance_group_manager.go:func flattenNamedPortsBeta(namedPorts []*computeBeta.NamedPort) []map[string]interface{} {
google/resource_compute_instance_group_manager.go:func flattenVersions(versions []*computeBeta.InstanceGroupManagerVersion) []map[string]interface{} {
google/resource_compute_instance_group_manager.go:func flattenFixedOrPercent(fixedOrPercent *computeBeta.FixedOrPercent) []map[string]interface{} {
google/resource_compute_instance_group_manager.go:func getManager(d *schema.ResourceData, meta interface{}) (*computeBeta.InstanceGroupManager, error) {
google/resource_compute_instance_group_manager.go:		op := &computeBeta.Operation{
google/resource_compute_instance_group_manager.go:	updatedManager := &computeBeta.InstanceGroupManager{
google/resource_compute_instance_group_manager.go:		setNamedPorts := &computeBeta.InstanceGroupsSetNamedPortsRequest{
google/resource_compute_instance_group_manager.go:func expandAutoHealingPolicies(configured []interface{}) []*computeBeta.InstanceGroupManagerAutoHealingPolicy {
google/resource_compute_instance_group_manager.go:	autoHealingPolicies := make([]*computeBeta.InstanceGroupManagerAutoHealingPolicy, 0, len(configured))
google/resource_compute_instance_group_manager.go:		autoHealingPolicy := computeBeta.InstanceGroupManagerAutoHealingPolicy{
google/resource_compute_instance_group_manager.go:func expandStatefulPolicy(configured []interface{}) *computeBeta.StatefulPolicy {
google/resource_compute_instance_group_manager.go:	disks := make(map[string]computeBeta.StatefulPolicyPreservedStateDiskDevice)
google/resource_compute_instance_group_manager.go:		disk := computeBeta.StatefulPolicyPreservedStateDiskDevice{
google/resource_compute_instance_group_manager.go:		return &computeBeta.StatefulPolicy{PreservedState: &computeBeta.StatefulPolicyPreservedState{Disks: disks}}
google/resource_compute_instance_group_manager.go:func expandVersions(configured []interface{}) []*computeBeta.InstanceGroupManagerVersion {
google/resource_compute_instance_group_manager.go:	versions := make([]*computeBeta.InstanceGroupManagerVersion, 0, len(configured))
google/resource_compute_instance_group_manager.go:		version := computeBeta.InstanceGroupManagerVersion{
google/resource_compute_instance_group_manager.go:func expandFixedOrPercent(configured []interface{}) *computeBeta.FixedOrPercent {
google/resource_compute_instance_group_manager.go:	fixedOrPercent := &computeBeta.FixedOrPercent{}
google/resource_compute_instance_group_manager.go:func expandUpdatePolicy(configured []interface{}) *computeBeta.InstanceGroupManagerUpdatePolicy {
google/resource_compute_instance_group_manager.go:	updatePolicy := &computeBeta.InstanceGroupManagerUpdatePolicy{}
google/resource_compute_instance_group_manager.go:			updatePolicy.MaxSurge = &computeBeta.FixedOrPercent{
google/resource_compute_instance_group_manager.go:			updatePolicy.MaxSurge = &computeBeta.FixedOrPercent{
google/resource_compute_instance_group_manager.go:			updatePolicy.MaxUnavailable = &computeBeta.FixedOrPercent{
google/resource_compute_instance_group_manager.go:			updatePolicy.MaxUnavailable = &computeBeta.FixedOrPercent{
google/resource_compute_instance_group_manager.go:func flattenAutoHealingPolicies(autoHealingPolicies []*computeBeta.InstanceGroupManagerAutoHealingPolicy) []map[string]interface{} {
google/resource_compute_instance_group_manager.go:func flattenStatefulPolicy(statefulPolicy *computeBeta.StatefulPolicy) []map[string]interface{} {
google/resource_compute_instance_group_manager.go:func flattenUpdatePolicy(updatePolicy *computeBeta.InstanceGroupManagerUpdatePolicy) []map[string]interface{} {
google/resource_compute_instance_template.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/resource_compute_instance_template.go:func buildDisks(d *schema.ResourceData, config *Config) ([]*computeBeta.AttachedDisk, error) {
google/resource_compute_instance_template.go:	disks := make([]*computeBeta.AttachedDisk, 0, disksCount)
google/resource_compute_instance_template.go:		var disk computeBeta.AttachedDisk
google/resource_compute_instance_template.go:			disk.DiskEncryptionKey = &computeBeta.CustomerEncryptionKey{}
google/resource_compute_instance_template.go:			disk.InitializeParams = &computeBeta.AttachedDiskInitializeParams{}
google/resource_compute_instance_template.go:func expandInstanceTemplateGuestAccelerators(d TerraformResourceData, config *Config) []*computeBeta.AcceleratorConfig {
google/resource_compute_instance_template.go:	guestAccelerators := make([]*computeBeta.AcceleratorConfig, 0, len(accels))
google/resource_compute_instance_template.go:		guestAccelerators = append(guestAccelerators, &computeBeta.AcceleratorConfig{
google/resource_compute_instance_template.go:	instanceProperties := &computeBeta.InstanceProperties{
google/resource_compute_instance_template.go:	instanceTemplate := &computeBeta.InstanceTemplate{
google/resource_compute_instance_template.go:func flattenDisk(disk *computeBeta.AttachedDisk, defaultProject string) (map[string]interface{}, error) {
google/resource_compute_instance_template.go:func flattenDisks(disks []*computeBeta.AttachedDisk, d *schema.ResourceData, defaultProject string) ([]map[string]interface{}, error) {
google/resource_compute_instance_template.go:func expandResourceComputeInstanceTemplateScheduling(d *schema.ResourceData, meta interface{}) (*computeBeta.Scheduling, error) {
google/resource_compute_instance_template.go:		return &computeBeta.Scheduling{
google/resource_compute_region_instance_group_manager.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/resource_compute_region_instance_group_manager.go:	manager := &computeBeta.InstanceGroupManager{
google/resource_compute_region_instance_group_manager.go:type getInstanceManagerFunc func(*schema.ResourceData, interface{}) (*computeBeta.InstanceGroupManager, error)
google/resource_compute_region_instance_group_manager.go:func getRegionalManager(d *schema.ResourceData, meta interface{}) (*computeBeta.InstanceGroupManager, error) {
google/resource_compute_region_instance_group_manager.go:	updatedManager := &computeBeta.InstanceGroupManager{
google/resource_compute_region_instance_group_manager.go:		setNamedPorts := &computeBeta.RegionInstanceGroupsSetNamedPortsRequest{
google/resource_compute_region_instance_group_manager.go:func expandRegionUpdatePolicy(configured []interface{}) *computeBeta.InstanceGroupManagerUpdatePolicy {
google/resource_compute_region_instance_group_manager.go:	updatePolicy := &computeBeta.InstanceGroupManagerUpdatePolicy{}
google/resource_compute_region_instance_group_manager.go:			updatePolicy.MaxSurge = &computeBeta.FixedOrPercent{
google/resource_compute_region_instance_group_manager.go:			updatePolicy.MaxSurge = &computeBeta.FixedOrPercent{
google/resource_compute_region_instance_group_manager.go:			updatePolicy.MaxUnavailable = &computeBeta.FixedOrPercent{
google/resource_compute_region_instance_group_manager.go:			updatePolicy.MaxUnavailable = &computeBeta.FixedOrPercent{
google/resource_compute_region_instance_group_manager.go:func flattenRegionUpdatePolicy(updatePolicy *computeBeta.InstanceGroupManagerUpdatePolicy) []map[string]interface{} {
google/resource_compute_region_instance_group_manager.go:func expandDistributionPolicy(d *schema.ResourceData) *computeBeta.DistributionPolicy {
google/resource_compute_region_instance_group_manager.go:	distributionPolicyZoneConfigs := make([]*computeBeta.DistributionPolicyZoneConfiguration, 0, dpz.Len())
google/resource_compute_region_instance_group_manager.go:		distributionPolicyZoneConfig := computeBeta.DistributionPolicyZoneConfiguration{
google/resource_compute_region_instance_group_manager.go:	return &computeBeta.DistributionPolicy{Zones: distributionPolicyZoneConfigs, TargetShape: dpts}
google/resource_compute_region_instance_group_manager.go:func flattenDistributionPolicy(distributionPolicy *computeBeta.DistributionPolicy) []string {
google/resource_compute_shared_vpc_service_project.go:	computeBeta "google.golang.org/api/compute/v0.beta"
google/resource_compute_shared_vpc_service_project.go:	req := &computeBeta.ProjectsEnableXpnResourceRequest{
google/resource_compute_shared_vpc_service_project.go:		XpnResource: &computeBeta.XpnResourceId{
google/resource_compute_shared_vpc_service_project.go:	req := &computeBeta.ProjectsDisableXpnResourceRequest{
google/resource_compute_shared_vpc_service_project.go:		XpnResource: &computeBeta.XpnResourceId{

References

  • b/181245554
@slevenick
Copy link
Collaborator

This is part of a larger discussion that is ongoing. I will update this if we have a conclusion on how to handle this.

Basically, the GA provider only allows access to GA features and resources, but does call beta endpoints

@slevenick
Copy link
Collaborator

This is done for the currently possible products via GoogleCloudPlatform/magic-modules#4560

@ghost
Copy link

ghost commented Apr 15, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants