This is a question that many individuals have when they are first diagnosed with type 2 diabetes. Carbohydrate is the nutrient with the greatest impact on blood sugar. Foods such as bread, potatoes, and pasta all contain carbohydrates. Insulin resistance is a common condition that results in type 2 diabetes. Insulin resistance has been referred by some experts as "carbohydrate intolerance." What that means is that individuals with a greater degree of insulin resistance may need to follow a lower carbohydrate diet to achieve their individual glycemic goals. A lower carbohydrate diet would include a reduced intake of carbohydrate foods like bread, potatoes, and pasta. Everyone's carbohydrate tolerance is different and what works well for one person may not work well for another. The 2015 Standards of Medical Care in Diabetes states, "Evidence suggests that there is not an ideal percentage of calories from carbohydrate, protein, and fat for all people with diabetes. Therefore, macronutrient distribution should be based on individualized assessment of current eating patterns, preferences, and metabolic goals." What might work well for some is to monitor blood glucose levels 1-2 hours after eating pasta/potatoes/bread if blood glucose is elevated (usually above 180 mg/dL) then the next time that food is consumed consider having 1/2 your normal portion and then repeating your blood glucose test again 1-2 hours after your meal is done. Did you notice a difference/improvement? For people who choose to eat foods like bread and pasta on a regular basis, I encourage whole wheat varieties. Whole wheat will have more fiber than refined grains/white grains. Fiber has many health benefits, one being that it can help with blood glucose spikes following a meal.
Every food can fit in moderation. The foods you mentioned contain carbohydrate. Carbohydrates are the body's main fuel source, part of a healthy diet, and necessary when working to manage diabetes. It is important to manage your intake of carbohydrates, striving to eat a consistent amount throughout the day to avoid sudden spikes in blood sugar. In addition to speaking with your doctor, this article offers some additional explanation that may be helpful to you: https://type2diabetes.com/answers/eliminate-carbohydrates-diet/